コード例 #1
0
ファイル: wndMain.xaml.cs プロジェクト: remeDans/TalePlayer
        private void Speak_BookmarkReached(object sender, BookmarkReachedEventArgs e)
        {
            int index = int.Parse(e.Bookmark);

            int indexAux = index - 1;

            if (index >= 1)
            {
                borders[indexAux].BorderThickness = new Thickness(6);

                borders[indexAux].Width  = tamPic;
                borders[indexAux].Height = tamPic;
                rows0[indexAux].Height   = new GridLength(tamPic);
                cols0[indexAux].Width    = new GridLength(tamPic);

                textBlocksWord[indexAux].FontSize = fontSize;
                textBlocksWord[indexAux].Width    = tamPic;
            }

            borders[index].BorderThickness = new Thickness(6);

            borders[index].Width  = tamPicHighlighted;
            borders[index].Height = tamPicHighlighted;
            rows0[index].Height   = new GridLength(tamPicHighlighted);
            cols0[index].Width    = new GridLength(tamPicHighlighted);

            textBlocksWord[index].FontSize = fontSize + 2;
            textBlocksWord[index].Width    = tamPicHighlighted;
        }
コード例 #2
0
        protected virtual void LaunchBookmarkReached(BookmarkReachedEventArgs e)
        {
            EventHandler <BookmarkReachedEventArgs> Handler = BookmarkReached;

            // Evento será nulo si no hay suscriptores
            if (Handler != null)
            {
                // Lanzar el evento.
                Handler(this, e);
            }
        }
コード例 #3
0
 /// <summary>
 /// Event handler for bookmark reached. Completion of
 /// an async text to speech
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="e">event args</param>
 private void speechSynthesizer_BookmarkReached(object sender, BookmarkReachedEventArgs e)
 {
     try
     {
         int bookmark = Convert.ToInt32(e.Bookmark);
         notifyBookmarkReached(bookmark);
     }
     catch (Exception ex)
     {
         Log.Debug("Invalid bookmark " + e.Bookmark);
     }
 }
コード例 #4
0
        private void Synth_BookmarkReached(object sender, BookmarkReachedEventArgs e)
        {
            //if (e.Bookmark != " ")
            //{
            LaunchBookmarkReached(e);
            //synth.Volume = 100;

            /*}
             * else
             * {
             *  synth.Volume = 20;
             * }*/
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BookmarkReachedEventData"/> class.
 /// </summary>
 /// <param name="e">
 /// The event args from the System.Speech.Synthesis.SpeechSynthesizer.BookmarkReached event.
 /// </param>
 public BookmarkReachedEventData(BookmarkReachedEventArgs e)
 {
     this.Bookmark      = e.Bookmark;
     this.AudioPosition = e.AudioPosition;
 }
コード例 #6
0
        private void OnBookmarkReached(object sender, BookmarkReachedEventArgs e)
        {
            var time = this.pipeline.GetCurrentTime();

            this.BookmarkReached.Post(new BookmarkReachedEventData(e), time);
        }
コード例 #7
0
 private void Bookmark(object sender, BookmarkReachedEventArgs args)
 {
     Bookmark(args.Bookmark);
 }
コード例 #8
0
 void _synth_BookmarkReached(object sender, BookmarkReachedEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine(e.ToString());
 }
コード例 #9
0
ファイル: SAPIEngine.cs プロジェクト: nbsrujan/acat
 /// <summary>
 /// Event handler for bookmark reached. Completion of
 /// an async text to speech
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="e">event args</param>
 private void speechSynthesizer_BookmarkReached(object sender, BookmarkReachedEventArgs e)
 {
     try
     {
         int bookmark = Convert.ToInt32(e.Bookmark);
         notifyBookmarkReached(bookmark);
     }
     catch (Exception ex)
     {
         Log.Debug("Invalid bookmark " + e.Bookmark);
     }
 }
コード例 #10
0
 private void Synth_BookmarkReached(object sender, BookmarkReachedEventArgs e)
 {
     LaunchBookmarkReached(e);
 }