using ESRI.ArcGIS.Controls; using KGIS.Framework.Commands; using KGIS.Framework.Utils; using Kingo.Plugin.DLTB_IDG.View; using System; namespace Kingo.Plugin.DLTB_IDG.Commands { /// /// 定性图斑检查 /// public class DataAnalysisCommand : BaseMenuCommand { public IHookHelper HookHelper { get; set; } private UCDataAnalysis UCDataAnalysis = null; public override void OnClick() { try { if (UCDataAnalysis == null) { UCDataAnalysis = new UCDataAnalysis { Height = 380 }; UCDataAnalysis.CloseViewHandler += View_CloseViewHandler; } UCDataAnalysis.ShowPanel(); } catch (Exception ex) { LogAPI.Debug("打开定性图斑检查异常:" + ex); } } private void View_CloseViewHandler(object sender, EventArgs e) { if (UCDataAnalysis != null) { UCDataAnalysis.ClosePanel(); UCDataAnalysis = null; } } public override void OnCreate(object Hook) { if (HookHelper == null) { HookHelper = new HookHelperClass(); } HookHelper.Hook = Hook; } public override bool Enabled { get { return KGIS.Framework.Maps.MapsManager.Instance.MapService.GetProjectInfo() == null ? false : true; } } } }