using ESRI.ArcGIS.Controls; using KGIS.Framework.Commands; using KGIS.Framework.Utils; using KGIS.Framework.Utils.Helper; using Kingo.Plugin.BGResultManager.View; using System; namespace Kingo.Plugin.BGResultManager.Commands { /// /// 增量汇总 /// public class IncrementalAggregationCommand : BaseMenuCommand { private EngineEditorClass pEditor = null; private IHookHelper hookHelper = null; public override void OnCreate(object hook) { if (hookHelper == null) { hookHelper = new HookHelperClass(); } hookHelper.Hook = hook; } public override void OnClick() { try { if (pEditor == null) { pEditor = new EngineEditorClass(); } if (pEditor.EditState != esriEngineEditState.esriEngineStateNotEditing) { MessageHelper.ShowTips("请先关闭编辑!"); return; } IncrementalAggregation main = new IncrementalAggregation(); main.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; main.ShowInMainWindow(false); } catch (Exception ex) { LogAPI.Debug("提取变更范围异常:" + ex); } } public override bool Enabled { get { ////验证是否打开工程 //Framework.Utils.Model.ProjectInfo ProInfo = Platform.Instance.MapsService.GetProjectInfo(); //if (ProInfo == null) //{ // return false; //} //else //{ return true; //} } } } }