/// <summary> /// 分析范围面画完事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void globeControl1_TrackPolylineEndEvent(object sender, TrackPolylineEndEventArgs e) { if (e.Polyline != null) { if (trackPolygonType == "剖面分析") { globeControl1.Globe.Action = GeoScene.Data.EnumAction3D.ActionNull; //初始化 trackPolygonType = ""; FrmAnalysisProfileBaseLine frm = new FrmAnalysisProfileBaseLine(globeControl1, e.Polyline); frm.Show(this); } else { trackPolygonType = ""; } } }
private void SetMouse() { globeControl1.MouseDown += (sender, e) => { mouseDown = e.Location; }; globeControl1.MouseUp += (sender, e) => { if (mouseDown != e.Location) { return; } if (e.Button == MouseButtons.Left) { if (globeControl1.Globe.Action == EnumAction3D.SelectObject) { if (mouseClickInfo == "剖面分析") { GSOFeature feature = globeControl1.Globe.SelectedObject; if (feature == null || feature.Geometry == null || feature.Geometry.Type != EnumGeometryType.GeoPolyline3D) { MessageBox.Show("请选择一条线"); return; } globeControl1.Globe.Action = EnumAction3D.ActionNull; GSOGeoPolyline3D line = feature.Geometry as GSOGeoPolyline3D; FrmAnalysisProfileBaseLine frm = new FrmAnalysisProfileBaseLine(globeControl1, line); frm.Show(this); } } } }; }