using global::System;
using global::System.Runtime.InteropServices;
using System.ComponentModel;
-using tizenlog = Tizen.Log;
+#if (NUI_DEBUG_ON)
+using tlog = Tizen.Log;
+#endif
namespace Tizen.NUI.BaseComponents
{
[EditorBrowsable(EditorBrowsableState.Never)]
public AnimatedVectorImageView() : base()
{
- NUILog.Debug($"AnimatedVectorImageView() constructor!");
+ tlog.Fatal(tag, $" <<< AnimatedVectorImageView() constructor GetId={GetId()} >>>");
currentStates.url = "";
currentStates.frame = -1;
currentStates.loopCount = 0;
- currentStates.loopMode = LoopModes.Forward;
- //currentStates.stopEndAction = EndActions.Cancel;
+ currentStates.loopMode = LoopingModeType.Restart;
+ currentStates.stopEndAction = StopBehaviorType.CurrentFrame;
currentStates.framePlayRangeMin = -1;
currentStates.framePlayRangeMax = -1;
currentStates.changed = false;
public AnimatedVectorImageView(float scale) : this()
{
currentStates.scale = scale;
+ tlog.Fatal(tag, $" <<< AnimatedVectorImageView(scale={scale}) constructor GetId={GetId()} >>>");
}
/// <summary>
return;
}
- NUILog.Debug($"Dispose(type={type})!");
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Dispose(type={type})!");
if (type == DisposeTypes.Explicit)
{
{
VisualEventSignal().Disconnect(visualEventSignalCallback);
finishedEventHandler = null;
- NUILog.Debug($"disconnect event signal");
+ tlog.Fatal(tag, $"disconnect event signal");
}
base.Dispose(type);
+ tlog.Fatal(tag, $" [{GetId()}]AnimatedVectorImageView.Dispose(type={type}) >>>");
}
#endregion Constructor, Distructor, Dispose
{
set
{
- NUILog.Debug($"URL set! value={value}");
string ret = (value == null ? "" : value);
currentStates.url = ret;
currentStates.changed = true;
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.URL SET url={currentStates.url} >>>");
+
PropertyMap map = new PropertyMap();
map.Add(Visual.Property.Type, new PropertyValue((int)DevelVisual.Type.AnimatedVectorImage))
.Add(ImageVisualProperty.URL, new PropertyValue(currentStates.url))
- .Add(ImageVisualProperty.LoopCount, new PropertyValue(currentStates.loopCount));
- //.Add(ImageVisualProperty.StopEndAction, new PropertyValue((int)currentStates.stopEndAction))
- //.Add(ImageVisualProperty.LoopMode, new PropertyValue((int)currentStates.loopMode));
+ .Add(ImageVisualProperty.LoopCount, new PropertyValue(currentStates.loopCount))
+ .Add(ImageVisualProperty.StopBehavior, new PropertyValue((int)currentStates.stopEndAction))
+ .Add(ImageVisualProperty.LoopingMode, new PropertyValue((int)currentStates.loopMode));
Image = map;
}
get
{
- string ret = ResourceUrl;
- NUILog.Debug($"URL get! base ret={ret}, Name={Name}");
+ string ret = currentStates.url;
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.URL GET");
+
PropertyMap map = Image;
if (map != null)
{
{
if (val.Get(out ret))
{
- NUILog.Debug($"gotten url={ret}");
+ tlog.Fatal(tag, $" gotten url={ret} >>>");
return ret;
}
}
}
- tizenlog.Error(tag, "[ERROR] fail to get URL from dali");
+ tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get URL from dali >>>");
return ret;
}
}
}
}
}
- tizenlog.Error(tag, $"[ERROR] fail to get PlayState from dali");
+ tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get PlayState from dali");
return (PlayStateType)ret;
}
}
{
if (val.Get(out ret))
{
- NUILog.Debug($"TotalFrameNumber get! ret={ret}");
+ //tlog.Fatal(tag, $"TotalFrameNumber get! ret={ret}");
currentStates.totalFrame = ret;
return ret;
}
}
}
- tizenlog.Error(tag, $"[ERROR] fail to get TotalFrameNumber from dali");
+ tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get TotalFrameNumber from dali");
return ret;
}
}
set
{
currentStates.frame = value;
- NUILog.Debug($"set CurrentFrameNumber={currentStates.frame}");
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.CurrentFrameNumber SET frame={currentStates.frame} >>>");
DoAction(vectorImageVisualIndex, (int)actionType.jumpTo, new PropertyValue(currentStates.frame));
}
get
{
if (val.Get(out ret))
{
- NUILog.Debug($"CurrentFrameNumber get! val={ret}");
+ //tlog.Fatal(tag, $"CurrentFrameNumber get! val={ret}");
return ret;
}
}
}
- tizenlog.Error(tag, $"[ERROR] fail to get CurrentFrameNumber from dali!! ret={ret}");
+ tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get CurrentFrameNumber from dali!! ret={ret}");
return ret;
}
}
/// </summary>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
- public LoopModes LoopMode
+ public LoopingModeType LoopMode
{
set
{
- currentStates.loopMode = (LoopModes)value;
+ currentStates.loopMode = (LoopingModeType)value;
currentStates.changed = true;
-
- NUILog.Debug($"LoopMode set val={currentStates.loopMode}");
- //PropertyMap map = new PropertyMap();
- //map.Add(ImageVisualProperty.LoopMode, new PropertyValue((int)currentStates.loopMode));
- //DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.LoopMode SET loopMode={currentStates.loopMode} >>>");
+ PropertyMap map = new PropertyMap();
+ map.Add(ImageVisualProperty.LoopingMode, new PropertyValue((int)currentStates.loopMode));
+ DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
}
get
{
- NUILog.Debug($"LoopMode get!");
+ //tlog.Fatal(tag, $"LoopMode get!");
PropertyMap map = base.Image;
var ret = 0;
- //if (map != null)
- //{
- // PropertyValue val = map.Find(ImageVisualProperty.LoopMode);
- // if (val != null)
- // {
- // if (val.Get(out ret))
- // {
- // NUILog.Debug($"gotten LoopMode={ret}");
- // if (ret != (int)currentStates.loopMode && ret > 0)
- // {
- // NUILog.Debug($"different LoopMode! gotten={ret}, loopMode={currentStates.loopMode}");
- // return (int)currentStates.loopMode;
- // }
- // return ret;
- // }
- // }
- //}
- tizenlog.Error(tag, "[ERROR] fail to get loopMode from dali");
- return (LoopModes)ret;
+ if (map != null)
+ {
+ PropertyValue val = map.Find(ImageVisualProperty.LoopingMode);
+ if (val != null)
+ {
+ if (val.Get(out ret))
+ {
+ //tlog.Fatal(tag, $"gotten LoopMode={ret}");
+ if (ret != (int)currentStates.loopMode && ret > 0)
+ {
+ tlog.Fatal(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) different LoopMode! gotten={ret}, loopMode={currentStates.loopMode}");
+ }
+ return (LoopingModeType)ret;
+ }
+ }
+ }
+ tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get loopMode from dali");
+ return currentStates.loopMode;
}
}
{
currentStates.changed = true;
currentStates.loopCount = value;
- NUILog.Debug($"LoopCount set! currentStates.loopCount={currentStates.loopCount}");
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.LoopCount SET currentStates.loopCount={currentStates.loopCount} >>>");
PropertyMap map = new PropertyMap();
map.Add(ImageVisualProperty.LoopCount, new PropertyValue(currentStates.loopCount));
DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
}
get
{
- NUILog.Debug($"LoopCount get!");
+ //tlog.Fatal(tag, $"LoopCount get!");
PropertyMap map = base.Image;
var ret = 0;
if (map != null)
{
if (val.Get(out ret))
{
- NUILog.Debug($"gotten loop count={ret}");
+ //tlog.Fatal(tag, $"gotten loop count={ret}");
if (ret != currentStates.loopCount && ret > 0)
{
- NUILog.Debug($"[ERR] different loop count! gotten={ret}, loopCount={currentStates.loopCount}");
+ tlog.Fatal(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) different loop count! gotten={ret}, loopCount={currentStates.loopCount}");
}
return currentStates.loopCount;
}
}
}
- tizenlog.Error(tag, $"[ERROR] fail to get LoopCount from dali currentStates.loopCount={currentStates.loopCount}");
+ tlog.Error(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get LoopCount from dali currentStates.loopCount={currentStates.loopCount}");
return currentStates.loopCount;
}
}
+
+ /// <summary>
+ /// Stop Behavior (Stop End Action)
+ /// </summary>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public StopBehaviorType StopBehavior
+ {
+ set
+ {
+ currentStates.stopEndAction = (StopBehaviorType)value;
+ currentStates.changed = true;
+
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.StopBehavior SET val={currentStates.stopEndAction} >>>");
+ PropertyMap map = new PropertyMap();
+ map.Add(ImageVisualProperty.StopBehavior, new PropertyValue((int)currentStates.stopEndAction));
+ DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
+ }
+ get
+ {
+ //tlog.Fatal(tag, $"StopBehavior get!");
+ PropertyMap map = base.Image;
+ var ret = 0;
+ if (map != null)
+ {
+ PropertyValue val = map.Find(ImageVisualProperty.StopBehavior);
+ if (val != null)
+ {
+ if (val.Get(out ret))
+ {
+ //tlog.Fatal(tag, $"gotten StopBehavior={ret}");
+ if (ret != (int)currentStates.stopEndAction)
+ {
+ tlog.Fatal(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) different StopBehavior! gotten={ret}, StopBehavior={currentStates.stopEndAction}");
+ }
+ return (StopBehaviorType)ret;
+ }
+ }
+ }
+ tlog.Error(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get StopBehavior from dali");
+ return currentStates.stopEndAction;
+ }
+ }
#endregion Property
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetPlayRange(int startFrame, int endFrame)
{
- NUILog.Debug($"SetPlayRange(startFrame={startFrame}, endFrame={endFrame})");
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.SetPlayRange({startFrame}, {endFrame})");
currentStates.changed = true;
currentStates.framePlayRangeMin = startFrame;
PropertyMap map = new PropertyMap();
map.Add(ImageVisualProperty.PlayRange, new PropertyValue(array));
DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
- NUILog.Debug($"currentStates.framePlayRangeMin={currentStates.framePlayRangeMin}, currentStates.framePlayRangeMax={currentStates.framePlayRangeMax})");
+ tlog.Fatal(tag, $" [{GetId()}](AnimatedVectorImageView) currentStates=({currentStates.framePlayRangeMin}, {currentStates.framePlayRangeMax}) >>>");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public new void Play()
{
- NUILog.Debug($"Play() called!");
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Play() called >>>");
debugPrint();
base.Play();
}
[EditorBrowsable(EditorBrowsableState.Never)]
public new void Pause()
{
- NUILog.Debug($"Pause() called!");
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Pause() called >>>");
debugPrint();
base.Pause();
}
[EditorBrowsable(EditorBrowsableState.Never)]
public new void Stop()
{
- NUILog.Debug($"Stop()!");
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Stop() called >>>");
debugPrint();
base.Stop();
}
{
if (finishedEventHandler == null)
{
- NUILog.Debug($"Finished()! add!");
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Finished eventhandler added >>>");
visualEventSignalCallback = onVisualEventSignal;
VisualEventSignal().Connect(visualEventSignalCallback);
}
}
remove
{
- NUILog.Debug($"Finished()! remove!");
+ tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Finished eventhandler removed >>>");
finishedEventHandler -= value;
if (finishedEventHandler == null && visualEventSignalCallback != null)
{
[EditorBrowsable(EditorBrowsableState.Never)]
Paused = 2
}
+
+ /// <summary>
+ /// @brief Enumeration for what to do when the animation is stopped.
+ /// </summary>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum StopBehaviorType
+ {
+ /// <summary>
+ /// When the animation is stopped, the current frame is shown.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ CurrentFrame,
+ /// <summary>
+ /// When the animation is stopped, the first frame is shown.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ FirstFrame,
+ /// <summary>
+ /// When the animation is stopped, the last frame is shown.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ LastFrame
+ }
+
+ /// <summary>
+ /// @brief Enumeration for what looping mode is in.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ public enum LoopingModeType
+ {
+ /// <summary>
+ /// When the animation arrives at the end in looping mode, the animation restarts from the beginning.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ Restart,
+ /// <summary>
+ /// When the animation arrives at the end in looping mode, the animation reverses direction and runs backwards again.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ AutoReverse
+ }
#endregion Event, Enum, Struct, ETC
internal string url;
internal int frame;
internal int loopCount;
- internal LoopModes loopMode;
- //internal EndActions stopEndAction;
+ internal LoopingModeType loopMode;
+ internal StopBehaviorType stopEndAction;
internal int framePlayRangeMin;
internal int framePlayRangeMax;
internal bool changed;
}
}
- private const string tag = "NUI";
+ private const string tag = "NUITEST";
private const int vectorImageVisualIndex = 10000000 + 1000 + 2;
private event EventHandler finishedEventHandler;
private void OnFinished()
{
+ tlog.Fatal(tag, $" <<<[{GetId()}] OnFinished() called >>>");
finishedEventHandler?.Invoke(this, null);
}
View v = Registry.GetManagedBaseHandleFromNativePtr(targetView) as View;
if (v != null)
{
- NUILog.Debug($"targetView is not null! name={v.Name}");
+ tlog.Fatal(tag, $"targetView is not null! name={v.Name}");
}
else
{
- NUILog.Debug($"target is something created from dali");
+ tlog.Fatal(tag, $"target is something created from dali");
}
}
VisualEventSignalArgs e = new VisualEventSignalArgs();
e.SignalId = signalId;
visualEventSignalHandler?.Invoke(this, e);
- NUILog.Debug($"@@ onVisualEventSignal()! visualIndex={visualIndex}, signalId={signalId}");
+ tlog.Fatal(tag, $" [{GetId()}] onVisualEventSignal()! visualIndex={visualIndex}, signalId={signalId}");
}
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private void debugPrint()
{
- NUILog.Debug($"======= currentStates");
- NUILog.Debug($"url={currentStates.url}, loopCount={currentStates.loopCount}, framePlayRangeMin={currentStates.framePlayRangeMin}, framePlayRangeMax={currentStates.framePlayRangeMax} \n");
+ tlog.Fatal(tag, $" <<< [{GetId()}] get currentStates : url={currentStates.url}, loopCount={currentStates.loopCount}, framePlayRangeMin/Max({currentStates.framePlayRangeMin},{currentStates.framePlayRangeMax}) ");
+ tlog.Fatal(tag, $" get from Property : StopBehavior={StopBehavior}, LoopMode={LoopMode}, LoopCount={LoopCount} >>>");
}
#endregion Private
}
using global::System;
using System.ComponentModel;
+#if (NUI_DEBUG_ON)
+using tlog = Tizen.Log;
+#endif
namespace Tizen.NUI.BaseComponents
{
[EditorBrowsable(EditorBrowsableState.Never)]
public VectorAnimationViewTBD() : base()
{
+ tlog.Fatal(tag, $"<<< VectorAnimationView() constuctor objId={GetId()} >>>");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public VectorAnimationViewTBD(float scale) : base(scale)
{
+ tlog.Fatal(tag, $"<<< VectorAnimationView(scale={scale}) constuctor objId={GetId()}>>>");
}
/// <summary>
{
return;
}
- NUILog.Debug($"Dispose(type={type})!");
+ tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Dispose(type={type})");
if (type == DisposeTypes.Explicit)
{
//because the execution order of Finalizes is non-deterministic.
base.Dispose(type);
+
+ tlog.Fatal(tag, $"[{GetId()}] VectorAnimationView.Dispose() >>>");
}
#endregion Constructor, Distructor, Dispose
{
set
{
+ tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.ResourceURL SET");
+
if (value == mResourceURL)
{
- NUILog.Debug($"set same URL! just return!");
- return;
+ tlog.Fatal(tag, $"set same URL! ");
+ //return;
}
- NUILog.Debug($"Object : {GetId()} URL : {ResourceURL} New URL: {value}");
mResourceURL = (value == null) ? "" : value;
URL = mResourceURL;
mIsMinMaxSet = false;
+
+ tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.ResourceURL SET mResourceURL={mResourceURL}) >>>");
}
get => mResourceURL;
}
{
set
{
+ tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.RepeatCount SET");
+
mRepeatCount = (value < -1) ? -1 : value;
- LoopCount = mRepeatCount;
+ //LoopCount = mRepeatCount;
+ LoopCount = (mRepeatCount < 0) ? mRepeatCount : mRepeatCount + 1;
+
+ tlog.Fatal(tag, $"[{GetId()}] VectorAnimationView.RepeatCount SET mRepeatCount={mRepeatCount} >>>");
}
get => mRepeatCount;
}
{
set
{
+ tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.CurrentFrame SET");
+
if (mResourceURL == null || mResourceURL == String.Empty)
{
throw new InvalidOperationException("Resource Url not yet Set");
{
value = mFrameCount - 1;
}
- NUILog.Debug($"Object : {GetId()} URL : {ResourceURL} New Frame: {value}, Old Frame : {mCurrentFrame}");
+
mCurrentFrame = value;
AnimationState = AnimationStates.Paused;
SetPlayRange(mCurrentFrame, mCurrentFrame);
CurrentFrameNumber = mCurrentFrame;
+
+ tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.CurrentFrame SET mCurrentFrame={mCurrentFrame}) >>>");
}
get => mCurrentFrame;
}
{
set
{
+ tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.RepeatMode SET");
mRepeatMode = value;
- LoopMode = (AnimatedVectorImageView.LoopModes)mRepeatMode;
+
+ switch (mRepeatMode)
+ {
+ case RepeatModes.Restart:
+ LoopMode = LoopingModeType.Restart;
+ break;
+ case RepeatModes.Reverse:
+ LoopMode = LoopingModeType.AutoReverse;
+ break;
+ default:
+ LoopMode = LoopingModeType.Restart;
+ break;
+ }
+
+ tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.RepeatMode SET mRepeatMode={mRepeatMode}) >>>");
}
get => mRepeatMode;
}
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetMinAndMaxFrame(int minFrame, int maxFrame)
{
+ tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.SetMinAndMaxFrame({minFrame}, {maxFrame})");
+
mMinFrame = (minFrame) > 0 ? minFrame : 0;
mMaxFrame = (maxFrame) > 0 ? maxFrame : 0;
mIsMinMaxSet = true;
{
return;
}
- NUILog.Debug($"SetMinAndMaxFrame({mMinFrame}, {mMaxFrame})");
+ base.Stop();
SetPlayRange(mMinFrame, mMaxFrame);
+ CurrentFrameNumber = mMinFrame;
+
+ tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.SetMinAndMaxFrame(m: {mMinFrame}, {mMaxFrame}) >>>");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public new void Play()
{
+ tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Play()");
+
if (mResourceURL == null || mResourceURL == String.Empty)
{
throw new InvalidOperationException("Resource Url not yet Set");
if (mIsMinMaxSet)
{
+ //if(mRepeatCount > 0 )
+ //{
+ // StopBehavior = StopBehaviorType.FirstFrame;
+ //}
SetPlayRange(mMinFrame, mMaxFrame);
}
else
{
- SetPlayRange(0, TotalFrameNumber - 1);
+ //SetPlayRange(0, TotalFrameNumber - 1);
}
base.Play();
AnimationState = AnimationStates.Playing;
+
+ tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.Play(mIsMinMaxSet={mIsMinMaxSet}) >>>");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public new void Pause()
{
+ tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Pause() AnimationState={AnimationState}");
+
if (mResourceURL == null || mResourceURL == String.Empty)
{
throw new InvalidOperationException("Resource Url not yet Set");
base.Pause();
AnimationState = AnimationStates.Paused;
+
+ tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.Pause() >>>");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void Stop(EndActions endAction = EndActions.Cancel)
{
+ tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Stop({endAction})");
+
if (mResourceURL == null || mResourceURL == String.Empty)
{
throw new InvalidOperationException("Resource Url not yet Set");
return;
}
- if (endAction == EndActions.Discard)
+ if (mEndAction != endAction)
{
- CurrentFrame = mMinFrame;
- }
- else if (endAction == EndActions.StopFinal)
+ mEndAction = endAction;
+ switch (endAction)
{
- CurrentFrame = mMaxFrame;
+ case EndActions.Cancel:
+ StopBehavior = StopBehaviorType.CurrentFrame;
+ break;
+ case EndActions.Discard:
+ StopBehavior = StopBehaviorType.FirstFrame;
+ break;
+ case EndActions.StopFinal:
+ StopBehavior = StopBehaviorType.LastFrame;
+ break;
+ default:
+ tlog.Fatal(tag, $" [{GetId()}] no endAction : default set");
+ break;
}
+ }
+ //if (endAction == EndActions.Discard)
+ //{
+ // CurrentFrame = mMinFrame;
+ //}
+ //else if (endAction == EndActions.StopFinal)
+ //{
+ // CurrentFrame = mMaxFrame;
+ //}
AnimationState = AnimationStates.Stopped;
base.Stop();
+
+ tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.Stop(endaction={endAction}) >>>");
}
#endregion Method
private int mMinFrame = -1, mMaxFrame = -1;
private bool mIsMinMaxSet = false;
private int mCurrentFrame = -1;
+ private EndActions mEndAction = EndActions.Cancel;
+
+ private string tag = "NUITEST";
#endregion Private
}
}