Esempio n. 1
0
        public void Back()
        {
            IWizardView nextView = null;

            if (CurrentView != null)
            {
                CurrentView.OnNavigatingAwayBackward();
            }

            switch (CurrentStep)
            {
            case WizardStep.SelectEntities:
                SetStep(WizardStep.SelectStore);
                nextView = RootWorkItem.SmartParts.GetFirstOrCreate <SelectStoreView>();
                break;

            case WizardStep.EditEntities:
                SetStep(WizardStep.SelectEntities);
                nextView = RootWorkItem.SmartParts.GetFirstOrCreate <SelectEntitiesView>();
                break;

            case WizardStep.GenerateCode:
                SetStep(WizardStep.EditEntities);
                nextView = RootWorkItem.SmartParts.GetFirstOrCreate <EditEntitiesView>();
                break;
            }

            if (nextView != null)
            {
                nextView.OnNavigatingToBackward();
                Workspace.Show(nextView);
                CurrentView = nextView;
            }
        }