public void addQuestion(Question quest) { if (isQuestionEmpty(quest)) { throw new Exception("bład pytania"); } if (actualQuestionNumber >= quiz.size()) { quiz.add(cleanQuestions()); } quiz[actualQuestionNumber] = quest; }
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"; }