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; })); }
/// <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)); } }
/// <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); } }
/// <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); } }