Beispiel #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == a[index[count]]) score++;
     if (count == 9)
     {
         this.Hide();
         result res = new result(id, lvl, score);
         res.ShowDialog();
         this.Close();
     }
     else
     {
         count++;
         label1.Text = "Problem " + count.ToString();
         label2.Text = q[count];
         textBox1.Text = "";
     }
 }
Beispiel #2
0
 // USers next junp to task  //
 private void nextBtn_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == userAnswer[index[count]]) score++;
     if (count == N-1)
     {
         this.Hide();
         result res = new result(id, lvl, score, N);
         res.ShowDialog();
         this.Close();
     }
     else
     {
         count++;
         label1.Text = "Problem " + count.ToString();
         label2.Text = userQuestion[count];
         textBox1.Text = "";
     }
 }