public SubmitHandInViewModel(ILastSaveViewModel lastSaveViewModel, IExamTimeLeftViewModel examTimeLeftViewModel, ILanguageService languageService, IHandInFieldValueStorageService handInFieldValueStorageService, IHandInFileSelectorViewModel handInFileSelectorViewModel, IMessenger messenger, IHandInFileService handInFileService, IBoardingPassStorageService boardingPassStorageService, IHandInFieldIdStorageService handInFieldIdStorageService, IHeartbeatService heartbeatService)
 {
     this._languageService = languageService;
     this._handInFieldValueStorageService = handInFieldValueStorageService;
     this._messenger                   = messenger;
     this._handInFileService           = handInFileService;
     this._boardingPassStorageService  = boardingPassStorageService;
     this._handInFieldIdStorageService = handInFieldIdStorageService;
     this._heartbeatService            = heartbeatService;
     this.LastSaveViewModel            = lastSaveViewModel;
     this.ExamTimeLeftViewModel        = examTimeLeftViewModel;
     this.HandInFileSelectorViewModel  = handInFileSelectorViewModel;
     this._messenger.Register <OnInitiateSubmitHandIn>((object)this, new Action <OnInitiateSubmitHandIn>(this.OnInitiateSubmitHandIn));
     this.PreviousViewCommand = (ICommand) new RelayCommand((Action <object>)(c => this.PreviousViewClick()), (Predicate <object>)null);
     this.NextViewCommand     = (ICommand) new RelayCommand((Action <object>)(c => this.NextViewClick()), (Predicate <object>)null);
     this._messenger.Register <OnHandInFieldsLoaded>((object)this, new Action <OnHandInFieldsLoaded>(this.OnHandInFieldsLoaded));
     this._messenger.Register <OnHandInFieldInputLostFocus>((object)this, new Action <OnHandInFieldInputLostFocus>(this.OnHandInFieldInputLostFocus));
 }
Beispiel #2
0
 public OngoingExamViewModel(ILanguageService languageService, IMessenger messenger, ILastSaveViewModel lastSaveViewModel, IExamTimeLeftViewModel examTimeLeftViewModel, IFlexClient flexClient)
 {
     this._languageService             = languageService;
     this._messenger                   = messenger;
     this._flexClient                  = flexClient;
     this.LastSaveViewModel            = lastSaveViewModel;
     this.ExamTimeLeftViewModel        = examTimeLeftViewModel;
     this.AssignmentFilesPathViewModel = new PathLinkViewModel();
     this.HandInPathViewModel          = new PathLinkViewModel();
     this.UpdateLanguage((OnLanguageChanged)null);
     messenger.Register <OnLanguageChanged>((object)this, new Action <OnLanguageChanged>(this.UpdateLanguage));
     messenger.Register <OnExaminationDataLoaded>((object)this, new Action <OnExaminationDataLoaded>(this.OnExaminationDataLoaded));
     messenger.Register <OnWorkspacePathsSet>((object)this, new Action <OnWorkspacePathsSet>(this.OnHandInPathSet));
     messenger.Register <OnEnableHandInReceived>((object)this, new Action <OnEnableHandInReceived>(this.OnEnableHandInReceived));
     messenger.Register <OnAllowHandInReceived>((object)this, new Action <OnAllowHandInReceived>(this.OnAllowHandInReceived));
     messenger.Register <OnExaminationUrlLoaded>((object)this, new Action <OnExaminationUrlLoaded>(this.OnExaminationUrlLoaded));
     this.IsHandInEnabled     = true;
     this.SubmitBlankCommand  = (ICommand) new RelayCommand((Action <object>)(c => this.SubmitBlankClick()), (Predicate <object>)null);
     this.SubmitHandInCommand = (ICommand) new RelayCommand((Action <object>)(c => this.SubmitHandInClick()), (Predicate <object>)null);
 }