private async void MainForm_Shown(object sender, EventArgs e) { if (!isRunningAsAdmin()) { MessageBox.Show("Please run the application as administator."); Environment.Exit(0); } try { bottomText = "Fetching servers IPs..."; updateStatus(); switcher.Settings = await SettingsManager.Load(); if (switcher.Settings.LatestChangelog != Program.VersionNumber) { new ChangelogForm().ShowDialog(); switcher.Settings.LatestChangelog = Program.VersionNumber; await switcher.Settings.Save(); } try { await switcher.Initialize(); } catch (HumanReadableException ex) { latestException = ex; } bottomText = "Checking updates..."; try { await updater.CheckUpdates(); // Yea so basically disable updater oops if (!(/*updater.NewUpdateAvailable*/ 1 == 1)) { DialogResult result = MessageBox.Show("There's a new update available. Do you want to download it now?", "Updater", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { startUpdater(); } } bottomText = ""; } catch { latestException = new HumanReadableException("Error while checking for updates."); } inspectButton.Enabled = true; updateStatus(); } catch (Exception ex) { latestException = ex; } }