2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.ComponentModel;
21 using Tizen.NUI.Binding;
23 namespace Tizen.NUI.BaseComponents
26 /// AnimatedVectorImageView is a class for displaying a vector resource.
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public partial class AnimatedVectorImageView : LottieAnimationView
31 #region Constructor, Destructor, Dispose
33 static AnimatedVectorImageView()
35 if (NUIApplication.IsUsingXaml)
37 ResourceURLProperty = BindableProperty.Create(nameof(ResourceURL), typeof(string), typeof(AnimatedVectorImageView), string.Empty,
38 propertyChanged: SetInternalResourceURLProperty, defaultValueCreator: GetInternalResourceURLProperty);
40 ResourceUrlProperty = BindableProperty.Create(nameof(ResourceUrl), typeof(string), typeof(AnimatedVectorImageView), string.Empty,
41 propertyChanged: SetInternalResourceUrlProperty, defaultValueCreator: GetInternalResourceUrlProperty);
43 RepeatCountProperty = BindableProperty.Create(nameof(RepeatCount), typeof(int), typeof(AnimatedVectorImageView), 0,
44 propertyChanged: SetInternalRepeatCountProperty, defaultValueCreator: GetInternalRepeatCountProperty);
46 CurrentFrameProperty = BindableProperty.Create(nameof(CurrentFrame), typeof(int), typeof(AnimatedVectorImageView), 0,
47 propertyChanged: SetInternalCurrentFrameProperty, defaultValueCreator: GetInternalCurrentFrameProperty);
49 RepeatModeProperty = BindableProperty.Create(nameof(RepeatMode), typeof(RepeatModes), typeof(AnimatedVectorImageView), default(RepeatModes),
50 propertyChanged: SetInternalRepeatModeProperty, defaultValueCreator: GetInternalRepeatModeProperty);
55 /// Construct VectorAnimationView.
57 [EditorBrowsable(EditorBrowsableState.Never)]
58 public AnimatedVectorImageView() : base()
60 NUILog.Debug($"[AnimatedVectorImageView START[ constructor objId={GetId()} ] END]");
64 /// Construct VectorAnimationView.
66 /// <param name="scale">Set scaling factor for Vector Animation, while creating.</param>
67 [EditorBrowsable(EditorBrowsableState.Never)]
68 public AnimatedVectorImageView(float scale) : base(scale)
70 NUILog.Debug($"[AnimatedVectorImageView START[ constructor scale={scale}) objId={GetId()} ] END]");
74 /// You can override it to clean-up your own resources
76 /// <param name="type">DisposeTypes</param>
77 [EditorBrowsable(EditorBrowsableState.Never)]
78 protected override void Dispose(DisposeTypes type)
84 NUILog.Debug($"AnimatedVectorImageView START");
86 //Release your own unmanaged resources here.
87 //You should not access any managed member here except static instance.
88 //because the execution order of Finalizes is non-deterministic.
92 NUILog.Debug($"AnimatedVectorImageView END");
94 #endregion Constructor, Destructor, Dispose
101 // Suppress warning : This has been being used by users, so that the interface can not be changed.
102 [EditorBrowsable(EditorBrowsableState.Never)]
103 public string ResourceURL
107 if (NUIApplication.IsUsingXaml)
109 return GetValue(ResourceURLProperty) as string;
113 return GetInternalResourceURLProperty(this) as string;
118 if (NUIApplication.IsUsingXaml)
120 SetValue(ResourceURLProperty, value);
124 SetInternalResourceURLProperty(this, null, value);
126 NotifyPropertyChanged();
130 private string InternalResourceURL
134 NUILog.Debug($"[AnimatedVectorImageView START[ [{GetId()}] ResourceURL SET");
136 if (value == resourceUrl)
138 NUILog.Debug($"set same URL! ");
141 resourceUrl = (value == null) ? "" : value;
143 isMinMaxFrameSet = minMaxSetTypes.NotSetByUser;
144 NUILog.Debug($" [{GetId()}] resourceUrl={resourceUrl}) ]AnimatedVectorImageView END]");
152 // Suppress warning : This has been being used by users, so that the interface can not be changed.
153 [EditorBrowsable(EditorBrowsableState.Never)]
154 public new string ResourceUrl
158 if (NUIApplication.IsUsingXaml)
160 return GetValue(ResourceUrlProperty) as string;
164 return GetInternalResourceUrlProperty(this) as string;
169 if (NUIApplication.IsUsingXaml)
171 SetValue(ResourceUrlProperty, value);
175 SetInternalResourceUrlProperty(this, null, value);
177 NotifyPropertyChanged();
181 private string InternalResourceUrl
185 NUILog.Debug($"[AnimatedVectorImageView START[ [{GetId()}] ResourceUrl SET");
186 this.ResourceURL = value;
187 NUILog.Debug($" [{GetId()}] value={value}) ]AnimatedVectorImageView END]");
191 NUILog.Debug($"[AnimatedVectorImageView [ [{GetId()}] ResourceUrl GET");
192 return this.ResourceURL;
198 /// RepeatCount of animation.
199 /// The repeat count is 0 by default.
200 /// If the RepeatCount is 0, the animation is never repeated.
201 /// If the RepeatCount is greater than 0, the repeat mode will be taken into account.
202 /// If RepeatCount is -1, animation is infinite loops.
204 [EditorBrowsable(EditorBrowsableState.Never)]
205 public int RepeatCount
209 if (NUIApplication.IsUsingXaml)
211 return (int)GetValue(RepeatCountProperty);
215 return (int)GetInternalRepeatCountProperty(this);
220 if (NUIApplication.IsUsingXaml)
222 SetValue(RepeatCountProperty, value);
226 SetInternalRepeatCountProperty(this, null, value);
228 NotifyPropertyChanged();
232 private int InternalRepeatCount
236 NUILog.Debug($"[AnimatedVectorImageView START[ [{GetId()}] RepeatCount SET");
238 repeatCnt = (value < -1) ? -1 : value;
239 LoopCount = (repeatCnt < 0) ? repeatCnt : repeatCnt + 1;
241 NUILog.Debug($"[{GetId()}] repeatCnt={repeatCnt} ]AnimatedVectorImageView END]");
247 /// TotalFrame of animation.
248 /// If resouce is still not be loaded, or invalid resource, the value is 0.
250 [EditorBrowsable(EditorBrowsableState.Never)]
251 public new int TotalFrame
253 get => totalFrameNum;
256 private int totalFrameNum
258 get => base.TotalFrame;
262 /// CurrentFrame of animation.
264 /// <returns> Returns user set value for the current frame. Cannot provide actual playing current frame. </returns>
265 [EditorBrowsable(EditorBrowsableState.Never)]
266 public new int CurrentFrame
270 if (NUIApplication.IsUsingXaml)
272 return (int)GetValue(CurrentFrameProperty);
276 return (int)GetInternalCurrentFrameProperty(this);
281 if (NUIApplication.IsUsingXaml)
283 SetValue(CurrentFrameProperty, value);
287 SetInternalCurrentFrameProperty(this, null, value);
289 NotifyPropertyChanged();
293 private int InternalCurrentFrame
297 NUILog.Debug($"[AnimatedVectorImageView START[ [{GetId()}] CurrentFrame SET");
299 if (string.IsNullOrEmpty(resourceUrl))
301 throw new InvalidOperationException("Resource Url not yet Set");
309 innerCurrentFrame = value;
310 AnimationState = AnimationStates.Paused;
312 base.SetMinMaxFrame(0, IntegerMaxValue);
313 base.CurrentFrame = innerCurrentFrame;
315 NUILog.Debug($" [{GetId()}] innerCurrentFrame={innerCurrentFrame}) ]AnimatedVectorImageView END]");
317 get => innerCurrentFrame;
321 /// RepeatMode of animation.
323 [EditorBrowsable(EditorBrowsableState.Never)]
324 public RepeatModes RepeatMode
328 if (NUIApplication.IsUsingXaml)
330 return (RepeatModes)GetValue(RepeatModeProperty);
334 return (RepeatModes)GetInternalRepeatModeProperty(this);
339 if (NUIApplication.IsUsingXaml)
341 SetValue(RepeatModeProperty, value);
345 SetInternalRepeatModeProperty(this, null, value);
347 NotifyPropertyChanged();
351 private RepeatModes InternalRepeatMode
355 NUILog.Debug($"[AnimatedVectorImageView START[ [{GetId()}] RepeatMode SET");
360 case RepeatModes.Restart:
361 LoopingMode = LoopingModeType.Restart;
363 case RepeatModes.Reverse:
364 LoopingMode = LoopingModeType.AutoReverse;
367 LoopingMode = LoopingModeType.Restart;
371 NUILog.Debug($" [{GetId()}] repeatMode={repeatMode}) ]AnimatedVectorImageView END]");
377 /// Get state of animation.
379 [EditorBrowsable(EditorBrowsableState.Never)]
380 public AnimationStates AnimationState
384 CurrentAnimationState = value;
388 if (CurrentAnimationState == AnimationStates.Playing)
390 if (PlayState == PlayStateType.Stopped)
392 CurrentAnimationState = AnimationStates.Stopped;
395 return CurrentAnimationState;
403 /// Set minimum frame and maximum frame
405 /// <param name="minFrame">minimum frame.</param>
406 /// <param name="maxFrame">maximum frame.</param>
407 [EditorBrowsable(EditorBrowsableState.Never)]
408 public void SetMinAndMaxFrame(int minFrame, int maxFrame)
410 NUILog.Debug($"[AnimatedVectorImageView START[ [{GetId()}] SetMinAndMaxFrame({minFrame}, {maxFrame})");
412 minimumFrame = (minFrame) > 0 ? minFrame : 0;
413 maximumFrame = (maxFrame) > 0 ? maxFrame : 0;
414 isMinMaxFrameSet = minMaxSetTypes.SetByMinAndMaxFrameMethod;
416 // Remove marker information.
417 minimumFrameMarker = null;
418 maximumFrameMarker = null;
420 if (minimumFrame > maximumFrame)
422 NUILog.Debug($" [{GetId()}] minimumFrame:{minimumFrame} > maximumFrame:{maximumFrame}) ]AnimatedVectorImageView END]");
426 NUILog.Debug($" [{GetId()}] minimumFrame:{minimumFrame}, maximumFrame:{maximumFrame}) ]AnimatedVectorImageView END]");
430 /// Set minimum frame and maximum frame by marker.
431 /// Animation will play between the start frame and the end frame of the marker if one marker is specified.
432 /// Or animation will play between the start frame of the first marker and the end frame of the second marker if two markers are specified.
435 /// If we use invaliad markers, or we load image asynchronous and load is not finished yet,
436 /// CurrentFrame might not be matched with real value.
438 /// <param name="marker1">First marker</param>
439 /// <param name="marker2">Second marker</param>
440 [EditorBrowsable(EditorBrowsableState.Never)]
441 public void SetMinAndMaxFrameByMarker(string marker1, string marker2 = null)
443 NUILog.Debug($"[AnimatedVectorImageView START[ [{GetId()}] SetMinAndMaxFrameByMarker({marker1}, {marker2})");
445 minimumFrameMarker = marker1;
446 maximumFrameMarker = marker2;
447 isMinMaxFrameSet = minMaxSetTypes.SetByMinAndMaxFrameByMarkerMethod;
449 // Remove frame information.
453 NUILog.Debug($" [{GetId()}] minimumFrameMarker:{minimumFrameMarker}, maximumFrameMarker:{maximumFrameMarker}) ]AnimatedVectorImageView END]");
457 /// SetMinMaxFrame(int startFrame, int endFrame)
459 /// <param name="minFrame"></param>
460 /// <param name="maxFrame"></param>
461 [EditorBrowsable(EditorBrowsableState.Never)]
462 public new void SetMinMaxFrame(int minFrame, int maxFrame)
464 NUILog.Debug($"SetMinMaxFrame({minFrame}, {maxFrame})!!!");
466 minimumFrame = (minFrame) > 0 ? minFrame : 0;
467 maximumFrame = (maxFrame) > 0 ? maxFrame : 0;
468 isMinMaxFrameSet = minMaxSetTypes.SetByBaseSetMinMaxFrameMethod;
470 // Remove marker information.
471 minimumFrameMarker = null;
472 maximumFrameMarker = null;
474 if (minimumFrame >= totalFrameNum)
476 minimumFrame = totalFrameNum - 1;
479 if (maximumFrame >= totalFrameNum)
481 maximumFrame = totalFrameNum - 1;
484 base.SetMinMaxFrame(minimumFrame, maximumFrame);
488 /// A marker has its start frame and end frame.
489 /// Animation will play between the start frame and the end frame of the marker if one marker is specified.
490 /// Or animation will play between the start frame of the first marker and the end frame of the second marker if two markers are specified.
492 /// <param name="marker1">First marker</param>
493 /// <param name="marker2">Second marker</param>
494 [EditorBrowsable(EditorBrowsableState.Never)]
495 public new void SetMinMaxFrameByMarker(string marker1, string marker2 = null)
497 NUILog.Debug($"SetMinMaxFrameByMarker({marker1}, {marker2})");
499 minimumFrameMarker = marker1;
500 maximumFrameMarker = marker2;
501 isMinMaxFrameSet = minMaxSetTypes.SetByMarker;
503 // Remove frame information.
507 base.SetMinMaxFrameByMarker(marker1, marker2);
513 [EditorBrowsable(EditorBrowsableState.Never)]
514 public new void Play()
516 NUILog.Debug($"[AnimatedVectorImageView START[ [{GetId()}] AnimationState={AnimationState}, PlayState={PlayState}");
518 if (string.IsNullOrEmpty(resourceUrl))
520 throw new InvalidOperationException("Resource Url not yet Set");
523 switch (isMinMaxFrameSet)
525 case minMaxSetTypes.NotSetByUser:
526 base.SetMinMaxFrame(0, totalFrameNum - 1);
527 base.CurrentFrame = 0;
528 innerCurrentFrame = 0;
531 case minMaxSetTypes.SetByMinAndMaxFrameByMarkerMethod:
532 base.SetMinMaxFrameByMarker(minimumFrameMarker, maximumFrameMarker);
533 if (GetFrameValueFromMarkerInfo())
535 base.CurrentFrame = minimumFrame;
536 innerCurrentFrame = minimumFrame;
540 Tizen.Log.Error("NUI", $"[Warning] Play with invalid marker! Current frame become 0\n");
541 base.CurrentFrame = 0;
542 innerCurrentFrame = 0;
546 case minMaxSetTypes.SetByMinAndMaxFrameMethod:
547 base.SetMinMaxFrame(minimumFrame, maximumFrame);
548 base.CurrentFrame = minimumFrame;
549 innerCurrentFrame = minimumFrame;
552 case minMaxSetTypes.SetByMarker:
553 case minMaxSetTypes.SetByBaseSetMinMaxFrameMethod:
560 AnimationState = AnimationStates.Playing;
562 NUILog.Debug($" [{GetId()}] isMinMaxFrameSet={isMinMaxFrameSet}) ]AnimatedVectorImageView END]");
568 [EditorBrowsable(EditorBrowsableState.Never)]
569 public new void Pause()
571 NUILog.Debug($"[AnimatedVectorImageView START[ [{GetId()}] AnimationState={AnimationState}, PlayState={PlayState}");
573 if (string.IsNullOrEmpty(resourceUrl))
575 throw new InvalidOperationException("Resource Url not yet Set");
579 AnimationState = AnimationStates.Paused;
581 NUILog.Debug($" [{GetId()}] ]AnimatedVectorImageView END]");
587 /// <param name="endAction">Defines, what should be behaviour after cancel operation
588 /// End action is Cancel, Animation Stops at the Current Frame.
589 /// End action is Discard, Animation Stops at the Min Frame
590 /// End action is StopFinal, Animation Stops at the Max Frame
592 [EditorBrowsable(EditorBrowsableState.Never)]
593 public void Stop(EndActions endAction = EndActions.Cancel)
595 NUILog.Debug($"[AnimatedVectorImageView START[ [{GetId()}] endAction:({endAction}), PlayState={PlayState}");
597 if (string.IsNullOrEmpty(resourceUrl))
599 throw new InvalidOperationException("Resource Url not yet Set");
602 if (AnimationState == AnimationStates.Stopped)
607 if (innerEndAction != endAction)
609 innerEndAction = endAction;
612 case EndActions.Cancel:
613 StopBehavior = StopBehaviorType.CurrentFrame;
615 case EndActions.Discard:
616 StopBehavior = StopBehaviorType.MinimumFrame;
618 case EndActions.StopFinal:
619 StopBehavior = StopBehaviorType.MaximumFrame;
622 NUILog.Debug($" [{GetId()}] no endAction : default set");
626 AnimationState = AnimationStates.Stopped;
630 NUILog.Debug($"isMinMaxFrameSet:{isMinMaxFrameSet}, base.CurrentFrame:{base.CurrentFrame}, totalFrameNum:{totalFrameNum}, minimumFrame:{minimumFrame}, maximumFrame:{maximumFrame}, StopBehavior:{StopBehavior}, endAction:{endAction}");
632 switch (isMinMaxFrameSet)
634 case minMaxSetTypes.NotSetByUser:
637 case EndActions.Cancel:
638 innerCurrentFrame = base.CurrentFrame;
640 case EndActions.Discard:
641 base.CurrentFrame = innerCurrentFrame = 0;
643 case EndActions.StopFinal:
644 base.CurrentFrame = innerCurrentFrame = totalFrameNum - 1;
649 case minMaxSetTypes.SetByMinAndMaxFrameByMarkerMethod:
650 if (GetFrameValueFromMarkerInfo())
652 goto case minMaxSetTypes.SetByMinAndMaxFrameMethod;
658 case EndActions.Cancel:
659 innerCurrentFrame = base.CurrentFrame;
661 case EndActions.Discard:
662 Tizen.Log.Error("NUI", $"[Warning] Stop(Discard) with invalid marker! Current frame become 0\n");
663 base.CurrentFrame = innerCurrentFrame = 0;
665 case EndActions.StopFinal:
666 Tizen.Log.Error("NUI", $"[Warning] Stop(StopFinal) with invalid marker! Current frame become {totalFrameNum - 1}\n");
667 base.CurrentFrame = innerCurrentFrame = totalFrameNum - 1;
673 case minMaxSetTypes.SetByMinAndMaxFrameMethod:
676 case EndActions.Cancel:
677 innerCurrentFrame = base.CurrentFrame;
679 case EndActions.Discard:
680 base.CurrentFrame = innerCurrentFrame = minimumFrame;
682 case EndActions.StopFinal:
683 base.CurrentFrame = innerCurrentFrame = maximumFrame;
688 case minMaxSetTypes.SetByMarker:
689 case minMaxSetTypes.SetByBaseSetMinMaxFrameMethod:
694 NUILog.Debug($" [{GetId()}] innerCurrentFrame={innerCurrentFrame}, base.CurrentFrame={base.CurrentFrame}");
695 NUILog.Debug($" [{GetId()}] ]AnimatedVectorImageView END]");
700 #region Event, Enum, Struct, ETC
702 /// RepeatMode of animation.
704 // Suppress warning : This has been being used by users, so that the interface can not be changed.
705 [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names", Justification = "<Pending>")]
706 [EditorBrowsable(EditorBrowsableState.Never)]
707 public enum RepeatModes
710 /// When the animation reaches the end and RepeatCount is nonZero, the animation restarts from the beginning.
712 [EditorBrowsable(EditorBrowsableState.Never)]
713 Restart = LoopingModeType.Restart,
715 /// When the animation reaches the end and RepeatCount nonZero, the animation reverses direction on every animation cycle.
717 [EditorBrowsable(EditorBrowsableState.Never)]
718 Reverse = LoopingModeType.AutoReverse
722 /// EndActions of animation.
724 // Suppress warning : This has been being used by users, so that the interface can not be changed.
725 [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names", Justification = "<Pending>")]
726 [EditorBrowsable(EditorBrowsableState.Never)]
727 public enum EndActions
729 /// <summary> End action is Cancel, Animation Stops at the Current Frame.</summary>
730 [EditorBrowsable(EditorBrowsableState.Never)]
732 /// <summary> End action is Discard, Animation Stops at the Min Frame</summary>
733 [EditorBrowsable(EditorBrowsableState.Never)]
735 /// <summary> End action is StopFinal, Animation Stops at the Max Frame</summary>
736 [EditorBrowsable(EditorBrowsableState.Never)]
741 /// AnimationStates of animation.
743 // Suppress warning : This has been being used by users, so that the interface can not be changed.
744 [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names", Justification = "<Pending>")]
745 [EditorBrowsable(EditorBrowsableState.Never)]
746 public enum AnimationStates
748 /// <summary> The animation has stopped.</summary>
749 [EditorBrowsable(EditorBrowsableState.Never)]
750 Stopped = PlayStateType.Stopped,
751 /// <summary> The animation is playing.</summary>
752 [EditorBrowsable(EditorBrowsableState.Never)]
753 Playing = PlayStateType.Playing,
754 /// <summary> The animation is paused.</summary>
755 [EditorBrowsable(EditorBrowsableState.Never)]
756 Paused = PlayStateType.Paused
758 #endregion Event, Enum, Struct, ETC
762 internal bool GetFrameValueFromMarkerInfo()
764 bool minimumMarkerFoundSuccess = false;
765 bool maximumMarkerFoundSuccess = false;
766 int foundedMinimumFrame = 0;
767 int foundedMaximumFrame = 0;
769 NUILog.Debug($" [{GetId()}] GetFrameValueFromMarkerInfo : marker = (minimumFrameMarker:{minimumFrameMarker}, maximumFrameMarker:{maximumFrameMarker})");
771 var markerInfoList = GetMarkerInfo();
772 if (markerInfoList != null)
774 foreach (var markerInfo in markerInfoList)
776 if (markerInfo.Item1 == minimumFrameMarker)
778 if (string.IsNullOrEmpty(maximumFrameMarker))
780 minimumMarkerFoundSuccess = true;
781 maximumMarkerFoundSuccess = true;
782 foundedMinimumFrame = markerInfo.Item2;
783 foundedMaximumFrame = markerInfo.Item3;
787 minimumMarkerFoundSuccess = true;
788 foundedMinimumFrame = markerInfo.Item2;
791 else if (markerInfo.Item1 == maximumFrameMarker)
793 maximumMarkerFoundSuccess = true;
794 foundedMaximumFrame = markerInfo.Item2;
799 if (minimumMarkerFoundSuccess && maximumMarkerFoundSuccess)
801 minimumFrame = (foundedMinimumFrame) > 0 ? foundedMinimumFrame : 0;
802 maximumFrame = (foundedMaximumFrame) > 0 ? foundedMaximumFrame : 0;
803 NUILog.Debug($" [{GetId()}] GetFrameValueFromMarkerInfo Sucess! frame set as {minimumFrame} ~ {maximumFrame} : marker = (minimumFrameMarker:{minimumFrameMarker}, maximumFrameMarker:{maximumFrameMarker})");
804 if (minimumFrame > maximumFrame)
806 NUILog.Debug($" [{GetId()}] minimumFrame:{minimumFrame} > maximumFrame:{maximumFrame})");
809 // Note : let we insure to get marker frame value only one time per each frame marker setter
810 minimumFrameMarker = null;
811 maximumFrameMarker = null;
812 isMinMaxFrameSet = minMaxSetTypes.SetByMinAndMaxFrameMethod;
817 Tizen.Log.Error("NUI", $"Fail to get frame from marker = (minimumFrameMarker:{minimumFrameMarker}, maximumFrameMarker:{maximumFrameMarker}). Maybe file is not loaded yet, or invalid marker used. url : {resourceUrl}\n");
818 NUILog.Debug($" [{GetId()}] GetFrameValueFromMarkerInfo Failed! frame set as {minimumFrame} ~ {maximumFrame} : marker = (minimumFrameMarker:{minimumFrameMarker}, maximumFrameMarker:{maximumFrameMarker})");
826 private string resourceUrl = null;
827 private int repeatCnt = 0;
828 private RepeatModes repeatMode = RepeatModes.Restart;
829 private int minimumFrame = -1, maximumFrame = -1;
830 private string minimumFrameMarker = null;
831 private string maximumFrameMarker = null;
832 private minMaxSetTypes isMinMaxFrameSet = minMaxSetTypes.NotSetByUser;
833 private int innerCurrentFrame = -1;
834 private EndActions innerEndAction = EndActions.Cancel;
835 private enum minMaxSetTypes
838 SetByMinAndMaxFrameMethod,
839 SetByMinAndMaxFrameByMarkerMethod,
841 SetByBaseSetMinMaxFrameMethod,
844 private AnimationStates CurrentAnimationState = AnimationStates.Stopped;
845 private const int IntegerMaxValue = 0x7FFFFFFF;