ArcGIS Pro的进度条

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

猜你喜欢

转载自www.cnblogs.com/gisoracle/p/12629425.html
今日推荐