コード例 #1
0
ファイル: Update.cs プロジェクト: XINLIUL/sprite
        public Update(string curVersion,VersionInfo newVersion)
        {
            InitializeComponent();
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            labelOld.Text = curVersion;
            labelNew.Text = newVersion.Version;
            linkInstr.Text = newVersion.IntroductionUrl;
            linkDownload.Text = newVersion.DownloadUrl;

            linkInstr.Click += linkInstr_Click;

            linkDownload.Click+=linkDownload_Click;
        }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: XINLIUL/sprite
 void GetService()
 {
     try
     {
         var version = new VersionInfo() { Version=CurentVersion};
         var newVersionStr = httpClass.HttpPost(NetUrl, "data=" + XmlSerializer.XMLSerialize<VersionInfo>(version));
         newVersion = XmlSerializer.DeXMLSerialize<VersionInfo>(newVersionStr);
         if (newVersion.Version != version.Version) 
         {
             this.Invoke(new EnableButtonCallBack(ShowBtnUpdate));
         }
         thread.Abort();
     }
     catch
     {
         
     }
 }