public MakerScreen(string quizDate) { // Call this contructor with a filename to open a quiz for editing // Note: the main functionality here should be moved to the Quiz Class for reueseability InitializeComponent(); isEdit = true; currentlyMakingQuiz = new Quiz(); currentlyMakingQuiz.AddDataFromFile("LocalQuizzes.xml", quizDate); textboxTitle.Text = currentlyMakingQuiz.GetTitle(); for (int i = 0; i < currentlyMakingQuiz.GetNumQuestions(); i++) { listboxQuestions.Items.Add(currentlyMakingQuiz.GetQuestion(i).GetPrompt()); } if (currentlyMakingQuiz.GetNumQuestions() <= 0) { addBlankQuestion(0); } else { listboxQuestions.SelectedIndex = 0; } }
public TakerScreen(string quizDate, Boolean isLocal) { InitializeComponent(); //load the selected quiz into the object if (isLocal) { currentlyTakingQuiz = new Quiz(); currentlyTakingQuiz.AddDataFromFile("LocalQuizzes.xml", quizDate); } else { //not yet implemented } }