ab56a9bcf7
SVN-Revision: r240
71 lines
2.1 KiB
C#
71 lines
2.1 KiB
C#
/******************************
|
|
* 说明:服务器文件配置对象
|
|
* 创建人:龚宇超
|
|
* 创建日期:2018-02-09
|
|
* 修改人:
|
|
* 修改日期:
|
|
* 修改备注:
|
|
* 版本:1.0.0.0
|
|
******************************/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Xml;
|
|
|
|
namespace Lskj.AutoUpdate
|
|
{
|
|
/// <summary>
|
|
/// 服务器文件配置对象
|
|
/// </summary>
|
|
public class RemoteFile
|
|
{
|
|
private string path;
|
|
private string url;
|
|
private string lastver;
|
|
private int size;
|
|
private bool needRestart;
|
|
private string version;
|
|
|
|
/// <summary>
|
|
/// 文件名称
|
|
/// </summary>
|
|
/// <value>The path.</value>
|
|
public string Path { get { return path; } }
|
|
/// <summary>
|
|
/// 下载地址
|
|
/// </summary>
|
|
/// <value>The URL.</value>
|
|
public string Url { get { return url; } }
|
|
/// <summary>
|
|
/// 最新版本
|
|
/// </summary>
|
|
/// <value>The last ver.</value>
|
|
public string LastVer { get { return lastver; } }
|
|
/// <summary>
|
|
/// 文件大小
|
|
/// </summary>
|
|
/// <value>The size.</value>
|
|
public int Size { get { return size; } }
|
|
/// <summary>
|
|
/// 是否需要重启
|
|
/// </summary>
|
|
/// <value><c>true</c> if [need restart]; otherwise, <c>false</c>.</value>
|
|
public bool NeedRestart { get { return needRestart; } }
|
|
/// <summary>
|
|
/// 版本号
|
|
/// </summary>
|
|
/// <value>The verison.</value>
|
|
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;
|
|
}
|
|
}
|
|
}
|