private void btnDrawNewMarker_Click(object sender, EventArgs e) { this.drawBarCheckOnClick(((DevComponents.DotNetBar.ButtonItem)sender).Name); ICommand pCommand = new ControlsNewMarkerToolClass(); ITool pTool = pCommand as ITool; switch (this.tabControl.SelectedTabIndex) { case 0: pCommand.OnCreate(this.mainMapControl.Object); this.mainMapControl.CurrentTool = pTool; break; case 1: pCommand.OnCreate(this.axPageLayoutControl.Object); this.axPageLayoutControl.CurrentTool = pTool; break; } }
private void toolStripButton3_Click(object sender, EventArgs e) { ICommand pCommand = new ControlsNewMarkerToolClass(); pCommand.OnCreate(this.mainMapControl.Object); ITool pTool = pCommand as ITool; this.mainMapControl.CurrentTool = pTool; this.mainMapControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null); }