private void NextButton_Click(object sender, EventArgs e)
        {
            // controleren of invoer goed is.
            // zo ja naar de volgende woord.


            try
            {
                Translates listboxitem = (Translates)alltranslates[count];

                if (exerciseTextBox.Text == listboxitem.German)
                {
                    MessageBox.Show("Het antwoord is goed");
                    count++;

                    Translates listboxitemtwo = (Translates)alltranslates[count];
                    exerciseLabel.Text = listboxitemtwo.Dutch;
                }
                else
                {
                    MessageBox.Show("Het antwoord is niet goed");
                }
            }
            catch (ArgumentOutOfRangeException)
            {
                MessageBox.Show("Je bent klaar met oefenen.");
            }
        }
Beispiel #2
0
        private void addButton_Click(object sender, EventArgs e)
        {
            Translates translate = new Translates();

            translate.Dutch  = DutchTextBox.Text;
            translate.German = GermanTextBox.Text;

            translateListBox.Items.Add(translate);
        }
        private void ExerciseForm_Load(object sender, EventArgs e)
        {
            Translates listboxitem = (Translates)alltranslates[count];

            exerciseLabel.Text = listboxitem.Dutch;
        }