Example #1
0
 private void btnPlay_Click(object sender, EventArgs e)
 {
     if (_current != null && !_current.IsStopped())
     {
         MessageBox.Show("Trình phát giọng nói vẫn đang chạy!", "Lỗi", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
         return;
     }
     if (_current != null)
     {
         _current.Stop();
     }
     _current = chkVietnamese.Checked ? new Factory().MakeVNSpeech(txtContent.Text) : new Factory().MakeLocal(txtContent.Text);
     _current.Speak();
 }