public virtual void StartAnimation() { IAnimatedItem animItem = this; if (OwnerEdit == null || OwnerEdit.IsDesignMode || animItem.FramesCount < 2) { return; } XtraAnimator.Current.AddEditorAnimation(null, this, animItem, new CustomAnimationInvoker(OnImageAnimation)); }
protected virtual void OnImageAnimation(BaseAnimationInfo animInfo) { IAnimatedItem animItem = this; EditorAnimationInfo info = animInfo as EditorAnimationInfo; if (Image == null || OwnerEdit == null || info == null) { return; } if (!info.IsFinalFrame) { Image.SelectActiveFrame(FrameDimension.Time, info.CurrentFrame); OwnerEdit.Invalidate(animItem.AnimationBounds); } else { StopAnimation(); StartAnimation(); } }