コード例 #1
0
 private void AllReadersResume()
 {
     if (ReaderOriginal.State == SynthesizerState.Paused)
     {
         ReaderOriginal.Resume();
     }
 }
コード例 #2
0
 private void AllReadersPause()
 {
     try
     {
         if (ReaderOriginal.State == SynthesizerState.Speaking)
         {
             ReaderOriginal.Pause();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(Form1.Massage(ex), Globals.ERR, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #3
0
        private void AllReadersSpeakAsynk()
        {
            AllReadersLoadVoice();
            setStopPauseEnabled();

            if (!string.IsNullOrEmpty(richTextBoxOriginal.Text))
            {
                ReaderOriginal.SpeakAsync(richTextBoxOriginal.Text);
                ReaderOriginal.Pause();
                ReaderOriginal.SpeakCompleted += ReaderSpeakCompleted;
                ReaderOriginal.SpeakProgress  += SpeakProgresser;
            }

            AllReadersLoadSettings();
            AllReadersResume();

            GetRealTextDivideTextByPhrase();
            DividerAllTexts();

            buttonPlay.Enabled = false;
        }
コード例 #4
0
 private void AllReadersDispose()
 {
     ReaderOriginal.Dispose();
     ReaderOriginal = new SpeechSynthesizer();
 }