예제 #1
0
 public void Submitted(HandInType handInType, HandInStatus handInStatus)
 {
     DispatcherHelper.CheckBeginInvokeOnUI((Action)(() =>
     {
         this.HandInType = handInType;
         this.SubmittedAfterDeadline = handInType == HandInType.HandIn && (handInStatus == HandInStatus.TaggedLate || handInStatus == HandInStatus.UploadedLate);
     }));
 }
예제 #2
0
 public void SubmittedHandIn(HandInStatus handInStatus, IEnumerable <SubmitHandInFileModel> submitHandInFiles)
 {
     DispatcherHelper.CheckBeginInvokeOnUI((Action)(() =>
     {
         this.SubmittedAfterDeadline = handInStatus == HandInStatus.TaggedLate || handInStatus == HandInStatus.UploadedLate;
         this.ProgressCurrent = 0.0;
         this.UpdateLanguage((OnLanguageChanged)null);
     }));
     Task.Factory.StartNew((Action)(() => this._handInUploadService.Upload(submitHandInFiles)));
 }
예제 #3
0
 private void UpdateViewBasedOnCurrentHandIn(HandInType handInType, HandInStatus handInStatus)
 {
     if (handInType == HandInType.HandIn && handInStatus.HasTagged())
     {
         DispatcherHelper.CheckBeginInvokeOnUI((Action)(() =>
         {
             if (this.CurrentViewModel == this._handInSubmittingViewModel)
             {
                 return;
             }
             this.StateViewModel.UpdateActiveView(ViewState.Ongoing);
             this._handInSubmittingViewModel.SubmittedHandIn(handInStatus, this._submitHandInViewModel.GetHandInFiles());
             this.CurrentViewModel = (IBaseViewModel)this._handInSubmittingViewModel;
         }));
     }
     else if (handInStatus.HasUploaded())
     {
         DispatcherHelper.CheckBeginInvokeOnUI((Action)(() =>
         {
             this.StateViewModel.UpdateActiveView(ViewState.HandInReceived);
             this._handInReceivedViewModel.Submitted(handInType, handInStatus);
             this.CurrentViewModel = (IBaseViewModel)this._handInReceivedViewModel;
         }));
     }
     else
     {
         if (handInStatus != HandInStatus.NotTagged)
         {
             return;
         }
         DispatcherHelper.CheckBeginInvokeOnUI((Action)(() =>
         {
             this.StateViewModel.UpdateActiveView(ViewState.Ongoing);
             this.CurrentViewModel = (IBaseViewModel)this._ongoingExamViewModel;
         }));
     }
 }
예제 #4
0
 public OnSubmitHandIn(HandInStatus handInStatus, IEnumerable <SubmitHandInFileModel> handInFiles)
 {
     this.HandInStatus = handInStatus;
     this.HandInFiles  = handInFiles;
 }
예제 #5
0
 public OnHandInStatusHandInTypeUpdated(HandInType handInType, HandInStatus handInStatus)
 {
     this.HandInType   = handInType;
     this.HandInStatus = handInStatus;
 }
예제 #6
0
 public OnSubmitBlankHandIn(HandInStatus handInStatus)
 {
     this.HandInStatus = handInStatus;
 }