예제 #1
0
        private void option1Button_Click(object sender, EventArgs e)
        {
            option1Button.Visible = false;
            option2Button.Visible = false;
            option3Button.Visible = false;
            option4Button.Visible = false;

            questionLabel.Text = "Are you in an adventurous mood or a puzzle mood?";
            optionsLabel.Text  = "Enter adventurous or puzzle above.";

            inputBox.Visible    = true;
            enterButton.Visible = true;

            if (inputBox.Text == "adventurous")
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);

                InteractiveZoo iz = new InteractiveZoo();
                f.Controls.Add(iz);
            }
            else if (inputBox.Text == "puzzle")
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);

                MemoryGame mg = new MemoryGame();
                f.Controls.Add(mg);
            }
        }
예제 #2
0
        private void enterButton_Click(object sender, EventArgs e)
        {
            string input = inputBox.Text;


            if (input == "happiness")
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);

                InteractiveZoo iz = new InteractiveZoo();
                f.Controls.Add(iz);
            }
            else if (input == "focus")
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);

                MemoryGame mg = new MemoryGame();
                f.Controls.Add(mg);
            }
            else if (input == "calmness")
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);

                Calmness c = new Calmness();
                f.Controls.Add(c);
            }
            else if (input == "motivation")
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);

                Motivation m = new Motivation();
                f.Controls.Add(m);
            }
            else if (input == "puzzle")
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);

                MemoryGame mg = new MemoryGame();
                f.Controls.Remove(this);
            }
            else if (input == "adventurous")
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);

                Motivation m = new Motivation();
                f.Controls.Add(m);
            }
            else
            {
                questionLabel.Text = "Please enter one of the words that were suggested";
            }
        }