예제 #1
0
 /// <summary>
 /// 鼠标左键双击
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void mapControl_eventLButtonDbClick(object sender, _DHOSOFTMapControlEvents_eventLButtonDbClickEvent e)
 {
     if (!isControl && listPoints.Count >= 2)
     {
         if (!string.IsNullOrEmpty(tempName))
         {
             mapControl.MgsDelObject(tempName);
         }
         //if (listPoints.Count < 2) return;
         Kml           kml  = new Kml();
         KmlLineString line = new KmlLineString();
         line.PositionList   = listPoints;
         line.Color          = System.Drawing.Color.Red;
         line.Width          = 3;
         kml.Placemark.Name  = "mgis_line" + Utils.ElementIndex;
         kml.Placemark.Graph = line;
         IMFElement element = null;
         layer.AddElement(kml, out element);
         lineElement = element as IMFLine;
         RegistCommondExecutedEvent();
         ReleaseCommond();//修改  陈静
         listPoints.Clear();
         isFinish = true;
     }
 }
예제 #2
0
        /// <summary>
        /// 鼠标左键双击
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void mapControl_eventLButtonDbClick(object sender, _DHOSOFTMapControlEvents_eventLButtonDbClickEvent e)
        {
            if (!isControl && listPoints.Count > 2)
            {
                if (!string.IsNullOrEmpty(tempName))
                {
                    mapControl.MgsDelObject(tempName);
                }

                Kml        kml     = new Kml();
                KmlPolygon polygon = new KmlPolygon();
                polygon.PositionList = listPoints;
                polygon.FillColor    = Color.FromArgb(0, Color.White);
                polygon.OutLineColor = Color.Red;
                polygon.OutLineSize  = 3;
                kml.Placemark.Name   = "mgis_polygon" + Utils.ElementIndex;
                kml.Placemark.Graph  = polygon;
                IMFElement element = null;
                layer.AddElement(kml, out element);
                polygonElement = element as IMFPolygon;
                RegistCommondExecutedEvent();
                ReleaseCommond();//修改  陈静
                isFinish = true;
                listPoints.Clear();
            }
        }
예제 #3
0
        //地图控件鼠标左键双击事件
        private void axMapControl_eventLButtonDbClick(object sender, _DHOSOFTMapControlEvents_eventLButtonDbClickEvent 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 (MouseDbClickEvent != null)
            {
                MouseDownEvent.Invoke(this, args);
            }
        }
예제 #4
0
파일: EditPoint.cs 프로젝트: AnuoF/MapFrame
 /// <summary>
 /// 鼠标双击事件取消编辑
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void mapControl_eventLButtonDbClick(object sender, _DHOSOFTMapControlEvents_eventLButtonDbClickEvent e)
 {
     ReleaseCommond();
 }