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