Beispiel #1
0
 private static void GifSourcePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
 {
     try
     {
         AVGifPlayer gifPlayer = sender as AVGifPlayer;
         gifPlayer.InitializeGif();
     }
     catch { }
 }
Beispiel #2
0
 private static void FrameIndexPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs ev)
 {
     try
     {
         AVGifPlayer gifPlayer = sender as AVGifPlayer;
         gifPlayer.Source = gifPlayer.vGifDecoder.Frames[(int)ev.NewValue];
     }
     catch { }
 }
Beispiel #3
0
 private static void AutoStartPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
 {
     try
     {
         if ((bool)e.NewValue)
         {
             AVGifPlayer gifPlayer = sender as AVGifPlayer;
             gifPlayer.StartAnimation();
         }
     }
     catch { }
 }
Beispiel #4
0
 private static void SpeedRatioPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
 {
     try
     {
         AVGifPlayer gifPlayer = sender as AVGifPlayer;
         if (gifPlayer.vInt32Animation != null)
         {
             gifPlayer.vInt32Animation.SpeedRatio = (double)e.NewValue;
             if (gifPlayer.vAnimating)
             {
                 gifPlayer.StopAnimation();
                 gifPlayer.StartAnimation();
             }
         }
     }
     catch { }
 }