/// <summary>
    /// Display corresponding question
    /// </summary>
    private void DisplayQuestion()
    {
        UserCreatedQuestion q = createLevelBL.GetQuestion(GetQuestionNumber());

        questionTitleLine.SetText(q.QuestionTitle);
        option1Line.SetText(q.Option1);
        option2Line.SetText(q.Option2);
        option3Line.SetText(q.Option3);
        option4Line.SetText(q.Option4);

        switch (q.CorrectOption)
        {
        case 1:
            checkbox1.SetPressed(true);
            break;

        case 2:
            checkbox2.SetPressed(true);
            break;

        case 3:
            checkbox3.SetPressed(true);
            break;

        case 4:
            checkbox4.SetPressed(true);
            break;
        }
    }
Beispiel #2
0
    /// <summary>
    /// Restore orignal question
    /// </summary>
    private void _on_RestoreOriginal_pressed()
    {
        List <UserCreatedQuestion> OriginalQuestionList = editLevelBL.GetOrignalQuestionList();
        UserCreatedQuestion        q = OriginalQuestionList[GetQuestionNumber() - 1];

        questionTitleLine.SetText(q.QuestionTitle);
        option1Line.SetText(q.Option1);
        option2Line.SetText(q.Option2);
        option3Line.SetText(q.Option3);
        option4Line.SetText(q.Option4);

        switch (q.CorrectOption)
        {
        case 1:
            checkbox1.SetPressed(true);
            break;

        case 2:
            checkbox2.SetPressed(true);
            break;

        case 3:
            checkbox3.SetPressed(true);
            break;

        case 4:
            checkbox4.SetPressed(true);
            break;
        }
    }