Ejemplo n.º 1
0
        private void Initialize()
        {
            if (this.GifSource == "")
            {
                return;
            }
            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    = decoder.Frames[0];
            _isInitialized = true;
        }
Ejemplo n.º 2
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;
     }
 }