using System; using System.Windows; using ESRI.ArcGIS.Controls; using KGIS.Framework.Commands; using KGIS.Framework.Utils; using KGIS.Framework.Utils.Helper; using Kingo.Plugin.EngineEditor.View; namespace Kingo.Plugin.EngineEditor.Commands.Tools { public class SetAttributeCommandClass : BaseMenuCommand { public static IHookHelper m_hookHelper; IEngineEditor m_pEditor; public override void OnClick() { try { if (m_hookHelper != null) { UCSetAttribute uCSetAttribute = new UCSetAttribute(m_hookHelper); uCSetAttribute.WindowStartupLocation = WindowStartupLocation.CenterOwner; uCSetAttribute.ShowInMainWindow(); } else { MessageHelper.Show("hookHelper获取失败"); } } catch (Exception ex) { LogAPI.Debug("SetAttributeCommandClass异常:" + ex.Message); LogAPI.Debug("SetAttributeCommandClass异常:" + ex.StackTrace); } } public override void OnCreate(object Hook) { try { if (m_hookHelper == null) m_hookHelper = new HookHelper(); m_hookHelper.Hook = Hook; m_pEditor = new EngineEditorClass(); } catch (Exception ex) { LogAPI.Debug("SetAttributeCommandClass异常:" + ex.Message); LogAPI.Debug("SetAttributeCommandClass异常:" + ex.StackTrace); } } } }