private async void ViewWathcResult(IConnectionStatusView sender) { try { await ApplicationController.Run <LoadingContextPresenter <object>, Task <object> >(Task.Run(() => { DocXService.GetInstance().ExamDocXWorker.OpenResult(Argument.Session.Exam, currentSessionClient.ExecutionResult); return(LoadingContextPresenter <object> .EmptyObject); })).GetTask(); } catch (Exception ex) { View.ShowError(ex.Message); } }
private async void ViewWatchResult(IStartView sender) { try { Exam exam = sender.CurrentExam; ExecutionResult result = sender.CurrentExecutionResult; await ApplicationController.Run <LoadingContextPresenter <object>, Task <object> >(Task.Run(() => { DocXService.GetInstance().ExamDocXWorker.OpenResult(exam, result); return(LoadingContextPresenter <object> .EmptyObject); })).GetTask(); } catch (Exception ex) { View.ShowError(ex.Message); } }
private async void ViewWatchTask(IStartView sender) { try { Exam exam = sender.CurrentExam; Ticket ticket = sender.CurrentTicket; bool setRightAnswer = sender.SetRightAnswer; await ApplicationController.Run <LoadingContextPresenter <object>, Task <object> >(Task.Run(() => { DocXService.GetInstance().ExamDocXWorker.OpenTask(exam, ticket, setRightAnswer); return(LoadingContextPresenter <object> .EmptyObject); })).GetTask(); } catch (Exception ex) { View.ShowError(ex.Message); } }
private async void ViewWatchTask(IEditSavingView sender) { try { Exam exam = GetCheckedExam(); if (exam == null) { return; } int ticketNumber = sender.CurrentTicket.Instance.TicketNumber; Ticket ticket = GetTicket(exam, ticketNumber); await ApplicationController.Run <LoadingContextPresenter <object>, Task <object> >(Task.Run(() => { DocXService.GetInstance().ExamDocXWorker.OpenTask(exam, ticket, false); return(LoadingContextPresenter <object> .EmptyObject); })).GetTask(); } catch (Exception ex) { View.ShowError(ex.Message); } }