Exemplo n.º 1
0
        //Runs when the play button is clicked
        private void cmdPlay_Click(object sender, EventArgs e)
        {
            //Create a new instance of the form 'frmGamePlay'
            frmGamePlay frmGamePlay = new frmGamePlay();

            //Hide the main menu
            this.Hide();

            //Show the newly created form
            frmGamePlay.ShowDialog(this);

            //Close the current form
            //this.Close();
        }
Exemplo n.º 2
0
        //Runs when the play button is clicked
        private void cmdPlay_Click(object sender, EventArgs e)
        {
            //Create a new instance of the form 'frmGamePlay'
            frmGamePlay frmGamePlay = new frmGamePlay();

            //Hide the main menu
            this.Hide();

            //Show the newly created form
            frmGamePlay.ShowDialog(this);

            //Close the current form
            //this.Close();
        }
Exemplo n.º 3
0
        //Start a new game
        private void playAgain()
        {
            //If no score has been added to the highscore board
            if (!scoreAdded)
            {
                //Add score with the name 'Unknown'
                addScoreToHighScores("Unknown", iScore);
            }

            //Create a new instance of the form 'frmGamePlay'
            frmGamePlay frmGamePlay = new frmGamePlay();

            //Hide the current form
            this.Hide();

            //Show the newly created form
            frmGamePlay.ShowDialog(this);

            //Close the current form
            this.Close();
        }
        //Start a new game
        private void playAgain()
        {
            //If no score has been added to the highscore board
            if (!scoreAdded)
            {

                //Add score with the name 'Unknown'
                addScoreToHighScores("Unknown", iScore);
            }

            //Create a new instance of the form 'frmGamePlay'
            frmGamePlay frmGamePlay = new frmGamePlay();

            //Hide the current form
            this.Hide();

            //Show the newly created form
            frmGamePlay.ShowDialog(this);

            //Close the current form
            this.Close();
        }