private void axMapControl2_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e) { if (pSmallViewerEnvelope != null) { pEn = pSmallViewerEnvelope.Stop(); axMapControl1.Extent = pEn; isTrackingSmallViewer = false; } }
public override void OnMouseUp(int Button, int Shift, int X, int Y) { // TODO: Add ToolRasterShift.OnMouseUp implementation pMoveEnvelopeFeedback.Stop(); IMapControl2 pMapCtr = (((IToolbarControl)m_hookHelper.Hook).Buddy) as IMapControl2; if (pMapCtr != null) { IPoint mapPoint = pMapCtr.ToMapPoint(X, Y); IGeoReference pGR = pRasterLayer as IGeoReference; pGR.Shift(mapPoint.X - DownPoint.X, mapPoint.Y - DownPoint.Y); pMapCtr.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewAll, null, null); } }