private void OnIndexReached(int index)
{
Log.Debug("OnIndexReached() - index=" + index.ToString());
switch (Mode)
{
case SpeechMode.All:
if (isLastSentence(_lastSentenceSpoken) &&
Common.AppPreferences.LectureManagerSpeakAllParagraphPause > 0)
{
Invoke(new MethodInvoker(delegate()
{
_speakAllParagraphTimer.Interval = Common.AppPreferences.LectureManagerSpeakAllParagraphPause;
_speakAllParagraphTimer.Start();
}));
}
else
{
ProcessNextSpeakAllSentence();
}
break;
case SpeechMode.Paragraph:
Log.Debug("OnIndexReached() - currentState=" + Mode.ToString());
Log.Debug(" now continuing with next sentence...");
ProcessNextSpeakParagraphSentence();
break;
case SpeechMode.Sentence:
Speaking = false;
break;
}
}