标签:task ued opera cancel run show async hid number
protected override async void OnClick()
{
using (var progress = new ProgressDialog("Showing Progress", "Canceled", 100, false))
{
var status = new CancelableProgressorSource(progress);
status.Max = 100;
progress.Show();
await QueuedTask.Run(async () =>
{
uint step = 0;
for (var idx = 0; idx < 10; idx++)
{
await Task.Delay(1000);
status.Progressor.Value += 10;
status.Progressor.Status = (status.Progressor.Value * 100 / status.Progressor.Max) + @" % Completed";
status.Progressor.Message = "Message " + status.Progressor.Value;
}
}, status.Progressor);
progress.Hide();
}
}
标签:task ued opera cancel run show async hid number
原文地址:https://www.cnblogs.com/gisoracle/p/12629425.html