/// <summary> /// Initializes a new instance of the Animation class. /// </summary> /// <param name="target">Target object for animation</param> /// <param name="targetPropertyName">Target property name for animation</param> public Animation(AnimationRequest[] animationRequests, AnimationEasing animationEasing, int animationDuration) { if (animationRequests != null && animationRequests.Length > 0) _AnimationList.AddRange(animationRequests); _EasingFunction = animationEasing; _Duration = (int)animationDuration; InitializeAnimationFunctions(); }
/// <summary> /// Initializes a new instance of the Animation class. /// </summary> /// <param name="target">Target object for animation</param> /// <param name="targetPropertyName">Target property name for animation</param> public AnimationInt(AnimationRequest[] animationRequests, AnimationEasing animationEasing, int animationDuration) : base(animationRequests, animationEasing, animationDuration) { }
/// <summary> /// Initializes a new instance of the Animation class. /// </summary> /// <param name="target">Target object for animation</param> /// <param name="targetPropertyName">Target property name for animation</param> public AnimationInt(AnimationRequest animationRequest, AnimationEasing animationEasing, int animationDuration) : base(new AnimationRequest[] { animationRequest }, animationEasing, animationDuration) { }
/// <summary> /// Initializes a new instance of the Animation class. /// </summary> /// <param name="target">Target object for animation</param> /// <param name="targetPropertyName">Target property name for animation</param> public Animation(AnimationRequest animationRequest, AnimationEasing animationEasing, int animationDuration) : this(new AnimationRequest[] { animationRequest }, animationEasing, animationDuration) { }
protected void Start(AnimationRequest[] requests) { if (_Worker != null) throw new InvalidOperationException("Animation is already running animations"); //Console.WriteLine("{0} Animation Started", DateTime.Now); _IsCompleted = false; _Worker = new BackgroundWorker(); _Worker.WorkerSupportsCancellation = true; _Worker.DoWork += new DoWorkEventHandler(WorkerDoWork); _Worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(RunWorkerCompleted); _Worker.RunWorkerAsync(requests); }