Advertisement
Alisator

button check

May 15th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.95 KB | None | 0 0
  1.  private void submitbtnMath1_click(object sender, EventArgs e)
  2.         {
  3.             //submit button check if all answers are filled and save users anwers to answer lists
  4.             //clear canvas and create new level
  5.             submitBtnboolMath1 = true;
  6.             String missingAnswer = "";
  7.             for (int i = 0; i < countOfEquations; i++)
  8.             {
  9.                 if (arrayTextBox[i, 4].Text == "")
  10.                 {
  11.                     missingAnswer += (i + 1) + " ";
  12.                 }
  13.                 else
  14.                 {
  15.                     //save answers from user
  16.                 }
  17.             }
  18.             if (missingAnswer != "")
  19.             {
  20.                 MessageBox.Show("Nevyplnili jste " + missingAnswer);
  21.             }
  22.             else
  23.             {
  24.                 //clear canvas after check all textboxes are filled
  25.                 taskGUIItems[EnumNumber.First].canvas.Children.Clear();
  26.             }
  27.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement