Пример #1
0
        //Update the TTS progress.
        private void TTSProgress(Request request, TTSProgressEventArgs.ProgressType type)
        {
            TTSProgressEventArgs args = new TTSProgressEventArgs();

            args.request = request;
            args.type    = type;
            RaiseProgressEvent(args);
        }
Пример #2
0
        protected virtual void RaiseProgressEvent(TTSProgressEventArgs e)
        {
            TTSProgressEventHandler handler = ttsProgressEventHandler;

            if (handler != null)
            {
                handler(this, e);
            }
        }
 private void TTSProgress(Object sender, TTSProgressEventArgs e)
 {
     //Console.WriteLine(e.request.ChapterTitle + " complete.");
     if (e.type == TTSProgressEventArgs.ProgressType.RequestComplete)
     {
         NovelLibrary.Instance.GetNovel(e.request.Chapter.NovelTitle).FinishRequest(e.request.Chapter);
     }
     else if (e.type == TTSProgressEventArgs.ProgressType.RequestRemoved)
     {
         NovelLibrary.Instance.GetNovel(e.request.Chapter.NovelTitle).FinishRequest(e.request.Chapter);
     }
 }