Ejemplo n.º 1
0
        private void StopDrag()
        {
            DragImage.Dispose();
            StaticToolsImage.Dispose();
            Dragging = false;
            var point = new Point((MapControl.ClientSize.Width / 2 + (DragStartPoint.X - DragEndPoint.X)),
                                  (MapControl.ClientSize.Height / 2 + (DragStartPoint.Y - DragEndPoint.Y)));

            Map.Center = Map.ImageToWorld(point);

            MapControl.Cursor = Cursors.Default;
            MapControl.Refresh();
        }
Ejemplo n.º 2
0
        public override void OnMouseUp(ICoordinate worldPosition, MouseEventArgs e)
        {
            if (!Dragging)
            {
                return;
            }
            DragImage.Dispose();
            StaticToolsImage.Dispose();
            Dragging = false;
            Point point = new Point((MapControl.ClientSize.Width / 2 + (DragStartPoint.X - DragEndPoint.X)),
                                    (MapControl.ClientSize.Height / 2 + (DragStartPoint.Y - DragEndPoint.Y)));

            Map.Center = Map.ImageToWorld(point);

            MapControl.Cursor = Cursors.Default;
            MapControl.Refresh();
        }