Beispiel #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            frmCheckAnswer frm = new frmCheckAnswer();

            frm.txtGood.Text = CurrentVraag.txtAntwoord;
            frm.txtYour.Text = txtAntwoord.Text;
            DialogResult result = frm.ShowDialog(this);

            if (result == DialogResult.Yes)
            {
                if (!tryAgain)
                {
                    totalGood++;
                    toolStripAmountGood.Text = totalGood.ToString();
                }
                setNextQuestion();
            }
            else if (result == DialogResult.No)
            {
                if (!tryAgain)
                {
                    totalWrong++;
                    toolStripAmountWrong.Text = totalWrong.ToString();
                    tryAgain = true;
                }
                txtAntwoord.Text = "";
                txtAntwoord.Focus();
                toolStripAmountWrong.Text = totalWrong.ToString();
            }
        }
Beispiel #2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     frmCheckAnswer frm = new frmCheckAnswer();
     frm.txtGood.Text = CurrentVraag.txtAntwoord;
     frm.txtYour.Text = txtAntwoord.Text;
     DialogResult result = frm.ShowDialog(this);
     if (result == DialogResult.Yes)
     {
         if (!tryAgain)
         {
             totalGood++;
             toolStripAmountGood.Text = totalGood.ToString();
         }
         setNextQuestion();
     }
     else if( result == DialogResult.No )
     {
         if (!tryAgain)
         {
             totalWrong++;
             toolStripAmountWrong.Text = totalWrong.ToString();
             tryAgain = true;
         }
         txtAntwoord.Text = "";
         txtAntwoord.Focus();
         toolStripAmountWrong.Text = totalWrong.ToString();
     }
 }