static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { DialogResult result = DialogResult.None; if (Updater.CheckUpdates(false) == VersionResult.Developer) { result = MessageBox.Show("You are using an unreleased developer version of GemsCraft. " + "Would you like to download the current version?", "Unreleased Version", MessageBoxButtons.YesNo); } else if (Updater.CheckUpdates(false) == VersionResult.Outdated) { result = MessageBox.Show("You are using an outdated version of GemsCraft. " + "Would you like to download the current version?", "Outdated Version", MessageBoxButtons.YesNo); } if (result == DialogResult.Yes) { Updater.CheckUpdaters(); // Moves updater downloaded if it hasn't been done yet Process.Start("Updater.exe"); } Form form = Server.IsUsingMono ? (Form) new BasicLauncher() : new MainForm(); Application.Run(form); } catch (Exception e) { MessageBox.Show(e.ToString()); } }
private void MainForm_Shown(object sender, EventArgs e) { Updater.CheckUpdates(); }