• arcMap 进度条


    private void kk()
    {
    IProgressDialogFactory progressDialogFactory = new ProgressDialogFactoryClass();
    ITrackCancel trackCancel = new CancelTrackerClass();
    IProgressDialog2 progressDialog = (IProgressDialog2)progressDialogFactory.Create(trackCancel, m_hookHelper.ActiveView.ScreenDisplay.hWnd);

    progressDialog.CancelEnabled = true;
    progressDialog.Description = "My Progress Dialog";
    progressDialog.Title = "Get Stepping...";
    progressDialog.Animation = esriProgressAnimationTypes.esriProgressGlobe;

    IStepProgressor stepProgressor = progressDialog as IStepProgressor;
    stepProgressor.MinRange = 0;
    stepProgressor.MaxRange = 100000;
    stepProgressor.StepValue = 1;
    stepProgressor.Message = "Hey!";

    progressDialog.ShowDialog();

    bool canContinue = true;

    for (int i = 0; i < 100000; i++)
    {
    canContinue = trackCancel.Continue();
    if (canContinue)
    {
    stepProgressor.Step();
    }
    else
    {
    progressDialog.HideDialog();
    return;
    }

    }

    progressDialog.HideDialog();
    }

  • 相关阅读:
    缓冲流
    properties类
    io流
    异常处理
    file的概述和作用
    map集合和set集合
    js 判断是否是undefined null NaN
    java instanceof 判断是否是String
    ajax获取数据中文乱码问题最简单的完美解决方案
    if else if else if else 的用法
  • 原文地址:https://www.cnblogs.com/gisoracle/p/3813921.html
Copyright © 2020-2023  润新知