Ejemplo n.º 1
0
 protected override void MouseUp(IMapControl mapcontrol, MouseEventArgs e)
 {
     if (_isPanningByMouseDrag)
     {
         _isPanningByMouseDrag = false;
         (mapcontrol as IMapControlDummySupprot).ResetToNormalRenderMode();
         //
         if (mapcontrol.OperationStack.Enabled)
         {
             OprChangeExtent opr = new OprChangeExtent(mapcontrol, _extentBeforDraging, mapcontrol.ExtentPrj);
             mapcontrol.OperationStack.Do(opr);
         }
         else
         {
             mapcontrol.ReRender();
         }
     }
 }
Ejemplo n.º 2
0
        public void ZoomOut()
        {
            RectangleF _viewport        = _mapcontrol.ExtentPrj;
            float      zoomWidthAmount  = _viewport.Width * panzoomFactor;
            float      zoomHeightAmount = _viewport.Height * panzoomFactor;
            RectangleF newViewport      = _viewport;

            newViewport.Inflate(zoomWidthAmount, zoomHeightAmount);
            //
            if (_mapcontrol.OperationStack.Enabled)
            {
                OprChangeExtent opr = new OprChangeExtent(_mapcontrol, newViewport);
                _mapcontrol.OperationStack.Do(opr);
            }
            else
            {
                _mapcontrol.ExtentPrj = newViewport;
                _mapcontrol.ReRender();
            }
        }