コード例 #1
0
        void UpdateCheckCompleted(object sender, UpdateCheckCompletedEventArgs e)
        {
            this.Invoke(new Action(() => {
                if (!e.Success || e.Information == null) {
                    //TODO
                    MessageBox.Show("Failed to download update info.");
                }
                else if (!e.Information.IsNewVersion) {
                    Program.Update.DisplayInfo();
                }

                progressUpdate.Visible = false;
            }));
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: eried/OnTopReplica
 /// <summary>
 /// Callback that handles update checking.
 /// </summary>
 static void UpdateManager_CheckCompleted(object sender, UpdateCheckCompletedEventArgs e)
 {
     if (e.Success && e.Information != null) {
         if (e.Information.IsNewVersion) {
             Update.ConfirmAndInstall();
         }
     }
     else {
         System.Diagnostics.Trace.WriteLine(string.Format("Failed to check updates. {0}", e.Error));
     }
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: samerai/preseria-preview
 /// <summary>
 /// Callback that handles update checking.
 /// </summary>
 static void UpdateManager_CheckCompleted(object sender, UpdateCheckCompletedEventArgs e)
 {
     if (e.Success && e.Information != null) {
         if (e.Information.IsNewVersion) {
             Update.ConfirmAndInstall();
         }
     }
     else {
         Console.Error.WriteLine("Failed to check updates. {0}", e.Error);
     }
 }
コード例 #4
0
ファイル: Program.cs プロジェクト: Hiale/ontopreplica
        /// <summary>
        /// Callback that handles update checking.
        /// </summary>
        static void UpdateManager_CheckCompleted(object sender, UpdateCheckCompletedEventArgs e)
        {
            if (e.Success && e.Information != null) {
                Log.Write("Update check successful (latest version is {0})", e.Information.LatestVersion);

                if (e.Information.IsNewVersionAvailable) {
                    Update.ConfirmAndInstall();
                }
            }
            else {
                Log.WriteException("Unable to check for updates", e.Error);
            }
        }