Exemplo n.º 1
0
        private void MapMouseUpEvent(object sender, _DMapEvents_MouseUpEvent e)
        {
            var button = MouseEventHelper.ParseMouseButton(e.button);
            var args   = new MouseEventArgs(button, 1, e.x, e.y, 0);

            Invoke(sender, MouseUp, args);
        }
Exemplo n.º 2
0
 private void axMap1_MouseDownEvent(object sender, _DMapEvents_MouseUpEvent e)
 {
     if (e.button == 1 && axMap1.CursorMode == tkCursorMode.cmIdentify)
     {
         identifyFlag = true;
     }
 }
Exemplo n.º 3
0
        static void _map_MouseUpEvent(object sender, _DMapEvents_MouseUpEvent e)
        {
            if (e.button == 2)
            {
                switch (_map.CursorMode)
                {
                case tkCursorMode.cmRotateShapes:
                case tkCursorMode.cmMoveShapes:
                case tkCursorMode.cmSelection:
                {
                    var menu = App.SelectionContextMenu;
                    menu.Show(_map, e.x, e.y);
                    break;
                }

                case tkCursorMode.cmEditShape:
                case tkCursorMode.cmAddShape:
                case tkCursorMode.cmClipByPolygon:
                case tkCursorMode.cmEraseByPolygon:
                case tkCursorMode.cmSplitByPolygon:
                case tkCursorMode.cmSplitByPolyline:
                case tkCursorMode.cmSelectByPolygon:
                {
                    var menu = App.VertexContextMenu;
                    menu.Show(_map, e.x, e.y);
                    break;
                }
                    //{
                    //    var menu = App.DigitizingContextMenu;
                    //    menu.Show(_map, e.x, e.y);
                    //    break;
                    //}
                }
            }
        }
Exemplo n.º 4
0
 void axMap1_MouseUpEvent(object sender, _DMapEvents_MouseUpEvent e)
 {
     if (e.button == 2)
     {
         if (axMap1.CursorMode == tkCursorMode.cmIdentify)
         {
             _identifierContextMenu.Menu.Show(axMap1, e.x, e.y);
         }
         else if (axMap1.CursorMode == tkCursorMode.cmMeasure)
         {
             contextMenuStrip1.Show(axMap1, e.x, e.y);
         }
     }
 }
        private void OnMapMouseUp(object sender, _DMapEvents_MouseUpEvent e)
        {
            //we only proceed if a drag-select was not done
            if (EnableMapInteraction && !_selectionFromSelectBox && _axMap.CursorMode == tkCursorMode.cmSelection)
            {
                var     extL = 0D;
                var     extR = 0D;
                var     extT = 0D;
                var     extB = 0D;
                Extents ext  = new Extents();

                _axMap.PixelToProj(e.x - CURSORWIDTH, e.y - CURSORWIDTH, ref extL, ref extT);
                _axMap.PixelToProj(e.x + CURSORWIDTH, e.y + CURSORWIDTH, ref extR, ref extB);
                ext.SetBounds(extL, extB, 0, extR, extT, 0);
                Select(ext, selectionFromSelectBox: false);
            }
        }
        private void OnMapMouseUp(object sender, _DMapEvents_MouseUpEvent e)
        {
            mtextLatitude.Clear();
            mtextLongitude.Clear();
            _coordinate = null;

            if (_treeLevel == "municipality" || TreeLevel == "barangay")
            {
                double projX = 0;
                double projY = 0;
                MapControl.PixelToProj(e.x, e.y, ref projX, ref projY);
                switch (_treeLevel)
                {
                case "barangay":
                    _coordinate = new Coordinate((float)projY, (float)projX);
                    break;

                case "municipality":
                    if (_mapLayersHandler.CurrentMapLayer.LayerType == "ShapefileClass" &&
                        ((Shapefile)_mapLayersHandler.CurrentMapLayer.LayerObject).ShapefileType == ShpfileType.SHP_POINT &&
                        ((Shapefile)_mapLayersHandler.CurrentMapLayer.LayerObject).NumSelected == 1)
                    {
                        var sf = _mapLayersHandler.CurrentMapLayer.LayerObject as Shapefile;
                        var pt = sf.Shape[_mapLayersHandler.CurrentMapLayer.SelectedIndexes[0]].Point[0];
                        _coordinate = new Coordinate((float)pt.y, (float)pt.x);
                    }
                    break;
                }

                if (_coordinate != null)
                {
                    var CoordString = _coordinate.ToString(_format).Split(' ');
                    mtextLongitude.Text = CoordString[1];
                    mtextLatitude.Text  = CoordString[0];
                }
            }
        }
Exemplo n.º 7
0
 private void mapControl_MouseUpEvent(object sender, _DMapEvents_MouseUpEvent e)
 {
 }