예제 #1
0
        private void next_btn_Click(object sender, EventArgs e)
        {
            checkbox_test();

            if (Form1.grade == "1")
            {
                _1_problems problems = new _1_problems();
                problems.problems_list = problem_list;
                problems.name          = Form1.username;
                problems.Show();
                this.Close();
            }
        }
예제 #2
0
        private void next_btn_Click(object sender, EventArgs e)
        {
            if (checkBox1.Checked == false &&
                checkBox2.Checked == false &&
                checkBox3.Checked == false &&
                checkBox4.Checked == false &&
                checkBox5.Checked == false &&
                checkBox6.Checked == false &&
                checkBox7.Checked == false &&
                checkBox8.Checked == false)
            {
                MessageBox.Show("No problems selected." + Environment.NewLine + "Please select at least 1 problem.");
            }
            else
            {
                background_info back = new background_info();
                back.lesons = problem_list;
                if (Form1.grade == "1")
                {
                    checkbox_test();
                    _1_problems prob_1 = new _1_problems();
                    _2_problems prob_2 = new _2_problems();
                    _3_problems prob_3 = new _3_problems();
                    _4_problems prob_4 = new _4_problems();
                    _5_problems prob_5 = new _5_problems();
                    k_problems  prob_k = new k_problems();



                    prob_1.problem_list = problem_list;
                    prob_1.name         = Form1.username;

                    if (problem_list.Count == 0)
                    {
                        return;
                    }

                    prob_1.Show();
                    prob_2.Close();
                    prob_3.Close();
                    prob_4.Close();
                    prob_5.Close();
                    prob_k.Close();
                    this.Close();
                }
                else if (Form1.grade == "2")
                {
                    checkbox_test();
                    _1_problems prob_1 = new _1_problems();
                    _2_problems prob_2 = new _2_problems();
                    _3_problems prob_3 = new _3_problems();
                    _4_problems prob_4 = new _4_problems();
                    _5_problems prob_5 = new _5_problems();
                    k_problems  prob_k = new k_problems();

                    prob_2.problem_list = problem_list;
                    if (problem_list.Count == 0)
                    {
                        return;
                    }

                    prob_2.name = Form1.username;
                    prob_1.Close();
                    prob_2.Show();
                    prob_3.Close();
                    prob_4.Close();
                    prob_5.Close();
                    prob_k.Close();

                    this.Close();
                }
                else if (Form1.grade == "3")
                {
                    checkbox_test();
                    _1_problems prob_1 = new _1_problems();
                    _2_problems prob_2 = new _2_problems();
                    _3_problems prob_3 = new _3_problems();
                    _4_problems prob_4 = new _4_problems();
                    _5_problems prob_5 = new _5_problems();
                    k_problems  prob_k = new k_problems();

                    prob_3.problem_list = problem_list;

                    if (problem_list.Count == 0)
                    {
                        return;
                    }

                    prob_3.name = Form1.username;
                    prob_1.Close();
                    prob_2.Close();
                    prob_3.Show();
                    prob_4.Close();
                    prob_5.Close();
                    prob_k.Close();

                    this.Close();
                }
                else if (Form1.grade == "4")
                {
                    checkbox_test();
                    _1_problems prob_1 = new _1_problems();
                    _2_problems prob_2 = new _2_problems();
                    _3_problems prob_3 = new _3_problems();
                    _4_problems prob_4 = new _4_problems();
                    _5_problems prob_5 = new _5_problems();
                    k_problems  prob_k = new k_problems();

                    prob_4.problem_list = problem_list;

                    if (problem_list.Count == 0)
                    {
                        return;
                    }

                    prob_4.name = Form1.username;
                    prob_1.Close();
                    prob_2.Close();
                    prob_3.Close();
                    prob_4.Show();
                    prob_5.Close();
                    prob_k.Close();

                    this.Close();
                }
                else if (Form1.grade == "5")
                {
                    checkbox_test();
                    _1_problems prob_1 = new _1_problems();
                    _2_problems prob_2 = new _2_problems();
                    _3_problems prob_3 = new _3_problems();
                    _4_problems prob_4 = new _4_problems();
                    _5_problems prob_5 = new _5_problems();
                    k_problems  prob_k = new k_problems();

                    prob_5.problem_list = problem_list;

                    if (problem_list.Count == 0)
                    {
                        return;
                    }

                    prob_5.name = Form1.username;
                    prob_1.Close();
                    prob_2.Close();
                    prob_3.Close();
                    prob_4.Close();
                    prob_5.Show();
                    prob_k.Close();

                    this.Close();
                }
                else if (Form1.grade == "K")
                {
                    checkbox_test();
                    _1_problems prob_1 = new _1_problems();
                    _2_problems prob_2 = new _2_problems();
                    _3_problems prob_3 = new _3_problems();
                    _4_problems prob_4 = new _4_problems();
                    _5_problems prob_5 = new _5_problems();
                    k_problems  prob_k = new k_problems();

                    prob_k.problem_list = problem_list;

                    if (problem_list.Count == 0)
                    {
                        return;
                    }

                    prob_k.name = Form1.username;
                    prob_1.Close();
                    prob_2.Close();
                    prob_3.Close();
                    prob_4.Close();
                    prob_5.Close();
                    prob_k.Show();
                    this.Close();
                }
            }
        }