Ejemplo n.º 1
0
 /// <summary>
 /// 鼠标按下,准备绘制
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void mapControl_eventLButtonDown(object sender, _DHOSOFTMapControlEvents_eventLButtonDownEvent e)
 {
     //if (!isMouseDown && !isShift)
     //{
     //    centerPoint = new MapLngLat(e.dLong, e.dLat);
     //    Kml kml = new Kml();
     //    KmlCircle circle = new KmlCircle();
     //    kml.Placemark.Name = "mgis_circle" + Utils.ElementIndex;
     //    circle.Position = centerPoint;
     //    circle.RandomPosition = centerPoint;
     //    circle.StrokeColor = System.Drawing.Color.Red;
     //    circle.FillColor = System.Drawing.Color.FromArgb(0, System.Drawing.Color.White);
     //    circle.StrokeWidth = 3;
     //    kml.Placemark.Graph = circle;
     //    IMFElement element = null;
     //    layer.AddElement(kml, out element);
     //    circleElement = element as IMFCircle;
     //    isFinish = false;
     //    isMouseDown = true;
     //}
     if (!isMouseDown && !isControl)
     {
         centerPoint = new MapLngLat(e.dLong, e.dLat);
         isMouseDown = true;
         isFinish    = false;
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 开始绘制文字
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void mapControl_eventLButtonDown(object sender, _DHOSOFTMapControlEvents_eventLButtonDownEvent e)
        {
            //try
            //{
            //    textCtrl.Location = new Point(e.x, e.y);
            //    mapControl.CreateControl();
            //    mapControl.Controls.Add(textCtrl);
            //    downPoint = new MapLngLat(e.dLong, e.dLat);
            //}
            //catch (Exception ex)
            //{
            //    throw new Exception(ex.Message);
            //}

            if (!isControl && !isMouseDown)
            {
                textCtrl = new TextInput();
                textCtrl.InputFinished += InputFinish;
                textCtrl.Location       = new Point(e.x, e.y);
                //mapControl.CreateControl();
                mapControl.Controls.Add(textCtrl);
                //textCtrl.Show();
                downPoint   = new MapLngLat(e.dLong, e.dLat);
                isMouseDown = true;
            }

            textCtrl.SetTextFocucs();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 鼠标左键单击
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void mapControl_eventLButtonDown(object sender, _DHOSOFTMapControlEvents_eventLButtonDownEvent e)
 {
     if (!isControl)
     {
         listPoints.Add(new MapLngLat(e.dLong, e.dLat));
         isFinish = false;
     }
 }
Ejemplo n.º 4
0
        //地图控件鼠标左键按下事件
        private void axMapControl_eventLButtonDown(object sender, _DHOSOFTMapControlEvents_eventLButtonDownEvent e)
        {
            if (Utils.bPublishEvent == false)
            {
                return;
            }
            MapLngLat        lnglat = new MapLngLat(e.dLong, e.dLat);
            MFMouseEventArgs args   = new MFMouseEventArgs(lnglat, MouseButtons.Left, e.x, e.y);

            if (MouseDownEvent != null)
            {
                MouseDownEvent.Invoke(this, args);
            }
        }
Ejemplo n.º 5
0
 //按下
 private void mapControl_eventLButtonDown(object sender, _DHOSOFTMapControlEvents_eventLButtonDownEvent e)
 {
     startPoint = new Point(e.x, e.y);
     mapControl.eventLButtonUp += mapControl_eventLButtonUp;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 鼠标左键点击事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void mapControl_eventLButtonDown(object sender, _DHOSOFTMapControlEvents_eventLButtonDownEvent e)
 {
     keyDown = true;
     mapControl.eventMouseMove += mapControl_eventMouseMove;
     mapControl.eventLButtonUp += mapControl_eventLButtonUp;
 }