示例#1
0
        private void NavigateToFirstStep()
        {
            this.ActiveStep      = null;
            this.ActiveViewModel = null;
            var firstStep = WizardStepsService.GetFirstStep();

            WizardNavigator.OpenView(firstStep.ViewTargetName, WizardContext);
        }
示例#2
0
        private void MoveToNextStepAfterSuccesfulSave(SaveResult saveResult)
        {
            if (saveResult != SaveResult.Success)
            {
                return;
            }

            WizardStepProgressService.SetStepProgressCompleted(WizardContext, ActiveStep);
            var nextWizardStep = WizardStepsService.GetNextStep(ActiveStep);

            WizardNavigator.OpenView(nextWizardStep.ViewTargetName, WizardContext);
        }
示例#3
0
        protected void LoadMenuItems()
        {
            var steps = WizardStepsService.GetAllSteps();

            foreach (var wizardStep in steps)
            {
                var menuItem = ServiceLocator.GetInstance <TWizardMenuItem>();
                menuItem.WizardStep      = wizardStep;
                menuItem.Name            = wizardStep.StepName;
                menuItem.Description     = wizardStep.Description;
                menuItem.OrderHint       = wizardStep.StepOrder;
                menuItem.MenuItemContext = this.MenuContext;
                this.AddMenuItem(menuItem);
            }
        }
示例#4
0
        public void SetViewAsActive(IWizardStepViewModel wizardStepViewModel)
        {
            if (this.ActiveViewModel != null)
            {
                this.ActiveViewModel.DataChanged -= ActiveViewModelDataChanged;
            }

            this.ActiveViewModel = wizardStepViewModel;

            CheckComnandsCanExecute();

            this.ActiveViewModel.DataChanged += ActiveViewModelDataChanged;

            this.ActiveStep = WizardStepsService.GetWizardStep(wizardStepViewModel);

            EnableDisablePreviousStepAndForwardButtons();
        }
示例#5
0
        public void MoveStepPreviousStep()
        {
            var previousWizardStep = WizardStepsService.GetPreviousStep(ActiveStep);

            WizardNavigator.OpenView(previousWizardStep.ViewTargetName, WizardContext);
        }
示例#6
0
 private void EnableDisablePreviousStepAndForwardButtons()
 {
     CanGoPreviousStep = this.ActiveStep.StepOrder != 1;
     CanGoNextStep     = !WizardStepsService.IsLastStep(ActiveStep);
 }