示例#1
0
 public WorkSpaceViewModel(IMessenger messenger, ISelectDirectoryService selectDirectoryService, IWorkspaceStorageService workspaceStorageService, IAssignmentFileService assignmentFileService, IDirectoryService directoryService, ILanguageService languageService, IPinCodeStorageService pinCodeStorageService, IBackupService backupService, ISafePathService safePathService, IPinCodeValidator pinCodeValidator, ITimerService examStartsTimer, IDirectoryAccessValidator directoryAccessValidator, ITimerService lockUiOnInvalidPinCodeTimerService, IBoardingPassStorageService boardingPassStorageService, ITimerService assignmentFilesRedownloadTimerService, ILoggerService loggerService)
 {
     this._messenger = messenger;
     this._selectDirectoryService                          = selectDirectoryService;
     this._workspaceStorageService                         = workspaceStorageService;
     this._assignmentFileService                           = assignmentFileService;
     this._directoryService                                = directoryService;
     this._languageService                                 = languageService;
     this._pinCodeStorageService                           = pinCodeStorageService;
     this._backupService                                   = backupService;
     this._safePathService                                 = safePathService;
     this._pinCodeValidator                                = pinCodeValidator;
     this._examStartsTimer                                 = examStartsTimer;
     this._directoryAccessValidator                        = directoryAccessValidator;
     this._lockUiOnInvalidPinCodeTimerService              = lockUiOnInvalidPinCodeTimerService;
     this._boardingPassStorageService                      = boardingPassStorageService;
     this._assignmentFilesRedownloadTimerService           = assignmentFilesRedownloadTimerService;
     this._loggerService                                   = loggerService;
     this._examStartsTimer.AutoReset                       = false;
     this._examStartsTimer.Elapsed                        += (ElapsedEventHandler)((sender, args) => this.ExamHasStarted());
     this._assignmentFilesRedownloadTimerService.AutoReset = false;
     this._assignmentFilesRedownloadTimerService.Elapsed  += new ElapsedEventHandler(this.AssignmentFilesRedownloadTimerService_Elapsed);
     this._assignmentFilesRedownloadTimerService.Interval  = 600000.0;
     this.SetWorkspacePathCommand                          = (ICommand) new RelayCommand((Action <object>)(c => this.SetWorkspaceClick()), (Predicate <object>)null);
     this.ShowUnlockAssignmentFilesCommand                 = (ICommand) new RelayCommand((Action <object>)(c => this.ShowUnlockAssignmentFilesClick()), (Predicate <object>)null);
     this.UpdateLanguage((OnLanguageChanged)null);
     messenger.Register <OnLanguageChanged>((object)this, new Action <OnLanguageChanged>(this.UpdateLanguage));
     messenger.Register <OnTimeLeftUntilExamStarts>((object)this, new Action <OnTimeLeftUntilExamStarts>(this.OnTimeLeftUntilExamStarts));
     messenger.Register <OnExaminationDataLoaded>((object)this, new Action <OnExaminationDataLoaded>(this.OnExaminationDataLoaded));
     messenger.Register <OnPinCodeLoginSuccessful>((object)this, new Action <OnPinCodeLoginSuccessful>(this.OnPinCodeLoginSuccessful));
     messenger.Register <OnPinCodeLoginForceContinue>((object)this, new Action <OnPinCodeLoginForceContinue>(this.OnPinCodeLoginForceContinue));
     messenger.Register <OnExaminationUrlLoaded>((object)this, new Action <OnExaminationUrlLoaded>(this.OnExaminationUrlLoaded));
 }
示例#2
0
 public LogDumpService(IBoardingPassStorageService boardingPassStorageService, IFileService fileService, IConfigurationService configurationService, IGlobalLogService globalLogService)
 {
     this._boardingPassStorageService = boardingPassStorageService;
     this._fileService          = fileService;
     this._configurationService = configurationService;
     this._globalLogService     = globalLogService;
 }
 public HandInSubmittingViewModel(ILanguageService languageService, IMessenger messenger, IHandInUploadService handInUploadService, IBoardingPassStorageService boardingPassStorageService, IHandInFileService handInFileService)
 {
     this._languageService            = languageService;
     this._handInUploadService        = handInUploadService;
     this._boardingPassStorageService = boardingPassStorageService;
     this._handInFileService          = handInFileService;
     this.UpdateLanguage((OnLanguageChanged)null);
     messenger.Register <OnLanguageChanged>((object)this, new Action <OnLanguageChanged>(this.UpdateLanguage));
     messenger.Register <OnHandInUploadProgressUpdated>((object)this, new Action <OnHandInUploadProgressUpdated>(this.OnHandInUploadProgressUpdated));
     messenger.Register <OnExaminationUrlLoaded>((object)this, new Action <OnExaminationUrlLoaded>(this.OnExaminationUrlLoaded));
 }
示例#4
0
 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));
 }
示例#5
0
 public LoginViewModel(IMessenger messenger, IBoardingPassValidator boardingPassValidator, ILanguageService languageService, IConfigurationService configurationService, ITimerService loginAttemptsTimer, IBoardingPassStorageService boardingPassStorageService, IFlexClient flexClient, IHeartbeatService heartbeatService, IStorageCleanerService storageCleanerService)
 {
     this._messenger                  = messenger;
     this._boardingPassValidator      = boardingPassValidator;
     this._languageService            = languageService;
     this._configurationService       = configurationService;
     this._loginAttemptsTimer         = loginAttemptsTimer;
     this._boardingPassStorageService = boardingPassStorageService;
     this._flexClient                 = flexClient;
     this._heartbeatService           = heartbeatService;
     this._storageCleanerService      = storageCleanerService;
     this._messenger.Register <OnSuccessfulHealthCheck>((object)this, new Action <OnSuccessfulHealthCheck>(this.OnSuccessfulHealthCheck));
     this.UpdateText((OnLanguageChanged)null);
     this._messenger.Register <OnLanguageChanged>((object)this, new Action <OnLanguageChanged>(this.UpdateText));
     this._messenger.Register <OnLoginErrorPopupClosed>((object)this, new Action <OnLoginErrorPopupClosed>(this.OnLoginErrorPopupClosed));
     this.LoginCommand = (ICommand) new RelayCommand((Action <object>)(c => this.LoginClick()), (Predicate <object>)null);
     this._loginAttemptsTimer.AutoReset = false;
     this._loginAttemptsTimer.Interval  = (double)(configurationService.BoardingPassLoginLockDurationInSeconds * 1000);
     this._loginAttemptsTimer.Elapsed  += (ElapsedEventHandler)((s, e) =>
     {
         DispatcherHelper.CheckBeginInvokeOnUI((Action)(() => this.CanLogin = true));
         this.LoginAttemptsCounter = 0;
     });
 }
示例#6
0
 public StorageCleanerService(IBoardingPassStorageService boardingPassStorageService)
 {
     this._boardingPassStorageService = boardingPassStorageService;
 }