Exemple #1
0
        private void ExecuteSpeechOrder(string SRecoResult)
        {
            string def    = "def";
            string answer = m_DBManager.GetAnswer(SRecoResult, def);

            if (answer != def)
            {
                SRecoManager.Speak(answer);
            }
            //唱歌
            answer = m_DBManager.GetAnswer("NAME_SONG", SRecoResult, def);
            if (answer != def)
            {
                if (thread_song != null)
                {
                    thread_song.Abort();
                }
                else
                {
                    //thread_song = new Thread(new ThreadStart(PlaySound1));
                    name_song = answer;
                    //thread_song.Start();
                    DllManager.PlaySound(name_song, 0, 0x0001);
                }
            }
            else
            {
//                 if (thread_song!=null)
//                 {
                //thread_song.Abort();
                name_song = null;
                DllManager.PlaySound(name_song, 0, 0x0001);
                /* }   */
            }
        }
Exemple #2
0
 private void 唱首歌ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DllManager.PlaySound(@"D:\人机交互\音乐\范玮琪-一个像夏天 一个像秋天.wav", 0, 1);
 }
Exemple #3
0
 private void PlaySound1()
 {
     DllManager.PlaySound(name_song, 0, 0x0001);
     //PlaySound(null, 0, 0);
     MessageBox.Show("没有播放歌曲吧!");
 }