Example #1
0
 void GeometryTools_DrawMapDoubleClick(BIT.AVL.Silver.Map.Map map, DrawingEventArgs args)
 {
     _drawArgs.AfterDrawMethod(args.Positions);
     _drawArgs = null;
     map.DragMode = BIT.AVL.Silver.Map.Map.DragBehavior.Pan;
     map.CaptureMouse();
 }
Example #2
0
        public void UserDraw(object sender, UserDrawEventArgs e)
        {
            _drawArgs = e;
            map.DragMode = BIT.AVL.Silver.Map.Map.DragBehavior.Draw;

            switch (e.Mode)
            {
                case DrawControl.GeometryMode.PointPin:
                    map.GeometryTools.DrawMode = DrawControl.GeometryMode.PointPin;
                    break;

                case DrawControl.GeometryMode.StringLine:
                    map.GeometryTools.DrawMode = DrawControl.GeometryMode.StringLine;
                    break;

                case DrawControl.GeometryMode.Polygon:
                    map.GeometryTools.DrawMode = DrawControl.GeometryMode.Polygon;
                    break;
            }

            if (!_drawingInitiatedFlag)
            {
                map.GeometryTools.DrawMapDoubleClick += new DrawControl.DrawingMouseButtonEvent(GeometryTools_DrawMapDoubleClick);
                _drawingInitiatedFlag = true;
            }
        }