示例#1
0
 private void masterUpdate_NewVersionFound(string[] newfiles)
 {
     try
     {
         if (this.InvokeRequired)
         {
             this.Invoke(new UpdateMasterData.NewVersionFoundEventHandler(masterUpdate_NewVersionFound), new object[] { newfiles });
         }
         else
         {
             _hasRemindDialog = true;
             UpdateMasterData masterUpdate = new UpdateMasterData();
             masterUpdate.DownloadNewMasterDataFiles(newfiles);
             _hasRemindDialog = false;
         }
     }
     catch
     {
         //Program.ShowMessageBox("MainForm", ex);
     }
 }
示例#2
0
 private void CheckAndDownloadMasterData(bool IsStartUp, bool IsManually)
 {
     Thread updateThread = new Thread(new System.Threading.ThreadStart(delegate
     {
         UpdateMasterData masterUpdate = new UpdateMasterData();
         masterUpdate.NewVersionFound += new UpdateMasterData.NewVersionFoundEventHandler(masterUpdate_NewVersionFound);
         masterUpdate.CheckVersion(IsStartUp, IsManually);
     }));
     updateThread.IsBackground = true;
     updateThread.Start();
 }