private void Add_Click(object sender, RoutedEventArgs e) { string quizID; quizID = QuizIDTextBox.Text; if (QuizIDTextBox.Text != "") { if (!QuizzardClass.QuizExists(quizID)) { bool inOrder; inOrder = false; if (ShuffleChk.IsChecked ?? false) { inOrder = true; } mul.QuizID = quizID; mul.IsInOrder = inOrder; QuizzardClass.AddMultipleChoice(mul, uName); MainMenu Menu = new MainMenu(uName); Menu.Show(); this.Close(); Menu = null; mul = null; } else { Status.Text = "ID already exists. Please enter another ID:"; } } else { Status.Text = "Fill in the details."; } }
private void Add_Click(object sender, RoutedEventArgs e) { string quizID; quizID = QuizIDTextBox.Text; if (QuizIDTextBox.Text != "") { if (!QuizzardClass.QuizExists(quizID)) { bool inOrder, hintEnabled, alternateAnswersEnabled, caseSensitive; inOrder = hintEnabled = alternateAnswersEnabled = caseSensitive = false; if (CaseSenChk.IsChecked ?? false) { caseSensitive = true; } if (HintChk.IsChecked ?? false) { hintEnabled = true; } if (AltAnsChk.IsChecked ?? false) { alternateAnswersEnabled = true; } if (ShuffleChk.IsChecked ?? false) { inOrder = true; } iden.QuizID = quizID; iden.IsInOrder = inOrder; iden.IsHintEnabled = hintEnabled; iden.IsAlternateAnswersEnabled = alternateAnswersEnabled; iden.IsCaseSensitive = caseSensitive; QuizzardClass.AddIdentification(iden, uName); MainMenu Menu = new MainMenu(uName); Menu.Show(); this.Close(); Menu = null; iden = null; } else { Status.Text = "ID already exists. Please enter another ID:"; } } else { Status.Text = "Fill in the details."; } }
private void Add_Click(object sender, RoutedEventArgs e) { string quizID; quizID = QuizIDTextBox.Text; if (QuizIDTextBox.Text != "") { if (!QuizzardClass.QuizExists(quizID)) { bool inOrder, caseSensitive; inOrder = caseSensitive = false; if (CaseSenChk.IsChecked ?? false) { caseSensitive = true; } if (ShuffleChk.IsChecked ?? false) { inOrder = true; } enu.QuizID = quizID; enu.IsInOrder = inOrder; enu.IsCaseSensitive = caseSensitive; QuizzardClass.AddEnumeration(enu, uName); MainMenu Menu = new MainMenu(uName); Menu.Show(); this.Close(); Menu = null; enu = null; } else { Status.Text = "ID already exists. Please enter another ID:"; } } Status.Text = "Fill in the details."; }