コード例 #1
0
 protected virtual void CheckAnswer() //sprawdzenie odpowiedzi
 {
     if (BuilderText)
     {
         if (language.CheckAnswer(Questions[Index], TextBox.Text))
         {
             Score++;
         }
         else
         {
             Score = Score - 0.5;
         }
     }
     else
     {
         foreach (var x in RadioAnswers)
         {
             if ((bool)x.IsChecked && language.CheckAnswer(Questions[Index], x.Content.ToString()))
             {
                 Score++;
                 return;
             }
         }
         Score = Score - 0.5;
     }
 }