Beispiel #1
0
        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();
        }
Beispiel #2
0
 public void SendAnimationInitialized(AnimationInitializedEventArgs args)
 {
     CurrentFrame = 0;
     DurationTime = args.DurationTime;
     TotalFrame   = args.TotalFrame;
     IsPlaying    = args.IsPlaying;
     OnAnimationFileReady();
     AnimationInitialized?.Invoke(this, args);
 }
Beispiel #3
0
        /// <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);
 }
Beispiel #5
0
 private void FrameBroker_TransitionAnimationInitialized(bool direction)
 {
     AnimationInitialized?.Invoke(direction);
 }