StableVersion4.3/AppAutoUpdater/AutoUpdater/AutoUpdateHelper/RemoteFile.cs

51 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*****************************************************************
* Copyright (C) Knights Warrior Corporation. All rights reserved.
*
* Author: 圣殿骑士Knights Warrior
* Email: KnightsWarrior@msn.com
* Website: http://www.cnblogs.com/KnightsWarrior/ https://github.com/knightswarrior
* Create Date: 5/8/2010
* Usage:
*
* RevisionHistory
* Date Author Description
*
*****************************************************************/
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace KnightsWarriorAutoupdater
{
public class RemoteFile
{
#region The private fields
private string path = "";
private string url = "";
private string lastver = "";
private int size = 0;
private bool needRestart = false;
#endregion
#region The public property
public string Path { get { return path; } }
public string Url { get { return url; } }
public string LastVer { get { return lastver; } }
public int Size { get { return size; } }
public bool NeedRestart { get { return needRestart; } }
#endregion
#region The constructor of AutoUpdater
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);
}
#endregion
}
}