码迷,mamicode.com
首页 > 其他好文 > 详细

ArcGIS Pro的进度条

时间:2020-04-04 00:03:48      阅读:114      评论:0      收藏:0      [点我收藏+]

标签: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();
    }
}

ArcGIS Pro的进度条

标签:task   ued   opera   cancel   run   show   async   hid   number   

原文地址:https://www.cnblogs.com/gisoracle/p/12629425.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!