protected override void OnFrameResumed(FrameData frame) { base.OnFrameResumed(frame); direction = frame.DirectionForward; if (isAnimating) { return; } isAnimating = true; AnimationInitialized?.Invoke(frame.DirectionForward); if (frame.DirectionForward) { PlayAnimateTo(frame, ForwardAnimation); } else { PlayAnimateTo(frame, BackwardAnimation); } StartAnimation(); }
public void SendAnimationInitialized(AnimationInitializedEventArgs args) { CurrentFrame = 0; DurationTime = args.DurationTime; TotalFrame = args.TotalFrame; IsPlaying = args.IsPlaying; OnAnimationFileReady(); AnimationInitialized?.Invoke(this, args); }
/// <summary> /// Occurs Whenever the frame is resumed. /// </summary> /// <param name="frame">The frame data.</param> /// <remarks> /// When the frame has been prepared, this function is called. /// The caller can start animations, To notify that the animation is started, the caller should call StartAnimation(). /// After the animation is finished, the caller should call FinishAnimation() to notify. /// </remarks> protected override void OnFrameResumed(FrameData frame) { Log.Info("NUI", "OnFrameResumed : " + frame.DirectionForward); direction = frame.DirectionForward; if (isAnimating) { Log.Warn("NUI", "The OnFrameResumed() : Playing..."); return; } Log.Info("NUI", "The OnFrameResumed() : Play Application Transition Animation"); isAnimating = true; AnimationInitialized?.Invoke(direction); SetAnimationType(); CreateProviderImage(frame); PlayTransitionAnimation(); }
private void FrameBroker_TransitionAnimationInitialized() { AnimationInitialized?.Invoke(this, EventArgs.Empty); }
private void FrameBroker_TransitionAnimationInitialized(bool direction) { AnimationInitialized?.Invoke(direction); }