private async void checkForUpdatesToolStripMenuItem_Click(object sender, EventArgs e) { bool res = await UpdateBackend.checkForUpdates(this); if (!res) { MessageBox.Show(null, "You're already on the latest update!", "No update available", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void Form1_Load(object sender, EventArgs e) { PrepareButtons(Settings.LoadStringArray()); buttonReset.Focus(); int color = Settings.settings.global_background; String back = Settings.colors[color]; this.BackColor = ColorTranslator.FromHtml(back); int color2 = Settings.settings.global_foreground; String fore = Settings.colors[color2]; this.ForeColor = ColorTranslator.FromHtml(fore); Control[] arr = new Control[this.Controls.Count]; this.Controls.CopyTo(arr, 0); paintControls(arr, fore, back); if (Settings.settings.cfuos) { UpdateBackend.checkForUpdates(this); } }