private void TriggerCheckFinishedEvent(UpdateCheckEventArgs args) { if (CheckFinished != null) { form.InvokeAsyncSafe(() => CheckFinished(this, args)); } }
private void updates_CheckFinished(object sender, UpdateCheckEventArgs e) { UpdateInfo foundUpdate = e.Result.HasValue ? e.Result.Value : null; if (nextUpdate != null && !nextUpdate.Equals(foundUpdate)) { nextUpdate.DeleteInstaller(); } nextUpdate = foundUpdate; }
void checker_UpdateCheckFailed(object sender, UpdateCheckEventArgs e) { try { SetUpdateInfo(null, null); } catch (Exception ex) { Log.Write(ex); SetUpdateInfo(null, null); } }
void checker_NoUpdateAvailable(object sender, UpdateCheckEventArgs e) { try { SetUpdateInfo(Res.AboutUpdateNotAvailable, null); } catch (Exception ex) { Log.Write(ex); SetUpdateInfo(null, null); } }
void checker_UpdateAvailable(object sender, UpdateCheckEventArgs e) { try { SetUpdateInfo(string.Format(Res.AboutUpdateAvailable, e.WebVersion.ToAppFormat()), e.UpdateUrl); } catch (Exception ex) { Log.Write(ex); SetUpdateInfo(null, null); } }
private void updates_CheckFinished(object sender, UpdateCheckEventArgs e) { if (e.EventId == updateCheckEventId) { btnCheckUpdates.Enabled = true; if (!e.UpdateAvailable) { MessageBox.Show("Your version of " + Program.BrandName + " is up to date.", "No Updates Available", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void updates_CheckFinished(object sender, UpdateCheckEventArgs e){ if (e.EventId == updateCheckEventId){ btnCheckUpdates.Enabled = true; e.Result.Handle(update => { if (update.VersionTag == Program.VersionTag){ FormMessage.Information("No Updates Available", "Your version of TweetDuck is up to date.", FormMessage.OK); } }, ex => { Program.Reporter.HandleException("Update Check Error", "An error occurred while checking for updates.", true, ex); }); } }
private void updates_CheckFinished(object sender, UpdateCheckEventArgs e) { e.Result.Handle(update => { string tag = update.VersionTag; if (tag != Program.VersionTag && tag != Config.DismissedUpdate) { update.BeginSilentDownload(); browser.ShowUpdateNotification(tag, update.ReleaseNotes); } else { updates.StartTimer(); } }, ex => { if (!ignoreUpdateCheckError) { Program.Reporter.HandleException("Update Check Error", "An error occurred while checking for updates.", true, ex); updates.StartTimer(); } }); ignoreUpdateCheckError = true; }