Esempio n. 1
0
 public Question nextQuestion()
 {
     actualQuestionNumber++;
     if (quiz.size() <= actualQuestionNumber)
     {
         return(this.cleanQuestions());
     }
     return(quiz[actualQuestionNumber]);
 }
Esempio n. 2
0
 public void loadQuiz(string path)
 {
     using (StreamReader sr = new StreamReader(path))
     {
         // Read the stream to a string, and write the string to the console.
         String line = sr.ReadToEnd();
         quiz.deserialize(line);
         answers = new Quizz("");
         for (int i = 0; i < quiz.size(); i++)
         {
             answers.add(new Question(""));
         }
     }
     isInit           = true;
     secondActionText = "End";
 }