コード例 #1
0
 private void toolStripStatusLabel3_Click(object sender, EventArgs e)
 {
     using (UpdateDialog dialog = new UpdateDialog((XDocument)toolStripStatusLabel3.Tag))
     {
         dialog.ShowDialog();
     }
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: zhengger/AntShares
 private static bool CheckVersion()
 {
     try
     {
         XmlDocument doc = new XmlDocument();
         doc.Load("https://www.antshares.com/client/version.xml");
         Version minimum = Version.Parse(doc.GetElementsByTagName("version")[0].Attributes["minimum"].Value);
         Version latest = Version.Parse(doc.GetElementsByTagName("version")[0].Attributes["latest"].Value);
         Version self = Assembly.GetExecutingAssembly().GetName().Version;
         if (self >= latest) return true;
         using (UpdateDialog dialog = new UpdateDialog { LatestVersion = latest })
         {
             dialog.ShowDialog();
         }
         return self >= minimum;
     }
     catch
     {
         return true;
     }
 }