예제 #1
0
        //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();
                }
            }
        }
예제 #2
0
        private void letterSpelKnop_Click(object sender, EventArgs e)
        {
            AbcLetterScherm scherm = new AbcLetterScherm(userInstellingen);

            this.Hide();
            scherm.Closed += (s, args) => this.Close();
            scherm.Show();
        }