添加BaseCommand 和Base Tool 的注意事项

添加Base Tool

调用重载 onmousedown 函数(与地图交互的操作)的语句
 ICommand pCommand;
            pCommand = new SimpleRenderer();

            pCommand.OnCreate(m_mapControl.Object);
            m_mapControl.CurrentTool = pCommand as ITool;

 

 添加Base Command时:

调用重载 click函数的语句

ICommand pCommand;
            pCommand = new ESRI.ArcGIS.Controls.ControlsMapZoomToLastExtentForwardCommandClass();
            pCommand.OnCreate(m_mapControl.Object);
            pCommand.OnClick();

你可能感兴趣的:(command)