private void DifficultyTypeComboBox_SelectedIndexChanged_1(object sender, EventArgs e) { //Changes the contents of the difficulty combo box based upon which option the user selects DifficultyCheckBox.Show(); if (DifficultyTypeComboBox.SelectedItem.ToString() == "Pre-defined Difficulty Setting") { selectedmode = 1; DifficultyCheckBox.Items.Clear(); DifficultyCheckBox.Items.Add("1"); DifficultyCheckBox.Items.Add("2"); DifficultyCheckBox.Items.Add("3"); DifficultyCheckBox.Height = 49; } else if (DifficultyTypeComboBox.SelectedItem.ToString() == "Machine Generated Difficulty Setting") { selectedmode = 2; DifficultyCheckBox.Items.Clear(); DifficultyCheckBox.Items.Add("Advanced"); DifficultyCheckBox.Items.Add("Hard"); DifficultyCheckBox.Items.Add("Average"); DifficultyCheckBox.Items.Add("Easy"); DifficultyCheckBox.Height = 64; } else { selectedmode = 0; DifficultyCheckBox.Hide(); } }
bool formclosing = false; //A boolean used to hold if the form is closing or not. public GenerateQuizManual() { InitializeComponent(); QuestionClass qc = new QuestionClass(); AllQuestions = qc.LoadAllQuestions(); //Loads the questions from the SQL database QuestionListBox.DataSource = AllQuestions; //Adds the questions to the question list box QuestionListBox.DisplayMember = "DisplayItem"; QuestionHeaderLabel.Hide(); AnswerHeaderLabel.Hide(); DifficultyCheckBox.Hide(); //Sets the question to hide the empty question details }
public ViewAllQuestionsForm() { InitializeComponent(); DifficultyCheckBox.Hide(); QuestionClass qc = new QuestionClass(); //All of the questions are loaded from the class and are used as a base to refer to AllQuestions = qc.LoadAllQuestions(); QuestionListBox.DataSource = AllQuestions; QuestionListBox.DisplayMember = "DisplayItem"; QuestionHeaderLabel.Hide(); AnswerHeaderLabel.Hide(); //Sets the question to hide the empty question details }
bool formclosing = false; //A boolean used to hold if the form is closing or not. public AutoCreateForm() { InitializeComponent(); DifficultyCheckBox.Hide(); }