예제 #1
0
        private void FormSimulationErrorInfo_Shown(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(_imagePath) && string.IsNullOrEmpty(_flashPath))
            {
                panel1Image.Visible = false;
            }
            else
            {
                panel1Image.Visible = true;
                if (string.IsNullOrEmpty(_imagePath))
                {
                    axShockwaveFlash1.BringToFront();
                    axShockwaveFlash1.Movie = Directory.GetCurrentDirectory() + "\\Flash\\" + Path.GetFileName(_flashPath);

                    axShockwaveFlash1.Rewind();
                    axShockwaveFlash1.Play();
                }
                else
                {
                    pictureBox1.BringToFront();
                    pictureBox1.Image = Image.FromFile(Directory.GetCurrentDirectory() + "\\Images\\" + Path.GetFileName(_imagePath));
                }
            }

            //TODO:阅读技巧
            VoiceHelper _voiceHelper = VoiceHelper.getVoiceHelper();
            string      info         = labelNormalNotice.Text.ToString();

            System.Threading.Thread td = new System.Threading.Thread(() => {
                _voiceHelper = VoiceHelper.getVoiceHelper();
                _voiceHelper.Speeker(info);
            });
            td.IsBackground = true;
            //td.Start();
        }
예제 #2
0
        static public VoiceHelper getVoiceHelper()
        {
            if (g_VoiceHelper == null)
            {
                g_VoiceHelper = new VoiceHelper();
                g_VoiceHelper.Init();
            }

            return(g_VoiceHelper);
        }
예제 #3
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();
        }
예제 #4
0
 public void Uninit()
 {
     Uninitialize();
     g_VoiceHelper = null;
 }
 public FormSkillTrain()
 {
     InitializeComponent();
     _voiceHelper = VoiceHelper.getVoiceHelper();
 }