Example #1
0
        private void FinishButton_Click(object sender, RoutedEventArgs e)
        {
            //First we validate all pages are OK
            foreach (WizardPage p in mWizard.Pages)
            {
                errorsFound = false;
                if (VisualTreeHelper.GetChildrenCount((Page)p.Page) == 0)
                {
                    JumpToPage(p);
                }
                if (HasValidationsIssues((Page)p.Page))// TODO: focus on the item and highlight
                {
                    if (mWizard.Pages.CurrentItem != p)
                    {
                        JumpToPage(p);
                    }
                    return;
                }
            }



            // TODO: verify all apges pass validation

            NavigationList.SelectionChanged -= NavigationList_SelectionChanged;

            mWizard.ProcessFinish();

            CloseWizard();

            //if (mWizard.mWizardWindow == null)
            //{
            //    // If no page cancelled the Finish then all OK and we can close
            //    CurrentWizardWindow = null;
            //    mWizard = null;

            //}
            //else
            //{
            //    UpdatePrevNextButton();
            //    RefreshCurrentPage();
            //    NavigationList.SelectionChanged += NavigationList_SelectionChanged;
            //}
        }
Example #2
0
        private void FinishButton_Click(object sender, RoutedEventArgs e)
        {
            //First we validate all pages are OK
            foreach (WizardPage p in mWizard.Pages)
            {
                errorsFound = false;
                SearchValidationsRecursive((Page)p.Page);
                if (mValidationErrors.Count > 0 || errorsFound)// TODO: focus on the item and highlight
                {
                    mWizard.Pages.CurrentItem = p;
                    UpdatePrevNextButton();
                    RefreshCurrentPage();
                    return;
                }
            }



            // TODO: verify all apges pass validation

            NavigationList.SelectionChanged -= NavigationList_SelectionChanged;

            mWizard.ProcessFinish();

            CloseWizard();

            //if (mWizard.mWizardWindow == null)
            //{
            //    // If no page cancelled the Finish then all OK and we can close
            //    CurrentWizardWindow = null;
            //    mWizard = null;

            //}
            //else
            //{
            //    UpdatePrevNextButton();
            //    RefreshCurrentPage();
            //    NavigationList.SelectionChanged += NavigationList_SelectionChanged;
            //}
        }
Example #3
0
        private void FinishButton_Click(object sender, RoutedEventArgs e)
        {
            //First we validate all pages are OK
            WindowCloseWasHandled = true;

            if (xProcessingImage.Visibility == Visibility.Visible)
            {
                Reporter.ToUser(eUserMsgKey.WizardCantMoveWhileInProcess, "Finish");
            }
            else
            {
                foreach (WizardPage p in mWizard.Pages)
                {
                    errorsFound = false;
                    if (VisualTreeHelper.GetChildrenCount((Page)p.Page) == 0)
                    {
                        JumpToPage(p);
                    }
                    if (HasValidationsIssues((Page)p.Page))// TODO: focus on the item and highlight
                    {
                        if (mWizard.Pages.CurrentItem != p)
                        {
                            JumpToPage(p);
                        }
                        return;
                    }
                }

                // TODO: verify all pages pass validation

                NavigationList.SelectionChanged -= NavigationList_SelectionChanged;

                mWizard.ProcessFinish();

                CloseWizard();
            }
        }