Esempio n. 1
0
        private void NavigateToPage(WizardPageFunction wizardPage)
        {
            if (wizardPage == null)
            {
                throw new ArgumentNullException("wizardPage");
            }

            wizardPage.Initialize(m_Project);

            //wizardPage.Return += new ReturnEventHandler<BuildProject>(wizardPage_Return);

            //TEMP: Because PageFunctions are broken
            wizardPage.ReturnTemp += new WizardPageFunction.ReturnEventDelegate(wizardPage_Return);

            WizardFrame.Navigate(wizardPage);
        }
Esempio n. 2
0
        void wizardPage_Return(object sender, ReturnEventArgs <BuildProject> e)
        {
            //Retrieve the current page
            WizardPageFunction currentPage = (WizardPageFunction)WizardFrame.Content;

            //Get the index of the next page
            int nextIndex = wizardPages.IndexOf(currentPage) + 1;

            if (nextIndex == wizardPages.Count - 1)
            {
                //clear history
                while (this.CanGoBack)
                {
                    this.RemoveBackEntry();
                }

                this.NavContainer.BeginStoryboard(FindResource("HideNavBar") as Storyboard);
            }

            //Navigate to the next page
            if (nextIndex < wizardPages.Count)
            {
                this.NavigateToPage(wizardPages[nextIndex]);
            }
            else
            {
                DesignerWindow designWindow = new DesignerWindow(m_Project);
                designWindow.Show();

                this.Close();
            }

            //See if the Next and Back buttons are allowed
            this.NavigateNextButton.IsEnabled = (nextIndex < (wizardPages.Count - 1));
            this.NavigateBackButton.IsEnabled = (nextIndex > 0);
        }
Esempio n. 3
0
        public void NavigateNext()
        {
            WizardPageFunction currentPage = (WizardPageFunction)WizardFrame.Content;

            currentPage.Done(m_Project);
        }