Пример #1
0
 public WizardStepMenuItemViewOpener(IWizardNavigator <TWizardContext> navigator, IEventAggregator eventAggregator, IWizardStepProgressService <TWizardContext> wizardStepProgressService, IWizardStepsService wizardService)
 {
     if (navigator == null)
     {
         throw new ArgumentNullException("navigator");
     }
     if (eventAggregator == null)
     {
         throw new ArgumentNullException("eventAggregator");
     }
     if (wizardStepProgressService == null)
     {
         throw new ArgumentNullException("wizardStepProgressService");
     }
     if (wizardService == null)
     {
         throw new ArgumentNullException("wizardService");
     }
     this.WizardService   = wizardService;
     this.Navigator       = navigator;
     this.EventAggregator = eventAggregator;
     this.EventAggregator.GetEvent <WizardStepCompleted>().Subscribe(OnWizardStepCompleted, true);
     this.WizardStepProgressService = wizardStepProgressService;
     this.PropertyChanged          += WizardStepMenuItemViewOpenerPropertyChanged;
 }
Пример #2
0
 public WizardViewModel(IWizardStepsService wizardStepsService, IWizardNavigator <TWizardContext> wizardNavigator, IWizardStepProgressService <TWizardContext> wizardStepProgressService, IEventAggregator eventAggregator)
 {
     this.eventAggregator = eventAggregator;
     if (wizardStepsService == null)
     {
         throw new ArgumentNullException("wizardStepsService");
     }
     if (wizardNavigator == null)
     {
         throw new ArgumentNullException("wizardNavigator");
     }
     if (wizardStepProgressService == null)
     {
         throw new ArgumentNullException("wizardStepProgressService");
     }
     if (eventAggregator == null)
     {
         throw new ArgumentNullException("eventAggregator");
     }
     this.eventAggregator.GetEvent <WizardStepViewActivated>().Subscribe(SetViewAsActive);
     this.WizardStepsService        = wizardStepsService;
     this.WizardNavigator           = wizardNavigator;
     this.WizardStepProgressService = wizardStepProgressService;
     this.SaveCommand         = new DelegateCommand(Save, CanSave);
     this.ResetCommand        = new DelegateCommand(Reset);
     this.PreviousStepCommand = new DelegateCommand(MoveStepPreviousStep);
     this.NextStepCommand     = new DelegateCommand(MoveStepForward, CanGoNext);
 }