Esempio n. 1
0
        /**
         * this will take the player back to the main menu
         */
        private void main_menu_button_Click(object sender, EventArgs e)
        {
            Main_menu mmenu = new Main_menu(); //opens the main menu

            this.Hide();                       //this will hide this window
            mmenu.ShowDialog();                //this will show the high scores window
            this.Close();
        }
Esempio n. 2
0
        /**
         * this method will bring up the main menu when it is clicked
         */
        private void main_menu_button_Click(object sender, EventArgs e)
        {
            Main_menu mmenu = new Main_menu(); //opens the main menu

            this.Hide();                       //this will hide this window
            string nam = name_textBox.Text;    //this will get the name of the player

            highscore.addtolist(nam, Score);   //this will add the name and the score to the list if it is on the top 10
            mmenu.ShowDialog();                //this will show the high scores window
            this.Close();
        }