Example #1
0
        public void firstLevel()
        {
            MainGameWindow game1 = new MainGameWindow();

            game1.ShowDialog();
            if (game1.DialogResult == DialogResult.Yes)
            {
                secondLevel();
            }
            else if (game1.DialogResult == DialogResult.No)
            {
                firstLevel();
            }
            else if (game1.DialogResult == DialogResult.Cancel)
            {
                this.Show();
            }
        }
Example #2
0
        private void LbNewGame_Click(object sender, EventArgs e)
        {
            clickSound();
            this.Hide();
            MainGameWindow game = new MainGameWindow();

            game.ShowDialog();
            if (game.DialogResult == DialogResult.Yes)
            {
                secondLevel();
            }
            else if (game.DialogResult == DialogResult.No)
            {
                firstLevel();
            }
            else if (game.DialogResult == DialogResult.Cancel)
            {
                this.Show();
            }
        }