基于C#的ArcEngine二次开发31:addin开发时调用ArcMap的进度条 | 您所在的位置:网站首页 › arcgis怎么调出进度条 › 基于C#的ArcEngine二次开发31:addin开发时调用ArcMap的进度条 |
目录
目录 1 在ArcMap中添加进度条 2 在状态栏显示默认默认动画 3 其他工具 3.1 加入Identify工具 3.2 为选中特征建立缓冲区 1 在ArcMap中添加进度条 调用此代码会弹出进度条 /// /// Launch a Progress Dialog to display how long it is taking to complete some event. /// /// An IApplication interface. /// A System.Int32 that is the starting point for the progress display. Example: 0 /// A System.Int32 that is the ending point for a progress display. Example: 10000 /// A System.String that is the message you want to user to see. Example: "Parsing Data, Please Wait. /// /// Calling this sub/method by itself is only half of the programming effort. Inside of the For loop you do something /// that requires time to progress. /// public void ShowProgressDialog(ESRI.ArcGIS.Framework.IApplication application, System.Int32 int32_Minimum, System.Int32 int32_Maximum, System.String string_Message) { // Create a CancelTracker ESRI.ArcGIS.esriSystem.ITrackCancel trackCancel = new ESRI.ArcGIS.Display.CancelTrackerClass(); ESRI.ArcGIS.Framework.IProgressDialogFactory progressDialogFactory = new ESRI.ArcGIS.Framework.ProgressDialogFactoryClass(); // Set the properties of the Step Progressor System.Int32 int32_hWnd = application.hWnd; ESRI.ArcGIS.esriSystem.IStepProgressor stepProgressor = progressDialogFactory.Create(trackCancel, int32_hWnd); stepProgressor.MinRange = int32_Minimum; stepProgressor.MaxRange = int32_Maximum; stepProgressor.StepValue = 1; stepProgressor.Message = string_Message; // Create the ProgressDialog. This automatically displays the dialog ESRI.ArcGIS.Framework.IProgressDialog2 progressDialog2 = (ESRI.ArcGIS.Framework.IProgressDialog2)stepProgressor; // Explict Cast // Set the properties of the ProgressDialog progressDialog2.CancelEnabled = true; progressDialog2.Description = "Counting to " + int32_Maximum.ToString() + "."; progressDialog2.Title = "Counting..."; progressDialog2.Animation = ESRI.ArcGIS.Framework.esriProgressAnimationTypes.esriDownloadFile; // Step. Do your big process here. System.Boolean boolean_Continue = false; boolean_Continue = true; System.Int32 i = 0; for (i = int32_Minimum; i |
CopyRight 2018-2019 实验室设备网 版权所有 |