using ESRI.ArcGIS.Controls; using KGIS.Framework.Commands; using Kingo.Plugin.AttributeMaintain.View; namespace Kingo.Plugin.AttributeMaintain.Commands { /// /// 变更数据属性维护 /// public class CmdBG_20Command : BaseMenuCommand { private IHookHelper hookHelper = null; FrmSXWH_20 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 FrmSXWH_20(); } view.ShowPanel(); view.CloseViewHandler += (s, e) => { view = null; }; } public override bool Enabled { get { return KGIS.Framework.Maps.MapsManager.Instance.MapService.GetProjectInfo() == null ? false : true; } } } }