public StateHandlerViewModel(IUpdateProgramViewModel updateProgramViewModel, IHealthCheckViewModel healthCheckViewModel, ILoginViewModel loginViewModel, IOngoingExamViewModel ongoingExamViewModel, IWorkSpaceViewModel workSpaceViewModel, IHandInReceivedViewModel handInReceivedViewModel, IMessenger messenger, IStateViewModel stateViewModel, ISubmitHandInViewModel submitHandInViewModel, IHandInSubmittingViewModel handInSubmittingViewModel) { this._updateProgramViewModel = updateProgramViewModel; this._healthCheckViewModel = healthCheckViewModel; this._loginViewModel = loginViewModel; this._workSpaceViewModel = workSpaceViewModel; this._ongoingExamViewModel = ongoingExamViewModel; this._handInReceivedViewModel = handInReceivedViewModel; this._messenger = messenger; this._stateViewModel = stateViewModel; this._submitHandInViewModel = submitHandInViewModel; this._handInSubmittingViewModel = handInSubmittingViewModel; messenger.Register <OnSuccessfulLogin>((object)this, new Action <OnSuccessfulLogin>(this.OnSuccessfulLogin)); messenger.Register <OnSuccessfulHealthCheck>((object)this, new Action <OnSuccessfulHealthCheck>(this.OnSuccessfulHealthCheck)); messenger.Register <OnExamStarted>((object)this, new Action <OnExamStarted>(this.OnExamStarted)); messenger.Register <OnHandInStatusHandInTypeUpdated>((object)this, new Action <OnHandInStatusHandInTypeUpdated>(this.OnHandInReceivedUpdated)); messenger.Register <OnUpdateFinished>((object)this, new Action <OnUpdateFinished>(this.OnUpdateFinished)); this.OnCheckForUpdates((OnCheckForUpdates)null); messenger.Register <OnCheckForUpdates>((object)this, new Action <OnCheckForUpdates>(this.OnCheckForUpdates)); messenger.Register <OnSubmitBlankHandIn>((object)this, new Action <OnSubmitBlankHandIn>(this.OnSubmitBlankHandIn)); messenger.Register <OnSubmitHandIn>((object)this, new Action <OnSubmitHandIn>(this.OnSubmitHandIn)); messenger.Register <OnInitiateSubmitHandIn>((object)this, new Action <OnInitiateSubmitHandIn>(this.OnInitiateSubmitHandIn)); messenger.Register <OnEnableHandInReceived>((object)this, new Action <OnEnableHandInReceived>(this.OnEnableHandInReceived)); messenger.Register <OnAllowHandInReceived>((object)this, new Action <OnAllowHandInReceived>(this.OnAllowHandInReceived)); }
public MenuViewModel(INavigationController controller, IProjectService projectController, ICurrentProjectService currentProjectService, IStateViewModel stateViewModel, IOptionsMonitor <AppOptions> monitor) { _subscription = monitor.OnChange(async p => await InitializeAsync()); MenuItems = new ObservableCollection <MenuItem>(); MenuItems.Add(new MenuItem("Areas", new DelegateCommand(() => controller.ShowAsync <AreasViewModel>()))); MenuItems.Add(new MenuItem("Settings", new DelegateCommand(() => controller.ShowAsync <SettingsViewModel>()))); this._navigationController = controller; this._projectService = projectController; this._currentProjectService = currentProjectService; this.StateViewModel = stateViewModel; }
public StateView(IStateViewModel viewModel) { InitializeComponent(); ViewModel = viewModel; }
public void SetNextState(IStateViewModel state) { this.nextState = state; }