Example #1
0
        private void getCurrentInfo()
        {
            mainForm       main   = new mainForm();
            Question1_Form q1Form = new Question1_Form(referenceMain);
            Question2_Form q2Form = new Question2_Form(referenceMain);
            Question3_Form q3Form = new Question3_Form(referenceMain);

            courseCode      = main.courseCode;
            currentSemester = main.currentSemester.ToString();
            profName        = main.profName;
            q1_answer       = q1Form.Q1_Answer;
            q2_answer       = q2Form.Q2_Answer;
            q3_answer       = q3Form.Q3_Answer;
        }
        private void q1Next_button_Click(object sender, EventArgs e)
        {
            foreach (RadioButton option in q1Options_groupBox.Controls.OfType <RadioButton>()) // iterate through the radio buttons in the group box
            {
                if (option.Checked)
                {
                    q1Choice = option.Text;
                }
            }
            // close current form
            this.Close();
            // create question 2 form and show it
            Question2_Form q2_form = new Question2_Form(referenceMain);

            q2_form.Show();
        }