Exemple #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);
     }));
 }
 private void OnSubmitBlankHandIn(OnSubmitBlankHandIn onSubmitBlankHandIn)
 {
     DispatcherHelper.CheckBeginInvokeOnUI((Action)(() =>
     {
         this.CurrentHandInStatus = onSubmitBlankHandIn.HandInStatus;
         this.CurrentHandInType = HandInType.Blank;
         this.StateViewModel.UpdateActiveView(ViewState.HandInReceived);
         this._handInReceivedViewModel.Submitted(this.CurrentHandInType, this.CurrentHandInStatus);
         this.CurrentViewModel = (IBaseViewModel)this._handInReceivedViewModel;
     }));
 }
 private void OnHandInReceivedUpdated(OnHandInStatusHandInTypeUpdated onHandInStatusHandInTypeUpdated)
 {
     if (this.CurrentHandInStatus == onHandInStatusHandInTypeUpdated.HandInStatus)
     {
         return;
     }
     this.CurrentHandInStatus = onHandInStatusHandInTypeUpdated.HandInStatus;
     this.CurrentHandInType   = onHandInStatusHandInTypeUpdated.HandInType;
     if (!this._workSpaceViewModel.HasVerifiedPinCode())
     {
         return;
     }
     this.UpdateViewBasedOnCurrentHandIn(this.CurrentHandInType, this.CurrentHandInStatus);
 }
 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;
         }));
     }
 }
Exemple #5
0
 public OnHandInStatusHandInTypeUpdated(HandInType handInType, HandInStatus handInStatus)
 {
     this.HandInType   = handInType;
     this.HandInStatus = handInStatus;
 }