示例#1
0
        private void menuButton_Click(object sender, EventArgs e)
        {
            Form f = this.FindForm();

            f.Controls.Remove(this);
            StartScreen ss = new StartScreen();

            f.Controls.Add(ss);
            ss.Focus();
        }
示例#2
0
        private void returnMenuButton_Click(object sender, EventArgs e)
        {
            // Sets colour options based on what the user picked

            setLazerColour    = Convert.ToInt32(lazerColourValue.Value);
            setAsteroidColour = Convert.ToInt32(asteroidColourValue.Value);
            setShipColour     = Convert.ToInt32(shipColourValue.Value);
            setStartingLevel  = Convert.ToInt32(startLevelValue.Value);

            // Sets sound options based on what the user picked

            setSoundOptions = soundChoiceBox.Checked;

            // Closes options screen when returning to menu

            Form f = this.FindForm();

            f.Controls.Remove(this);
            StartScreen ss = new StartScreen();

            f.Controls.Add(ss);
            ss.Focus();
        }
示例#3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            StartScreen ss = new StartScreen();

            this.Controls.Add(ss);
        }