Esempio n. 1
0
        private void BtnExit_Click(object sender, EventArgs e)
        {
            ChoiceDialog confirmReturn = new ChoiceDialog("确认退出游戏吗?\r\n当前进度会被自动保存。");

            confirmReturn.ShowDialog();
            if (confirmReturn.code == 0)
            {
                return;
            }
            Application.Exit();
        }
Esempio n. 2
0
        private void BtnReturnMenu_Click(object sender, EventArgs e)
        {
            ChoiceDialog confirmReturn = new ChoiceDialog("确认返回主菜单吗?\r\n当前进度会被自动保存。");

            confirmReturn.ShowDialog();
            if (confirmReturn.code == 0)
            {
                return;
            }
            NewGame newGame = new NewGame();

            this.Parent.Controls.Add(newGame);
            this.Parent.Controls.Remove(this);
            newGame.Show();
            this.Close();
        }