//to do: combine the 3 answering buttons in one method to avoid duplicate code
        private void knopAntwoord3_Click(object sender, EventArgs e)
        {
            bool antwoord = ControleerAntwoord(knopAntwoord3.Text);

            VeranderKleurWolk(antwoord, "knopAntwoord3");
            this.Refresh();
            System.Threading.Thread.Sleep(2000);
            if (antwoord)
            {
                if (!userInstellingen.SpeelEvent())
                {
                    AbcLetterScherm child = new AbcLetterScherm(userInstellingen);
                    this.Hide();
                    child.Closed += (s, args) => this.Close();
                    child.ShowDialog();
                }
                else
                {
                    EventInSpel eventScherm = new EventInSpel(userInstellingen);
                    this.Hide();
                    eventScherm.Closed += (s, args) => this.Close();
                    eventScherm.Show();
                }
            }
        }
Exemple #2
0
 private void textBox5_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (CheckDeSom(textBox5.Text))
         {
             this.Refresh();
             System.Threading.Thread.Sleep(1500);
             if (!userInstellingen.SpeelEvent())
             {
                 Rekenen child = new Rekenen(userInstellingen, getal1Class);
                 this.Hide();
                 child.Closed += (s, args) => this.Close();
                 child.ShowDialog();
             }
             else
             {
                 EventInSpel eventScherm = new EventInSpel(userInstellingen);
                 this.Hide();
                 eventScherm.Closed += (s, args) => this.Close();
                 eventScherm.Show();
             }
         }
         else
         {
         }
     }
 }
Exemple #3
0
 private void abcKnop_Click(object sender, EventArgs e)
 {
     if (!userInstellingen.SpeelEvent())
     {
         AbcScherm AbcScherm = new AbcScherm(userInstellingen);
         this.Hide();
         AbcScherm.Closed += (s, args) => this.Close();
         AbcScherm.Show();
     }
     else
     {
         EventInSpel eventScherm = new EventInSpel(userInstellingen);
         this.Hide();
         eventScherm.Closed += (s, args) => this.Close();
         eventScherm.Show();
     }
 }