public void ResetScoreAndButtons() { score = 0; label3.Text = "0/" + btns.Length; foreach (Button btn in btns) { btn.Enabled = true; } PrepareButtons(Settings.LoadStringArray()); buttonReset.Focus(); }
public void ResetScoreAndButtons(bool l) { if (BotBackend.last != null && BotBackend.last.connected && !l) { MessageBox.Show("This option is not available right now as Discord is controlling the board.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } score = 0; label3.Text = "0/" + btns.Length; foreach (Button btn in btns) { btn.Enabled = true; } PrepareButtons(Settings.LoadStringArray()); buttonReset.Focus(); }
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); } }