private async void OnProgress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { // Serialize UI update to the the main UI thread. await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { ShowErrorDialog(CommonData.LastMessage,"Got message"); }); }
void OnProgress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { if (this.mediaElement.Visibility == Visibility.Collapsed) { this.mediaElement.Visibility = Visibility.Visible; this.mediaElement.Play(); } this.txtTaskRunning.Text = "Running"; this.progressBar.Value = args.Progress; }); }
//处理后台任务进度 void Value_Progress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { var progress = args.Progress + "%"; UpdateUI("后台任务进行中:", progress); }
/// <summary> /// Handle background task progress. /// </summary> /// <param name="task">The task that is reporting progress.</param> /// <param name="e">Arguments of the progress report.</param> private void OnProgress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { var progress = "Progress: " + args.Progress + "%"; BackgroundTaskSample.SampleBackgroundTaskWithConditionProgress = progress; UpdateUI(); }
private static void BgTask_Progress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { LogMessage("BgTask Progress: " + args.Progress, NotifyType.StatusMessage); }
/// <summary> /// Handle background task progress. /// </summary> /// <param name="task">The task that is reporting progress.</param> /// <param name="e">Arguments of the progress report.</param> private void OnProgress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { var progress = "Progress: " + args.Progress + "%"; BackgroundTaskSample.TimeTriggeredTaskProgress = progress; UpdateUI(); }
private void OnProgress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { }
private void OnBackgroundTaskProgress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { Debug.WriteLine("Sender si {0}", sender); Debug.WriteLine("Progress is {0}", args.Progress); }
private void OnBackgroundTaskProgress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { var progress = args.Progress; Debug.WriteLine("Progress: " + progress); }
private void task_Progress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { Debug.WriteLine("task_Progress()"); }
private void OnProgress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { var progress = "Progress: " + args.Progress + "%"; BackgroundTaskConfiguration.TimeTriggeredTaskProgress = progress; }
/// <summary> /// Handle background task progress. /// </summary> /// <param name="task">The task that is reporting progress.</param> /// <param name="e">Arguments of the progress report.</param> private void OnProgress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { var progress = "Progress: " + args.Progress + "%"; Debug.WriteLine(progress); }
private void task_Progress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { //throw new NotImplementedException(); }
private void BackgroundTask_Progress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { ToastHistoryChangedType changedType = (ToastHistoryChangedType)args.Progress; CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, delegate { OnHistoryChanged(changedType); }); }
private void TaskOnProgress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { Debug.WriteLine($"Background {sender.Name} TaskOnProgress."); }
private async void OnAdvertisementWatcherBackgroundTaskProgress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { await LoadBackgroundActions(); }
void Value_Progress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { var progress = args.Progress; switch (progress) { case 0: UpdateUI("准备开始心跳操作,请稍候……"); UpdateUI_Btn(false); break; case 10: UpdateUI("服务器请求已经完成,正在准备分析服务器响应……"); break; case 11: UpdateUI("服务器请求分析工作完成。"); break; case 1: UpdateUI("后台心跳请求已被取消!"); break; case 2: UpdateUI("恭喜您,心跳成功完成!请刷新网络状态。"); break; case 3: UpdateUI("很抱歉,心跳失败,可能是网络故障或者是服务器抽风导致的。"); break; } }
private async void OnProgress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { var progress = "Progress from Foreground: " + args.Progress + "%"; await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { Info += progress + Environment.NewLine; ToastHelper.ShowToast(progress); }); }
public void OnProgress(IBackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { Dispatcher.RunAsync(CoreDispatcherPriority.High,() => { _measurementPageViewModel.MeasurementViewModel.TotalSteps = args.Progress; _mainPage.GlobalMeasurementModel.UpdateMeasurementInList(_measurementPageViewModel.MeasurementViewModel); }); }
static void task_Progress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { var test = "done"; }
/// <summary> /// The background task updates the progress counter. When that happens, this event handler gets invoked /// When the handler is invoked, we will display the value stored in local settings to the user. /// </summary> /// <param name="task"></param> /// <param name="args"></param> private async void OnProgress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { if (ApplicationData.Current.LocalSettings.Values.Keys.Contains("ReceivedMessage")) { string backgroundMessage = (string)ApplicationData.Current.LocalSettings.Values["ReceivedMessage"]; string remoteDeviceName = (string)ApplicationData.Current.LocalSettings.Values["RemoteDeviceName"]; if(!backgroundMessage.Equals("")) { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { rootPage.NotifyUser("Client Connected: " + remoteDeviceName, NotifyType.StatusMessage); ConversationListBox.Items.Add("Received: " + backgroundMessage); }); } } }
private void OnProgress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { //string tileXmlString = "<tile>" + "<visual>" + "<binding template='TileWideText03'>" + "<text id='1'>" + args.Progress.ToString() // + "</text>" + "</binding>" + "<binding template='TileSquareText04'>" + "<text id='1'>" // + args.Progress.ToString() + "</text>" + "</binding>" + "</visual>" + "</tile>"; //var tileXml = new Windows.Data.Xml.Dom.XmlDocument(); tileXml.LoadXml(tileXmlString); //var tile = new Windows.UI.Notifications.TileNotification(tileXml); //Windows.UI.Notifications.TileUpdateManager.CreateTileUpdaterForApplication().Update(tile); UpdateUIExampleMethod("lekker bezig"); }
/// <summary> /// The background task updates the progress counter. When that happens, this event handler gets invoked /// When the handler is invoked, we will display the value stored in local settings to the user. /// </summary> /// <param name="task"></param> /// <param name="args"></param> private async void OnProgress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { if (ApplicationData.Current.LocalSettings.Values.Keys.Contains("ReceivedMessage")) { string backgroundMessage = (string)ApplicationData.Current.LocalSettings.Values["ReceivedMessage"]; await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { statusTextBlock.Text = "STATUS: Client Connected"; //ConversationListBox.Items.Add("Received: " + backgroundMessage); }); } }
void task_Progress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { }
/// <summary> /// Handle background task progress. /// </summary> /// <param name="task">The task that is reporting progress.</param> /// <param name="e">Arguments of the progress report.</param> private void OnProgress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { var progress = "Progress: " + args.Progress + "%"; BackgroundTaskSample.ServicingCompleteTaskProgress = progress; UpdateUI(); }
private void Bgregistration_Progress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { //args.Progress Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { System.Diagnostics.Debug.WriteLine("Progress: " + args.Progress); }); }
/// <summary> /// Updates the UI with the progress of the sync /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private async void OnSyncWithDeviceProgress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { await rootPage.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, new DispatchedHandler(() => { SyncProgressBar.Value = args.Progress; })); }
private void Task_Progress(BackgroundTaskRegistration sender, BackgroundTaskProgressEventArgs args) { Debug.WriteLine("my task " + args.Progress + "%" + "downloaded!"); }
/// <summary> /// Handle background task progress. /// </summary> /// <param name="task">The task that is reporting progress.</param> /// <param name="e">Arguments of the progress report.</param> private void OnProgress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { var ignored = Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { var progress = "Progress: " + args.Progress + "%"; BackgroundTaskSample.ServicingCompleteTaskProgress = progress; UpdateUI(); }); }
void task_Progress(IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args) { var progress = args.Progress + "%"; _reportedStatus = progress; UpdateUI(); }