示例#1
0
        //This will get you back to the starting page
        private void button1_Click(object sender, EventArgs e)
        {
            StartingMenu sm = new StartingMenu();

            this.Hide();
            sm.ShowDialog();
        }
        // After game is won
        void WinGame()
        {
            GameOver = true;
            Discover_Map_Win();
            smileMan.BackgroundImageLayout = ImageLayout.Stretch;
            smileMan.BackgroundImage       = Minesweeper.Properties.Resources.gameWon;
            CheckPlayerInBestFive();
            MessageBox.Show("Win !!!");
            StartingMenu sm = new StartingMenu();

            this.Hide();
            sm.ShowDialog();
        }
        // After game over
        void GameOver_(int x, int y)
        {
            GameOver = true;
            Discover_Map_Lose();
            buttons[x, y].BackgroundImageLayout = ImageLayout.Stretch;
            buttons[x, y].BackgroundImage       = Minesweeper.Properties.Resources.bombExplode;
            smileMan.BackgroundImageLayout      = ImageLayout.Stretch;
            smileMan.BackgroundImage            = Minesweeper.Properties.Resources.lostGameSmile;
            MessageBox.Show("Game Over !!!");
            StartingMenu sm = new StartingMenu();

            this.Hide();
            sm.ShowDialog();
        }