Exemplo n.º 1
0
        /// <summary>
        /// Go to the specified slide.  If it is already shown, then recompute its layout.
        /// </summary>
        public void GoToSlide(PMultiSizeImage slide)
        {
            if (hiliteSlide != slide)
            {
                HiliteSlide(-1);                  // Unhilite any slide that might be hilited
            }

            // First unfocus any slide that has focus
            if ((focusSlide != null) && (focusSlide != slide))
            {
                ((PMultiSizeImage)focusSlide).ShowThumb = true;
                focusSlide.AnimateToMatrix(GetUnfocusedMatrix(focusSlide, (int)focusSlide.Tag), ANIMATION_TIME_MILLIS);
            }

            // Then set the focus to the new slide
            focusSlide = slide;
            if (focusSlide != null)
            {
                ((PMultiSizeImage)focusSlide).Hilite = false;
                PTransformActivity activity = focusSlide.AnimateToMatrix(GetFocusedMatrix(focusSlide), ANIMATION_TIME_MILLIS);
                activity.ActivityFinished = new ActivityFinishedDelegate(FocusActivityFinished);

                // Move the current position indicator to the new focus slide's spot in the slide bar
                LayoutCurrentPosition();
            }
        }
Exemplo n.º 2
0
		/// <summary>
		/// Go to the specified slide.  If it is already shown, then recompute its layout.
		/// </summary>
		public void GoToSlide(PMultiSizeImage slide) {
			if (hiliteSlide != slide) {
				HiliteSlide(-1);  // Unhilite any slide that might be hilited
			}

			// First unfocus any slide that has focus
			if ((focusSlide != null) && (focusSlide != slide)) {
				((PMultiSizeImage)focusSlide).ShowThumb = true;
				focusSlide.AnimateToMatrix(GetUnfocusedMatrix(focusSlide, (int)focusSlide.Tag), ANIMATION_TIME_MILLIS);
			}

			// Then set the focus to the new slide
			focusSlide = slide;
			if (focusSlide != null) {
				((PMultiSizeImage)focusSlide).Hilite = false;
				PTransformActivity activity = focusSlide.AnimateToMatrix(GetFocusedMatrix(focusSlide), ANIMATION_TIME_MILLIS);
				activity.ActivityFinished = new ActivityFinishedDelegate(FocusActivityFinished);

				// Move the current position indicator to the new focus slide's spot in the slide bar
				LayoutCurrentPosition();
			}
		}