Exemplo n.º 1
0
 private void Initialize()
 {
     if (!File.Exists(GifSource))
     {
         this.Source = GlobalVariable.DefaultBigImage;
     }
     else
     {
         gif = new Gif(this.GifSource);
         var decoder = gif.GetDecoder();
         _animation = new Int32Animation(0, decoder.Frames.Count - 1, gif.GetTotalDuration());
         _animation.RepeatBehavior = RepeatBehavior.Forever;
         this.Source    = null;
         this.Source    = gif.GetFirstFrame();
         _isInitialized = true;
     }
 }