Exemple #1
0
        private void button5_Click(object sender, EventArgs e)   //NO
        {
            if (this.formno == 0)
            {
                this.Hide();
                Form1 f = new Form1();
                f.ShowDialog();
            }
            else if (this.formno == 1)
            {
                if (this.category == 1)
                {
                    this.Hide();
                    Mathematics m = new Mathematics();
                    m.ShowDialog();
                }
                if (this.category == 2)
                {
                    this.Hide();
                    General_Knowledge gk = new General_Knowledge();
                    gk.ShowDialog();
                }
                if (this.category == 3)
                {
                    this.Hide();
                    Science sc = new Science();
                    sc.ShowDialog();
                }
                if (this.category == 4)
                {
                    this.Hide();
                    Computer comp = new Computer();
                    comp.ShowDialog();
                }
            }

            else if (this.formno == 3)
            {
                this.Hide();
                Play p = new Play();
                p.ShowDialog();
            }
            else if (this.formno == 2)
            {
                this.Hide();
                Difficulty d = new Difficulty();
                d.ShowDialog();
            }
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)    //CATEGORY  for mathematics
        {
            // Form1 f1 = new Form1();
            int request = 0;
            DFA dfa     = new DFA(currentstate);
            int answer  = dfa.transition(currentstate, request);

            if (answer == 1)
            {
                this.Hide();
                Mathematics maths = new Mathematics();
                maths.ShowDialog();
                // Console.Read();
            }
            else
            {
                MessageBox.Show("You have a mistake in selection.");
            }
        }