using ESRI.ArcGIS.Controls; using KGIS.Framework.Commands; using KGIS.Framework.Maps; using KGIS.Framework.Utils; using Kingo.Plugin.General.View; using Kingo.PluginServiceInterface; using System; namespace Kingo.Plugin.General.Commands { public class CmdFeedbackTable : BaseMenuCommand { public IHookHelper m_hookHelper { get; set; } public UCFeedbackTable uCFeedbackTable = null; public override void OnClick() { try { if (uCFeedbackTable == null) { uCFeedbackTable = new UCFeedbackTable("加载反馈意见表", m_hookHelper); uCFeedbackTable.CloseViewHandler += (sender, e) => { uCFeedbackTable = null; }; } uCFeedbackTable.ShowPanel(); } catch (Exception ex) { LogAPI.Debug("在启动 加载反馈意见表 命令时异常,异常信息如下:"); LogAPI.Debug(ex); LogAPI.Debug("在启动 加载反馈意见表 命令时异常信息结束"); } } public override void OnCreate(object Hook) { try { if (m_hookHelper == null) { m_hookHelper = new HookHelperClass { Hook = Hook }; } } catch { m_hookHelper = null; return; } } public override bool Enabled { get { try { ProjectInfo projectInfo = (MapsManager.Instance.CurrProjectInfo as ProjectInfo); if (projectInfo == null) { return false; } return true; } catch { return false; } } } } }