예제 #1
0
        private void buttonSkill_Click(object sender, EventArgs e)
        {
            if (activeFrom != null)
            {
                Type classType = activeFrom.GetType();

                if (classType.Name == "FormSkillTrain")
                {
                    return;
                }

                activeFrom.Close();
            }


            FormLicence licence = new FormLicence();

            licence.ShowDialog();

            FormSkillTrain newForm = new FormSkillTrain();

            newForm.TopLevel = false;
            newForm.BringToFront();
            newForm.Dock = DockStyle.Fill;

            panelMain.Controls.Add(newForm);

            activeFrom = newForm;

            newForm.Show();
        }
        private void btnRadom_Click(object sender, EventArgs e)
        {
            FormSimulation _simulaForm = FormMain.m_formSimulation;

            //List<Question> list = QuestionManager.GenQuestionBySkill(g_ChapterId);
            //List<Question> list = QuestionManager.GenQuestionFromRelation(g_ChapterInfo, g_Relation_Question_List);
            List <Question> list = new List <Question>();

            if (g_ChapterInfo.ChapterType == 3)
            {
                list = QuestionManager.GetErrorQuestionFromDB(g_ChapterInfo);
            }
            else
            {
                list = QuestionManager.GetQuestionsFromDB(g_ChapterInfo.ID);
            }

            if (g_ChapterInfo.ID != g_FirstChapterId)
            {
                if (!LicenseHelper.IsValid())
                {
                    if (DialogResult.Yes == MessageBox.Show("此章节需要升级为授权用户用方能使用,是否打开授权界面?", "授权提示", MessageBoxButtons.YesNo))
                    {
                        FormLicence form = new FormLicence();
                        form.ShowDialog();
                        if (!LicenseHelper.IsValid())
                        {
                            return;
                        }
                    }
                    else
                    {
                        return;
                    }
                }
            }


            int count = list.Count;

            if (count == 0)
            {
                MessageBox.Show("此章节下面没绑定题目,请重新选择!", "提示信息", MessageBoxButtons.OK);
                return;
            }

            _simulaForm.SetQuestions(list);

            _simulaForm.SetShowType(1);
            _simulaForm.ResetControlsInfo(Math.Min(count, 100));


            _simulaForm.Show();
        }
예제 #3
0
        private void btnSequence_Click(object sender, EventArgs e)
        {
            FormSimulation  _simulaForm = FormMain.m_formSimulation;
            List <Question> list        = QuestionManager.GenQuestionByBankId(BankId);

            //if (BankId != firstBankId)
            if (true)
            {
                if (!LicenseHelper.IsValid())
                {
                    if (DialogResult.Yes == MessageBox.Show("此套题练习功能需要升级为授权用户用方能使用,是否打开授权界面?", "授权提示", MessageBoxButtons.YesNo))
                    {
                        FormLicence form = new FormLicence();
                        form.ShowDialog();
                        if (!LicenseHelper.IsValid())
                        {
                            return;
                        }
                    }
                    else
                    {
                        return;
                    }
                }
            }


            int count = list.Count;

            if (count == 0)
            {
                MessageBox.Show("此套题下面没绑定题目,请重新选择!", "提示信息", MessageBoxButtons.OK);
                return;
            }

            list.Sort();
            _simulaForm.SetQuestions(list, false);

            _simulaForm.SetShowType(2);
            _simulaForm.ResetControlsInfo(Math.Min(count, 100));


            _simulaForm.Show();
        }
예제 #4
0
        private void btnVip_Click(object sender, EventArgs e)
        {
            FormLicence form = new FormLicence();

            form.ShowDialog();
        }
예제 #5
0
        private void richTextBox6_MouseClick(object sender, MouseEventArgs e)
        {
            FormLicence form = new FormLicence();

            form.ShowDialog();
        }