void UpdateChecker_NoUpdateAvailable(object sender, UpdateCheckEventArgs e) { try { if (InvokeRequired) { Invoke(new Action(() => { UpdateChecker_NoUpdateAvailable(sender, e); })); return; } MessageBox.Show(this, string.Format(Res.SettingsUpdateNotAvailable, e.ExeVersion.ToAppFormat()), Res.SettingsUpdateCaption, MessageBoxButtons.OK, MessageBoxIcon.Information); UpdateCheckerFinished(); } catch (Exception ex) { this.ShowError(ex); } }
void UpdateChecker_UpdateCheckFailed(object sender, UpdateCheckEventArgs e) { try { if (InvokeRequired) { Invoke(new Action(() => { UpdateChecker_UpdateCheckFailed(sender, e); })); return; } MessageBox.Show(this, Res.SettingsUpdateFailed, Res.SettingsUpdateCaption, MessageBoxButtons.OK, MessageBoxIcon.Error); UpdateCheckerFinished(); } catch (Exception ex) { this.ShowError(ex); } }
void UpdateChecker_UpdateAvailable(object sender, UpdateCheckEventArgs e) { try { if (InvokeRequired) { Invoke(new Action(() => { UpdateChecker_UpdateAvailable(sender, e); })); return; } if (MessageBox.Show(this, string.Format(Res.SettingsUpdateAvailable, e.WebVersion.ToAppFormat()), Res.SettingsUpdateCaption, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { e.OpenUpdateUrl(); } UpdateCheckerFinished(); } catch (Exception ex) { this.ShowError(ex); } }