Example #1
0
        private void OnAnimationNotify(IAdornerAnimation sender, AdornerAnimationNotification eventArg)
        {
            if (!this.ShouldNotify())
            {
                return;
            }
            AdornerAnimation adornerAnimation = (AdornerAnimation)sender;

            if (eventArg == AdornerAnimationNotification.AnimationComplete)
            {
                adornerAnimation.Stop();
                adornerAnimation.AnimationEventHandlers -= new Action <IAdornerAnimation, AdornerAnimationNotification>(this.OnAnimationNotify);
                this.activeAnimations.Remove(adornerAnimation);
                adornerAnimation.Dispose();
            }
            else
            {
                if (eventArg != AdornerAnimationNotification.AnimationTick)
                {
                    return;
                }
                this.InvalidateRender();
                this.Update();
            }
        }
Example #2
0
 public void Notify(AdornerAnimationNotification notification)
 {
     if (this.animationEventHandlers == null)
     {
         return;
     }
     this.animationEventHandlers((IAdornerAnimation)this, notification);
 }