Пример #1
0
        /// <summary>
        /// Change to Slide
        /// </summary>
        /// <param name="next">Slide to change to</param>
        /// <param name="e">Event parameters</param>
        void ChangeSlide(Slide next, SlidingEventArgs e)
        {
            _selected.Visible = false;
            SlideChangedArgs sch = new SlideChangedArgs(_selected, next);

            _selected = next;
            _selected.BringToFront();
            _selected.OnSlidingInInternal(e);
            _selected.Visible = true;
            if (SlideChanged != null)
            {
                SlideChanged(this, sch);
            }
        }
Пример #2
0
        /// <summary>
        /// Move backward to Slide.
        /// </summary>
        /// <remarks>Does not modify the undo-stack.</remarks>
        /// <param name="s"></param>
        /// <param name="user_data">User data</param>
        /// <returns>true if slide change occurred, false otherwise</returns>
        public bool BackwardTo(Slide s, object user_data)
        {
            if (!RequestTransition(_selected, s))
            {
                return(false);
            }

            SlidingEventArgs e = new SlidingEventArgs(SlideDirection.Backward, user_data);

            if (_selected != null)
            {
                _selected.OnSlidingOutInternal(e);
            }
            AnimateControl(new AnimationProperties(
                               _selected,
                               AnimationProperties.Direction.Right,
                               AnimationProperties.Action.Hide,
                               _slide_speed
                               ));
            this.ChangeSlide(s, e);
            return(true);
        }
Пример #3
0
 /// <summary>
 /// Whenever this slide is about to clear the way for a new slide.
 /// </summary>
 /// <param name="e">OnSlidingOut arguments.</param>
 protected virtual void OnSlidingOut(SlidingEventArgs e)
 {
 }
Пример #4
0
 /// <summary>
 /// Called from SlideControl
 /// </summary>
 /// <param name="e"></param>
 internal void OnSlidingOutInternal(SlidingEventArgs e)
 {
     this.OnSlidingOut(e);
 }
Пример #5
0
 /// <summary>
 /// Called from SlideControl
 /// </summary>
 internal void OnSlidingInInternal(SlidingEventArgs e)
 {
     this.OnSlidingIn(e);
 }
Пример #6
0
 /// <summary>
 /// Called from SlideControl
 /// </summary>
 /// <param name="e"></param>
 internal void OnSlidingOutInternal(SlidingEventArgs e) { this.OnSlidingOut(e); }
Пример #7
0
 /// <summary>
 /// Called from SlideControl
 /// </summary>
 internal void OnSlidingInInternal(SlidingEventArgs e) { this.OnSlidingIn(e); }
Пример #8
0
 /// <summary>
 /// Whenever this slide is about to clear the way for a new slide.
 /// </summary>
 /// <param name="e">OnSlidingOut arguments.</param>
 protected virtual void OnSlidingOut(SlidingEventArgs e) { }