using ESRI.ArcGIS.Controls; using KGIS.Framework.Commands; using Kingo.Plugin.AttributeMaintain.View; namespace Kingo.Plugin.AttributeMaintain.Commands { /// /// 变更数据属性维护 /// public class CmdCZC_TRCommand : BaseMenuCommand { private IHookHelper hookHelper = null; FrmCZC_TR view = null; public override void OnCreate(object hook) { if (hookHelper == null) { hookHelper = new HookHelperClass(); } hookHelper.Hook = hook; } public override void OnClick() { if (view == null) { view = new FrmCZC_TR(); } view.ShowPanel(); view.CloseViewHandler += (s, e) => { view.ClosePanel(); view = null; }; } public override bool Enabled { get { return KGIS.Framework.Maps.MapsManager.Instance.MapService.GetProjectInfo() == null ? false : true; } } } }