using ESRI.ArcGIS.Controls; using KGIS.Framework.Commands; using KGIS.Framework.Maps; using KGIS.Framework.Utils; using Kingo.Plugin.DLTB_IDG.View; using Kingo.PluginServiceInterface; using System; namespace Kingo.Plugin.DLTB_IDG.Commands { /// /// 质检错误列表 /// public class CmdQualityCheckList : BaseMenuCommand { private EngineEditorClass pEditor = null; public IHookHelper m_hookHelper; private UCQualityCheckListPlus uCQualityCheckListPlus = null; public override void OnClick() { try { if (uCQualityCheckListPlus == null) { uCQualityCheckListPlus = new UCQualityCheckListPlus { Height = 380 }; uCQualityCheckListPlus.CloseViewHandler += View_CloseViewHandler; } uCQualityCheckListPlus.ShowPanel(); } catch (Exception ex) { LogAPI.Debug("开启质检错误列表异常:" + ex); } } private void View_CloseViewHandler(object sender, EventArgs e) { if (uCQualityCheckListPlus != null) { uCQualityCheckListPlus.ClosePanel(); uCQualityCheckListPlus = null; } } public override void OnCreate(object Hook) { try { if (m_hookHelper == null) { m_hookHelper = new HookHelperClass { Hook = Hook }; } if (pEditor == null) { pEditor = new EngineEditorClass(); } } catch { m_hookHelper = null; return; } } public override bool Enabled { get { if (!(MapsManager.Instance.MapService.GetProjectInfo() is ProjectInfo pTemp)) { return false; } else { if (string.IsNullOrWhiteSpace(pTemp.GetProjFilePath())) { return false; } else { return true; } } } } } }