Beispiel #1
0
        private void ContinueBtn_Click(object sender, EventArgs e)
        {
            if (ContinueBtn.Text == "游戏结束")
            {
                NewGame form1 = new NewGame();
                form1.TopLevel = false;
                this.Parent.Controls.Add(form1);
                this.Parent.Controls.Remove(this);
                form1.Show();
                this.Close();
                this.Dispose();
                return;
            }

            if (curGame.CurTurn <= curGame.GameChapter.SumTurn)
            {
                MakePlan makePlan = new MakePlan(curGame);
                makePlan.TopLevel = false;
                this.Parent.Controls.Add(makePlan);
                this.Parent.Controls.Remove(this);
                makePlan.Show();
                this.Close();
                this.Dispose();
            }
            else
            {
                GameResult result = new GameResult(curGame);
                ContinueBtn.Text    = "游戏结束";
                ContinueBtn.Enabled = false;
                PrintResult(result);
                ContinueBtn.Enabled = true;
            }
        }
Beispiel #2
0
        public MainForm()
        {
            InitializeComponent();

            NewGame form1 = new NewGame();

            form1.TopLevel = false;
            this.MainPanel.Controls.Add(form1);
            form1.Show();
        }
        private void BtnCancel_Click(object sender, EventArgs e)
        {
            NewGame form1 = new NewGame();

            form1.TopLevel = false;
            this.Parent.Controls.Add(form1);
            this.Parent.Controls.Remove(this);
            this.Close();
            form1.Show();
        }
Beispiel #4
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();
        }