예제 #1
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            //加载题目


            //生成答题框
            m_formSimulation = new FormSimulation();
            Thread FormThread = new Thread(() =>
            {
                m_formSimulation.GenControlsOfQuestions(100);
                // MessageBox.Show("生成控件完成");
            });

            FormThread.Start();

            if (0 == SystemConfig.GetUserType())
            {
                imageButtonMoudle.Visible   = false;
                imageButtonProblems.Visible = false;
                imageButtonSkill.Visible    = false;
            }
            else
            {
                imageButtonMoudle.Visible   = true;
                imageButtonProblems.Visible = true;
                imageButtonSkill.Visible    = true;
            }


            Thread VoiceThread = new Thread(() =>
            {
                VoiceHelper _voiceHelper = VoiceHelper.getVoiceHelper();
                //MessageBox.Show("加载声音组件完成");
            });

            VoiceThread.Start();

            Thread LicenceThread = new Thread(() =>
            {
                LicenseHelper.GetCpuId();
                LicenseHelper.GetLinceseInfo();
                //MessageBox.Show("获取授权信息完成");
            });

            LicenceThread.Start();

            btnHome.PerformClick();
        }
예제 #2
0
        private void FormLicence_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(LicenseHelper.ComputerGUID))
            {
                LicenseHelper.GetCpuId();
            }

            //richTextBoxLicense.Text = FileHelper.ReadTextFile("license.dat");
            textBoxCupId.Text  = LicenseHelper.ComputerGUID;
            txtBoxLicence.Text = FileHelper.ReadTextFile("license.dat");

            if (LicenseHelper.IsValid() == true)
            {
                labelInfo.ForeColor = Color.Green;
                labelInfo.Text      = "授权信息正常";
            }
            else
            {
                labelInfo.ForeColor = Color.DarkRed;
                labelInfo.Text      = "授权信息验证失败";
            }
        }