protected override void OnKeyDown(ESRI.ArcGIS.Desktop.AddIns.Tool.KeyEventArgs arg) { if (arg.KeyCode == Keys.Escape) //ESC is pressed { bCancel = true; } }
protected override void OnKeyUp(ESRI.ArcGIS.Desktop.AddIns.Tool.KeyEventArgs arg) { if (inUse == true) { //Slow down the speed of the fly through if (arg.KeyCode == Keys.Down || arg.KeyCode == Keys.Left) { motion = motion / 2; } //Speed up the speed of the fly through else if (arg.KeyCode == Keys.Up || arg.KeyCode == Keys.Right) { motion = motion * 2; } else if (arg.KeyCode == Keys.Escape) { bCancel = true; } } }
protected override void OnKeyUp(ESRI.ArcGIS.Desktop.AddIns.Tool.KeyEventArgs arg) { base.OnKeyUp(arg); try { if (arg.KeyCode == Keys.A) { int hn = CalculateHouseNumber(CurrentPos); if (hn > 0) { AddCallout(intersectionPoint, hn.ToString()); //ShowCallout(CurrentPos, hn.ToString()); } } if (arg.KeyCode == Keys.E) { RemoveCallouts(); } } catch { } }