private void NavigateToFirstStep() { this.ActiveStep = null; this.ActiveViewModel = null; var firstStep = WizardStepsService.GetFirstStep(); WizardNavigator.OpenView(firstStep.ViewTargetName, WizardContext); }
private void MoveToNextStepAfterSuccesfulSave(SaveResult saveResult) { if (saveResult != SaveResult.Success) { return; } WizardStepProgressService.SetStepProgressCompleted(WizardContext, ActiveStep); var nextWizardStep = WizardStepsService.GetNextStep(ActiveStep); WizardNavigator.OpenView(nextWizardStep.ViewTargetName, WizardContext); }
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); } }
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(); }
public void MoveStepPreviousStep() { var previousWizardStep = WizardStepsService.GetPreviousStep(ActiveStep); WizardNavigator.OpenView(previousWizardStep.ViewTargetName, WizardContext); }
private void EnableDisablePreviousStepAndForwardButtons() { CanGoPreviousStep = this.ActiveStep.StepOrder != 1; CanGoNextStep = !WizardStepsService.IsLastStep(ActiveStep); }