Exemple #1
0
        private void btnStart_Click_1(object sender, EventArgs e)
        {
            if (cbxNameExams.selectedIndex == -1)
            {
                MessBox.Warning("Not selected Name Exams !! Please Select "); return;
            }
            ;
            if (stringToInt(cbxSelectNumExams.Text) <= 0)
            {
                MessBox.Warning("Invalid Number Question !! "); return;
            }
            if (stringToInt(cbxTimes.Text) <= 0 && !cbxTimes.Text.Equals("None"))
            {
                MessBox.Warning("Invalid Times/Number Question !! "); return;
            }
            if (!QA.getInstance().setQuestions(stringToInt(cbxSelectNumExams.Text), examsCode[cbxNameExams.selectedIndex], stringToInt(cbxTimes.Text)))
            {
                return;
            }

            //Hide and show form beginner
            this.Hide();
            using (var form = new StartForm())
            {
                form.ShowDialog();
            }
            this.Show();
        }
Exemple #2
0
 public ResultQs(StartForm parent)
 {
     this.parentForm = parent;
     InitializeComponent();
 }