예제 #1
0
 private void btnExit_Click(object sender, EventArgs e)
 {
     frmMain frmMain = new frmMain();
        if (MessageBox.Show("Do you want to quit your current game?", "Exit", MessageBoxButtons.YesNo) == DialogResult.Yes)
        {
       this.Close();
       frmMain.Show();
       this.Close();
        }
 }
예제 #2
0
        private void btnCheckersExit_Click(object sender, EventArgs e)
        {
            DialogResult save = MessageBox.Show("Do you want to save first?", "Exit", MessageBoxButtons.YesNoCancel);

            if (save == DialogResult.No)
            {
                frmMain main = new frmMain();
                main.Show();
                this.Close();

            }
            else if (save == DialogResult.Yes)
            {
                //Save everything();
                frmMain main = new frmMain();
                main.Show();
                this.Close();
            }
        }