コード例 #1
0
 public void StartTest()
 {
     Shuffle(questions.QuestionsList);
     currentQuesIndex = 0;
     if (questions.QuestionsList.Count > 0)
     {
         CallBackMy.ShowQuestionEventHendler(questions.QuestionsList[currentQuesIndex], currentQuesIndex + 1, (QuestionLimit > questions.QuestionsList.Count ? questions.QuestionsList.Count : QuestionLimit));
     }
 }
コード例 #2
0
 public void Next()
 {
     currentQuesIndex += 1;
     if (currentQuesIndex < questions.QuestionsList.Count && currentQuesIndex < QuestionLimit)
     {
         if (CallBackMy.ShowQuestionEventHendler != null)
         {
             CallBackMy.ShowQuestionEventHendler(questions.QuestionsList[currentQuesIndex], currentQuesIndex + 1, (QuestionLimit > questions.QuestionsList.Count?questions.QuestionsList.Count:QuestionLimit));
         }
     }
     else
     {
         if (CallBackMy.ShowTestResult != null)
         {
             CallBackMy.ShowTestResult(Student.Name, Student.Group, ValidAnswer, (QuestionLimit > questions.QuestionsList.Count ? questions.QuestionsList.Count : QuestionLimit) - ValidAnswer);
         }
     }
 }