using System;

namespace LiveUpdate
{
	/// <summary>
	/// 
	/// </summary>
    public struct UpdateInfo
    {
        /// <summary>
        /// 更新类型,soft或者data
        /// </summary>
        public string UpdateType;//更新类型
        /// <summary>
        /// 更新描述Url
        /// </summary>
        public string UpdateDes_Url;//更新描述Url
        /// <summary>
        /// 更新描述
        /// </summary>
        public string UpdateDes;//更新描述
        /// <summary>
        /// 版本
        /// </summary>
        public string UpdateVer;//版本
        /// <summary>
        /// 更新日期
        /// </summary>
        public string UpdateDate;//更新日期
        /// <summary>
        /// 更新地址
        /// </summary>
        public string UpdateUrl;//更新地址
        /// <summary>
        /// 在下载升级包前首先要下载的内容
        /// </summary>
        public string FirstDownList;//在下载升级包前首先要下载的内容
        /// <summary>
        /// 升级程序要使用的设置xml
        /// </summary>
        public string sxSettingXML;//升级程序要使用的设置xml
    }
	/// <summary>
	/// 
	/// </summary>
    public struct UpdateErrorInfo
    {
		/// <summary>
		/// 错误字符串
		/// </summary>
		public string ErrorStr;//错误字符串
		/// <summary>
		/// 错误id
		/// </summary>
		public int ErrorId;//错误id
    }
	/// <summary>
	/// 
	/// </summary>
    public sealed class LiveUpdateEventArgs : EventArgs
	{
		private long _CurrentFileSize;
		private string _CurrentFileName;
		private string _CurrentUrl;
		private double _CurrProgress;
		private bool _IsCompleted;
		private string _CurrentStatus;
		/// <summary>
		/// 
		/// </summary>
		public LiveUpdateEventArgs()
		{
			_CurrentFileSize = 0;
			_CurrentUrl = "";
			_IsCompleted = false;
		}
		/// <summary>
		/// 
		/// </summary>
		public long CurrentFileSize
		{
			get { return _CurrentFileSize; }
			set { _CurrentFileSize = value; }
		}
		/// <summary>
		/// 
		/// </summary>
		public string CurrentFileName
		{
			get { return _CurrentFileName; }
			set { _CurrentFileName = value; }
		}
		/// <summary>
		/// 
		/// </summary>
		public string CurrentUrl
		{
			get { return _CurrentUrl; }
			set { _CurrentUrl = value; }
		}
		/// <summary>
		/// 
		/// </summary>
		public double CurrProgress
		{
			get { return _CurrProgress; }
			set { _CurrProgress = value; }
		}
		/// <summary>
		/// 
		/// </summary>
		public bool IsCompleted
		{
			get { return _IsCompleted; }
			set { _IsCompleted = value; }
		}
		/// <summary>
		/// 
		/// </summary>
		public string CurrentStatus
		{
			get { return _CurrentStatus; }
			set { _CurrentStatus = value; }
		}
	}
}
