/****************************** * 说明:服务器文件配置对象 * 创建人:龚宇超 * 创建日期:2018-02-09 * 修改人: * 修改日期: * 修改备注: * 版本:1.0.0.0 ******************************/ using System; using System.Collections.Generic; using System.Text; using System.Xml; namespace Lskj.AutoUpdate { /// /// 服务器文件配置对象 /// public class RemoteFile { private string path; private string url; private string lastver; private int size; private bool needRestart; private string version; /// /// 文件名称 /// /// The path. public string Path { get { return path; } } /// /// 下载地址 /// /// The URL. public string Url { get { return url; } } /// /// 最新版本 /// /// The last ver. public string LastVer { get { return lastver; } } /// /// 文件大小 /// /// The size. public int Size { get { return size; } } /// /// 是否需要重启 /// /// true if [need restart]; otherwise, false. public bool NeedRestart { get { return needRestart; } } /// /// 版本号 /// /// The verison. public string Verison { get { return version; } } public RemoteFile(XmlNode node) { this.path = node.Attributes["path"].Value; this.url = node.Attributes["url"].Value; this.lastver = node.Attributes["lastver"].Value; this.size = Convert.ToInt32(node.Attributes["size"].Value); this.needRestart = Convert.ToBoolean(node.Attributes["needRestart"].Value); this.version = node.Attributes["version"].Value; } } }