private void btn_back_Click(object sender, EventArgs e)
        {
            FormMainMenu form = new FormMainMenu(myBoardGame);

            form.Show();
            Hide();
            form.Location = this.Location;
        }
Exemple #2
0
        private void btn_back_Click(object sender, EventArgs e)
        {
            // Navigate Page.
            myBoardGame.clearData();
            FormMainMenu form = new FormMainMenu(myBoardGame);

            form.Show();
            Hide();
            form.Location = this.Location;
        }
        private void btn_quit_Click(object sender, EventArgs e)
        {
            // Navigate Page.
            myBoardGame.clearData();
            FormMainMenu form = new FormMainMenu(myBoardGame);

            form.Show();
            Hide();
            form.Location = parentForm.Location;
            parentForm.Close();
        }
 private void btn_back_Click(object sender, EventArgs e)
 {
     if (parentForm == null)
     {
         FormMainMenu form = new FormMainMenu(myBoardGame);
         form.Show();
         Hide();
         form.Location = this.Location;
     }
     else
     {
         parentForm.Enabled = true;
         Hide();
     }
 }
Exemple #5
0
        public void restartGame(Form oldForm, Form oldMenu)
        {
            string size = "" + this.boardWidth + " x " + this.boardHeight + "";

            this.recovery(); // recovery data in board started.

            if (size == "8 x 8")
            {
                //MetroMessageBox.Show(this, "Let Go!!!");
                FormPlay8x8 form = new FormPlay8x8(this);
                form.Show();
                oldForm.Hide();
                form.Location = oldForm.Location;
            }
            else if (size == "12 x 12")
            {
                //MetroMessageBox.Show(this, "Let Go!!!");
                FormPlay12x12 form = new FormPlay12x12(this);
                form.Show();
                oldForm.Hide();
                form.Location = oldForm.Location;
            }
            else
            {
                MessageBox.Show("This feature is not support.");
                FormMainMenu form = new FormMainMenu(this);
                form.Show();
                oldForm.Hide();
                form.Location = oldForm.Location;
            }

            if (oldMenu != null)
            {
                oldMenu.Close();
            }
            oldForm.Close();
        }