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)); } }
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); } } }