Exemple #1
0
        public void NewGame()
        {
            //This function will pop up confirmation box and ask user if he/she want to create a new game
            //If yes then reset the main form
            //For protect user's process if he/she accidentally press F1 button
            DialogResult result = MessageBox.Show("Are you sure you want to create a new game", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2);

            if (result == DialogResult.Yes)
            {
                SudokuMainForm New_SudokuMainForm = new SudokuMainForm();
                New_SudokuMainForm.Show();
                this.Dispose(false);
            }
        }
Exemple #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     SudokuMainForm sg = new SudokuMainForm();
     sg.ShowDialog();
 }