Esempio n. 1
0
        /// <summary>
        /// Closes the current page after a <see cref="WizardPage.CloseFromBack"/>, then moves to
        /// the previous page and calls <see cref="WizardPage.ShowFromBack"/>
        /// </summary>
        public void Back()
        {
            Debug.Assert(this.PageIndex < vPages.Count, "Page Index was beyond Maximum pages");
            //Can I press back
            Debug.Assert(this.PageIndex > 0 && this.PageIndex < vPages.Count, "Attempted to go back to a page that doesn't exist");
            //Tell the application that I closed a page
            int newPage = vActivePage.OnCloseFromBack(this);

            ActivatePage(newPage);
            //Tell the application I have shown a page
            vActivePage.OnShowFromBack(this);
        }
Esempio n. 2
0
        /// <summary>
        /// Closes the current page after a <see cref="WizardPage.CloseFromBack"/>, then moves to
        /// the previous page and calls <see cref="WizardPage.ShowFromBack"/>
        /// </summary>
        public void Back()
        {
            Debug.Assert(this.PageIndex < vPages.Count, "Page Index was beyond Maximum pages");
            //Can I press back
            Debug.Assert(this.PageIndex > 0 && this.PageIndex < vPages.Count, "Attempted to go back to a page that doesn't exist");
            //Tell the application that I closed a page
            int newPage = vActivePage.OnCloseFromBack(this);

            // If we are stack drivin, push the last page onto the stack
            if (mPushPop)
            {
                mForwardPush = false;
                ActivatePage(this.Pop());
                mForwardPush = true;
            }
            else
            {
                ActivatePage(newPage);
            }

            //Tell the application I have shown a page
            vActivePage.OnShowFromBack(this);
        }