private void toggleSound_Click(object sender, EventArgs e) { InvisButton.Select(); Properties.Settings.Default.playSounds = !Properties.Settings.Default.playSounds; Properties.Settings.Default.Save(); toggleSoundText(); }
private void Options_Click(object sender, EventArgs e) { InvisButton.Select(); Options Options = new Options(); Options.SetBounds(this.Location.X, this.Location.Y, this.Width, this.Height); Options.Show(); this.Hide(); }
private void Button_MouseDown(object sender, MouseEventArgs e) { InvisButton.Select(); string buttonCoords = (sender as Button).Name; string[] coordsArray = buttonCoords.Split(' '); Global.BUTTONROW = Int32.Parse(coordsArray[0]); Global.BUTTONCOL = Int32.Parse(coordsArray[1]); CheckGrid(); if (e.Button == MouseButtons.Right) { Play.OnRightClick(); MineCounter.Text = String.Format("{0:00}", Global.NUMMINES - Global.FLAGCOUNTER); } }
private void clearRecords_Click(object sender, EventArgs e) { InvisButton.Select(); DialogResult confirm = MessageBox.Show("Are you sure?\nAll records will be deleted.", "Confirm Action", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm == DialogResult.Yes) { Properties.Settings.Default.easyBestTime = 0; Properties.Settings.Default.easyGames = 0; Properties.Settings.Default.easyWins = 0; Properties.Settings.Default.mediumBestTime = 0; Properties.Settings.Default.mediumGames = 0; Properties.Settings.Default.mediumWins = 0; Properties.Settings.Default.hardBestTime = 0; Properties.Settings.Default.hardGames = 0; Properties.Settings.Default.hardWins = 0; Properties.Settings.Default.totalGames = 0; Properties.Settings.Default.totalWins = 0; Properties.Settings.Default.Save(); } }
private void NewGame_Click(object sender, EventArgs e) { InvisButton.Select(); if (Minesweeper.Properties.Settings.Default.saveGame && File.Exists(Global.DATALOCATION + @"\Data.xml")) { DialogResult continueGame = MessageBox.Show("Saved game detected, continue?", "Continue Game", MessageBoxButtons.YesNo, MessageBoxIcon.None); if (continueGame == DialogResult.Yes) { Serialize.DeserializeFromXML(); new GameBoard().Show(); this.Hide(); } else { StartNewGame(); } } else { StartNewGame(); } }
public Options() { InitializeComponent(); InvisButton.Select(); toggleSoundText(); }
private void Records_Click(object sender, EventArgs e) { InvisButton.Select(); new Records().Show(); this.Hide(); }