public void Submitted(HandInType handInType, HandInStatus handInStatus) { DispatcherHelper.CheckBeginInvokeOnUI((Action)(() => { this.HandInType = handInType; this.SubmittedAfterDeadline = handInType == HandInType.HandIn && (handInStatus == HandInStatus.TaggedLate || handInStatus == HandInStatus.UploadedLate); })); }
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))); }
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; })); } }
public OnSubmitHandIn(HandInStatus handInStatus, IEnumerable <SubmitHandInFileModel> handInFiles) { this.HandInStatus = handInStatus; this.HandInFiles = handInFiles; }
public OnHandInStatusHandInTypeUpdated(HandInType handInType, HandInStatus handInStatus) { this.HandInType = handInType; this.HandInStatus = handInStatus; }
public OnSubmitBlankHandIn(HandInStatus handInStatus) { this.HandInStatus = handInStatus; }