public static void TriggerUpdateWindow(Version y, Version x, String newestversion, bool forced, bool startup, bool isitfromthechangelogwindow) { if (forced && startup) { Forms.DLEngine frm = new Forms.DLEngine(newestversion, String.Format("Downloading update {0}...", newestversion, @"{0}"), null, null, 0, true); frm.StartPosition = FormStartPosition.CenterScreen; frm.ShowDialog(); } else { UpdateYesNo upd = new UpdateYesNo(x, y, true, startup, isitfromthechangelogwindow); if (startup) { upd.StartPosition = FormStartPosition.CenterScreen; } else { upd.StartPosition = FormStartPosition.CenterParent; } DialogResult dialogResult = upd.ShowDialog(); upd.Dispose(); if (dialogResult == DialogResult.Yes) { Forms.DLEngine frm = new Forms.DLEngine(newestversion, String.Format("Downloading update {0}...", newestversion, @"{0}"), null, null, 0, false); frm.StartPosition = FormStartPosition.CenterScreen; frm.ShowDialog(); } } }
public static void NoUpdates(bool startup, bool internetok) { if (!startup) { UpdateYesNo upd = new UpdateYesNo(null, null, internetok, startup, false); upd.StartPosition = FormStartPosition.CenterParent; upd.ShowDialog(); upd.Dispose(); } }