internal static bool ShowCheckForUpdatesDialog() { Trace.TraceInformation("[ApplicationUpdateHelper] ShowCheckForUpdatesDialog()"); CheckForUpdatesForm checkForUpdatesForm = new CheckForUpdatesForm(); return(showDialogAndLaunchInstaller(checkForUpdatesForm)); }
private void CheckForUpdates() { if (GenericHelper.IsUserInteractive() && !_unattended && Convert.ToBoolean(ConfigHandler.CheckForUpdatesOnStart)) { _checkForUpdatesForm = new CheckForUpdatesForm(); _checkForUpdatesForm.UpdateCheckCompleteEvent += UpdateCheckCompleteEvent; _checkForUpdatesForm.CheckForUpdates(); } }
private static bool showDialogAndLaunchInstaller(CheckForUpdatesForm form) { if (form.ShowDialog() != DialogResult.OK) { Trace.TraceInformation("[ApplicationUpdateHelper] User discarded to install a new version"); return(false); } Debug.Assert(!String.IsNullOrEmpty(form.NewVersionFilePath)); launchInstallerWithoutUI(form.NewVersionFilePath); return(true); }
static void Main() { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); CheckForUpdatesForm checkForUpdatesForm = new CheckForUpdatesForm(); Application.Run(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void CheckForupdatesToolStripMenuItem_Click(object sender, EventArgs e) { CheckForUpdatesForm form = new CheckForUpdatesForm(); form.ShowDialog(); }