protected override void ExecuteCommand() { base.ExecuteCommand(); try { contactHPSSTask = new AsyncTask(OpenBrowserToHPSSContactEndpoint , null , TaskFinishedCallback , 5000); AsyncTask.AsyncExecute(contactHPSSTask); } catch (Exception ex) { Logger.E(ex.Message); } }
protected override void ExecuteCommand() { base.ExecuteCommand(); cts = new CancellationTokenSource(); var ct = cts.Token; try { requestCheckUpdateTask = new AsyncTask(SendRequestAppUpdateToHpssServer , null , RequestCheckUpdateCallback , 0); AsyncTask.AsyncExecute(requestCheckUpdateTask, ct); } catch (Exception ex) { Logger.E(ex.Message); } }
protected override void ExecuteCommand() { BRPViewModel.ButtonCommandOV.IsSendReportButtonRunning = true; base.ExecuteCommand(); if (BRPViewModel.IssueInfoOV.IsIssueInfoMeetCondition && BRPViewModel.ProductInfoOV.IsProductInfoMeetCondition && BRPViewModel.UserInfoOV.IsUserInfoMeetCondition) { cts = new CancellationTokenSource(); var ct = cts.Token; try { requestSendBugReportTask = new AsyncTask(SendRequestSaveBugReportToHpssServer , null , RequestSaveBugReportCallback , 0); AsyncTask.AsyncExecute(requestSendBugReportTask, ct); } catch (Exception ex) { Logger.E(ex.Message); } HttpClient httpCl = new HttpClient(); MultipartFormDataContent form = new MultipartFormDataContent(); } else { App.Current.ShowApplicationMessageBox("Vui lòng điền đầy đủ thông tin!", HPSolutionCCDevPackage.netFramework.AnubisMessageBoxType.Default, HPSolutionCCDevPackage.netFramework.AnubisMessageImage.Hand, OwnerWindow.Default, "Thông báo!"); // Set complete flag to unregister action from executing action cache IsCompleted = true; BRPViewModel.ButtonCommandOV.IsSendReportButtonRunning = false; } }