示例#1
0
        private void EagleMapControl_OnMouseMove(object sender, IMapControlEvents2_OnMouseMoveEvent e) //鹰眼图:左键拖动矩形框
        {
            // 如果不是左键按下就直接返回
            if (e.button != 1)
            {
                return;
            }
            EagleMapControl.MousePointer = esriControlsMousePointer.esriPointerSizeAll;
            IPoint point = new PointClass();

            point.PutCoords(e.mapX, e.mapY);
            MapControl.CenterAt(point);
            EagleMapControl.CenterAt(point);
            MapControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
            EagleMapControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
        }