Пример #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 q2Next_button_Click(object sender, EventArgs e)
        {
            foreach (RadioButton option in q2Options_groupBox.Controls.OfType <RadioButton>()) // iterate through the radio buttons in the group box
            {
                if (option.Checked)
                {
                    q2Choice = option.Text;
                }
            }
            // close current form
            this.Close();
            // close current form and go to question 3 form
            Question3_Form q3_form = new Question3_Form(referenceMain);

            q3_form.Show();
        }