コード例 #1
0
        private void btn_start_practice_session_Click(object sender, EventArgs e)
        {
            if (lbx_chapter.SelectedIndex == -1)
            {
                my_messagebox m = new my_messagebox("Select Chapter");
                m.ShowDialog();
                //MessageBox.Show("Select Chapter");
                lbx_chapter.Focus();
                goto abc;
            }
            Globle_data.chapter = lbx_chapter.Text;

            if (opt30.Checked == true)
            {
                Globle_data.speed = "30";
            }
            if (opt40.Checked == true)
            {
                Globle_data.speed = "40";
            }



            if (Globle_data.student_selected_language.CompareTo("English") == 0)
            {
                Globle_data.language = "English";
                frm_english_practice eng_prac = new frm_english_practice();
                eng_prac.Show();
                this.Hide();
            }
            if (Globle_data.student_selected_language.CompareTo("Hindi") == 0)
            {
                Globle_data.language = "Hindi";
                frm_hindi_practice hindi_prac = new frm_hindi_practice();
                hindi_prac.Show();
                this.Hide();
            }
            if (Globle_data.student_selected_language.CompareTo("Marathi") == 0)
            {
                Globle_data.language = "Marathi";
                frm_marathi_practice mar_prac = new frm_marathi_practice();
                mar_prac.Show();
                this.Hide();
            }
            if (Globle_data.student_selected_language.CompareTo("number") == 0)
            {
                Globle_data.language = "number";
                typing_project.Numarical.frm_numarical mar_prac = new typing_project.Numarical.frm_numarical();
                mar_prac.Show();
                this.Hide();
            }



            abc :;
        }
コード例 #2
0
        private void btn_logout_Click(object sender, EventArgs e)
        {
            panel4.Hide();
            timer1.Enabled = false;
            my_messagebox msg = new my_messagebox("Session Completed! Click ok to see result");

            msg.ShowDialog();
            timer1.Enabled = false;

            this.Hide();
            typing_project.Student_form.frm_student_option so = new Student_form.frm_student_option();
            so.Show();
            // code_on_close();
            this.Dispose();
        }
コード例 #3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            ts          = ts - 1;
            lblmin.Text = Convert.ToString(ts / 60);
            lblsec.Text = Convert.ToString(ts % 60);
            if (ts == 0)
            {
                timer1.Enabled = false;
                rt2.Enabled    = false;
                my_messagebox m = new my_messagebox("Time Up!");
                m.ShowDialog();

                //MessageBox.Show("Time Up!");

                this.Hide();
            }
        }
コード例 #4
0
        private void rt2_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar != 8)
            {
                try
                {
                    do_work(sender, e);
                }
                catch (Exception ex)
                {
                    timer1.Enabled = false;
                    rt2.Enabled    = false;
                    EndTime        = DateTime.Now.ToLocalTime();
                    my_messagebox msg = new my_messagebox("Session Completed! Click Logout to see result");
                    msg.ShowDialog();
                    timer1.Enabled = false;

                    // this.Hide();
                    //code_on_close();
                    // this.Dispose();
                    //MessageBox.Show("Completed!");
                }
            }
        }