private void AllReadersResume() { if (ReaderOriginal.State == SynthesizerState.Paused) { ReaderOriginal.Resume(); } }
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); } }
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; }
private void AllReadersDispose() { ReaderOriginal.Dispose(); ReaderOriginal = new SpeechSynthesizer(); }