Ejemplo n.º 1
0
        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
        }
Ejemplo n.º 2
0
        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
        }