private void button1_Click(object sender, EventArgs e)
        {
            String code  = textBox1.Text;
            bool   found = false;

            foreach (CardEvent c in Global.cardDatabase)
            {
                if (c.cardCode.Equals(code.ToUpper()))
                {
                    Global.currentCardEvent = c;
                    found = true;
                }
            }
            if (!found)
            {
                MessageBox.Show("The code that has been entered does not match any of the cards.", "Invalid Code", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                Global.isCard = true;
                Global.currentCardEvent.initEvent();
                Form newGame = new ResultScreen();
                newGame.Show();
                newGame.Location = this.Location;
                this.Hide();
            }
        }
Example #2
0
        private void choice2_Click(object sender, EventArgs e)
        {
            Global.currentEvent.choice2();
            Form newGame = new ResultScreen();

            newGame.Show();
            newGame.Location = this.Location;
            this.Hide();
        }