public void OnCreate(NBGIS.PluginEngine.IApplication hook) { if (hook != null) { hk = hook; tool = new ControlsMapZoomOutToolClass(); cmd = tool as ESRI.ArcGIS.SystemUI.ICommand; cmd.OnCreate(this.hk.MapControl); } }
public CommandAreaMeasure() { base._Name = "GeoDataManagerFrame.CommandAreaMeasure"; base._Caption = "面积量算"; base._Tooltip = "面积量算"; base._Checked = false; base._Visible = true; base._Enabled = false; base._Message = "面积量算"; m_pTool = new GeoDataCenterFunLib.ControlsMapMeasureTool() as ESRI.ArcGIS.SystemUI.ITool; }
public override void OnCreate(Plugin.Application.IApplicationRef hook) { if (hook == null) { return; } _AppHk = hook as Plugin.Application.IAppGisUpdateRef; if (_AppHk.CurrentControl == null) { return; } m_pTool = new GeoDataCenterFunLib.ControlsMapMeasureToolDefClass() as ESRI.ArcGIS.SystemUI.ITool; m_pCommand = m_pTool as ESRI.ArcGIS.SystemUI.ICommand; m_pCommand.OnCreate(_AppHk); }