@@ -1622,7 +1607,8 @@
globeControl1.Globe.Layers.Remove(layer);
globeControl1.Globe.Refresh();
node.Remove();
- }else if (node.Parent.Text.Trim() == "我的地标")
+ }
+ else if (node.Parent.Text.Trim() == "我的地标")
{
if (!(node.Tag is GSOFeature)) return;
GSOFeature f = node.Tag as GSOFeature;
@@ -1630,13 +1616,13 @@
globeControl1.Globe.Refresh();
node.Remove();
}
-
+
}
//wxl Tag更正
private void 可编辑ToolStripMenuItem_Click(object sender, EventArgs e)
{
TreeNode node = layerTree.SelectedNode;
- if (node == null ||
+ if (node == null ||
node.Parent == null ||
node.Parent.Text.Trim() != "临时图层" || !(node.Tag is GSOLayer)) return;
GSOLayer layer = node.Tag as GSOLayer;
@@ -1647,7 +1633,7 @@
private void 保存ToolStripMenuItem_Click(object sender, EventArgs e)
{
TreeNode node = layerTree.SelectedNode;
- if (node == null||node.Tag==null) return;
+ if (node == null || node.Tag == null) return;
GSOLayer layer = node.Tag as GSOLayer;
if (layer == null) return;
layer.Dataset.Save();
@@ -1656,13 +1642,13 @@
private void 定位ToolStripMenuItem_Click(object sender, EventArgs e)
{
TreeNode node = layerTree.SelectedNode;
- if (node == null||node.Parent==null) return;
+ if (node == null || node.Parent == null) return;
if (node.Parent.Text.Trim() == "临时图层")
{
GSOLayer lsLayer = node.Tag as GSOLayer;
if (lsLayer == null)
{
- LogHelper.WriteLog(typeof(MainFrm),"要定位的临时图层不存在:"+node.Text);
+ LogHelper.WriteLog(typeof(MainFrm), "要定位的临时图层不存在:" + node.Text);
return;
}
double x = lsLayer.LatLonBounds.Center.X;
@@ -1809,10 +1795,20 @@
FrmBaseLineProfillAnalysis dlg = new FrmBaseLineProfillAnalysis(globeControl1.Globe, e.Polyline);
dlg.Show(this);
globeControl1.Globe.ClearLastTrackPolyline();
- /*
- FrmRoadHDM f = new FrmRoadHDM();
- f.Show()
- * **/
+ }
+ //沿线开挖
+ else if (trackPolylineEndMode == EnumTrackPolylineEndMode.YXKW_Analysis)
+ {
+ FrmDigPitSetting dlg = new FrmDigPitSetting(globeControl1, e.Polyline);
+ dlg.Show();
+ }
+ else if (trackPolylineEndMode == EnumTrackPolylineEndMode.JLBZ_Analysis)
+ {
+ GSOFeature feature = new GSOFeature();
+ feature.Geometry = e.Polyline;
+
+ MarkTools.getInstance().showMarker(feature,
+ globeControl1, EnumMarkLayer.Mark_Distance, "");
}
trackPolylineEndMode = EnumTrackPolylineEndMode.Default_Analysis;
}
@@ -1926,7 +1922,7 @@
LogError.PublishError(ex);
}
}
-
+
///
/// 添加管线、隧道、城市七线绘制完成事件
///
@@ -1936,7 +1932,7 @@
{
if (e.Button != MouseButtons.Left) return;
- if (enumDesignMode==EnumDesignMode.AddPipe
+ if (enumDesignMode == EnumDesignMode.AddPipe
&& globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//添加管线
{
GSOLayer layerDest = globeControl1.Globe.DestLayerFeatureAdd;
@@ -1952,7 +1948,7 @@
}
}
}
- if (enumDesignMode==EnumDesignMode.AddTunnel
+ if (enumDesignMode == EnumDesignMode.AddTunnel
&& globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//创建隧道
{
GSOLayer tunnel = globeControl1.Globe.Layers.GetLayerByCaption("隧道");
@@ -1965,9 +1961,9 @@
//tunnel.Save();
}
}
-
+
}
- if (enumDesignMode==EnumDesignMode.AddCitySevenLine
+ if (enumDesignMode == EnumDesignMode.AddCitySevenLine
&& globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//绘制城市七线
{
CitySevenLine citySevenLine = globeControl1.Tag as CitySevenLine;
@@ -1990,7 +1986,7 @@
globeControl1.Globe.DestLayerFeatureAdd = null;
}
globeControl1.Refresh();
- enumDesignMode=EnumDesignMode.Null;
+ enumDesignMode = EnumDesignMode.Null;
globeControl1.Globe.Action = EnumAction3D.ActionNull;
}
@@ -2345,8 +2341,6 @@
var code = feature.GetFieldAsString("编码");
var title = FeatureTools.GetFeatureTypeByCode(code);
str += "" + title + " " + feature.GetFieldAsString(featureIDFieldName) + " |
";
-
- int rowCount = feature.GetFieldCount();
string layerName = feature.Dataset.Name;
string queryFields = "";
if (Utility.Query_Fields.ContainsKey(layerName))
@@ -2356,135 +2350,36 @@
else
{
layerName = feature.Dataset.Caption;
- queryFields = getpipeLineFields.get_Fields(layerName, globeControl);
+ queryFields = GetpipeLineFields.GetFieldsForBubble(layerName, globeControl);
}
if (queryFields != null)
{
string[] param = { "," };
string[] fieldNames = queryFields.Split(param, StringSplitOptions.RemoveEmptyEntries);
- for (int j = 0; j < fieldNames.Length; j++)
+ for (int j = 0; j < fieldNames.Length; )
{
- string fieldName = fieldNames[j].Trim();
- GSOFieldDefn field1 = feature.GetFieldDefn(fieldName);
-
- string name1 = "";
- string value1 = "";
- if (field1 != null)
+ int count = 0;
+ string tmpStr = "";
+ while (count<2&&j" +
+ fieldNames[j] +
+ "" +
+ value +
+ " | ";
+ count ++;
}
- if (j < rowCount)
- {
- field1 = feature.GetFieldDefn(j);
- name1 = field1.Name;
- if (name1 == "模型路径")
- {
- continue;
- }
- if (field1.Type == EnumFieldType.Text)
- {
- value1 = feature.GetFieldAsString(j);
- }
- else if (field1.Type == EnumFieldType.Date)
- {
- DateTime dd = Convert.ToDateTime(feature.GetFieldAsDataTime(j));
- if (dd.Year <= 1)
- {
- value1 = "";
- }
- else
- {
- value1 = dd.ToShortDateString();
- }
- }
- else if (field1.Type == EnumFieldType.Double)
- {
- double dl1 = feature.GetFieldAsDouble(j);
- if (!name1.Contains("管径") && !name1.Contains("电压") && !name1.Contains("角度"))
- {
- name1 += "_米";
- }
- value1 = dl1.ToString("0.00");
- }
- else
- {
- if (!feature.IsFieldValueNull(j))
- {
- value1 = feature.GetValue(j).ToString();
- }
- }
- }
- }
- string name2 = "";
- string value2 = "";
- if (j + 1 < rowCount)
- {
- GSOFieldDefn field2 = feature.GetFieldDefn(j + 1);
-
- if (field2 != null)
- {
- if (field2.Name == "图片编码")
- {
- j++;
- }
- if (j + 1 < rowCount)
- {
- field2 = feature.GetFieldDefn(j + 1);
- name2 = field2.Name;
-
- if (name2 == "模型路径")
- {
- continue;
- }
-
- if (field2.Type == EnumFieldType.Text)
- {
- value2 = feature.GetFieldAsString(j + 1);
- }
- else if (field2.Type == EnumFieldType.Date)
- {
- DateTime dd = Convert.ToDateTime(feature.GetFieldAsDataTime(j + 1));
-
- if (dd.Year <= 1)
- {
- value2 = "";
- }
- else
- {
- value2 = dd.ToShortDateString();
- }
- }
- else if (field2.Type == EnumFieldType.Double)
- {
- double dl2 = feature.GetFieldAsDouble(j + 1);
- if (!name2.Contains("管径") && !name2.Contains("电压") && !name2.Contains("角度"))
- {
- name2 += "_米";
- }
- value2 = dl2.ToString("0.00");
- }
- else
- {
- if (!feature.IsFieldValueNull(j + 1))
- {
- value2 = feature.GetValue(j + 1).ToString();
- }
- }
- }
- }
-
j++;
}
- str += "" +
- name1 +
- " | " +
- value1 +
- " | " +
- name2 +
- " | " +
- value2 + " |
";
+ if (count == 1)
+ {//不够两列
+ tmpStr += " | ";
+ }
+ tmpStr += "
";
+ if (tmpStr.Contains("";
@@ -3010,29 +2905,6 @@
clearFeatureHighLight();
}
///
- /// 设置菜单的选中状态
- ///
- private void ActionToolMenuChecked()
- {
- if (globeControl1.Globe.Action != EnumAction3D.TrackPolyline)
- {
- 横断面分析ToolStripMenuItem.Checked = false;
- 道路断面分析ToolStripMenuItem.Checked = false;
- 基线剖面分析ToolStripMenuItem.Checked = false;
- 沿线开挖ToolStripMenuItem.Checked = false;
- }
- if (globeControl1.Globe.Action != EnumAction3D.NormalHit)
- {
- 关阀分析ToolStripMenuItem.Checked = false;
- 连通分析ToolStripMenuItem.Checked = false;
- }
- if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon)
- {
- 多边形开挖ToolStripMenuItem.Checked = false;
- 挖方量分析ToolStripMenuItem.Checked = false;
- }
- }
- ///
/// 主窗体关闭事件处理
///
///
@@ -3294,7 +3166,7 @@
{
return new GSOPoint3d();
}
-
+
GSOGeoPolyline3D disline = new GSOGeoPolyline3D();
GSOPoint3ds point3Ds = new GSOPoint3ds();
point3Ds.Add(pntIntersect1);
@@ -3352,17 +3224,17 @@
///
///
private void CollisionAnalysis(GSOFeature selectedFeature, List pipelineLayerNames)
- {
- List result = DoublePanelAnalysis.CollisionAnalysis(globeControl1, selectedFeature, pipelineLayerNames);
+ {
+ List result = DoublePanelAnalysis.CollisionAnalysis(globeControl1, selectedFeature, pipelineLayerNames);
if (result == null)
{
selectState = 0;
MessageBox.Show("请选择一条管线!");
return;
}
-
- string caption = selectedFeature.Dataset.Caption;
- foreach (FeatureAnalysisInfo featureAnalysisInfo in result)
+
+ string caption = selectedFeature.Dataset.Caption;
+ foreach (FeatureAnalysisInfo featureAnalysisInfo in result)
{
string feat2Caption = featureAnalysisInfo.feature.Dataset.Caption;
featureAnalysisInfo.feature.HighLight = true;
@@ -3457,7 +3329,7 @@
}
#endregion
-
+
///
/// 垂直净距分析中 表格行的 双击定位 功能。 与覆土分析的实现方法不同,主要原因是需要标注垂距
///
@@ -5167,8 +5039,10 @@
node.Nodes.Clear();
globeControl1.Refresh();
}
- //定时检查传感器的状态 待完善
- public Timer timerOfSensor = null;
+<<<<<<< HEAD
+=======
+
+>>>>>>> 25d409a33ccb45fd9b659de0d9aaddecdb3079ba
///
/// 一键审核---导入数据
///
@@ -5259,10 +5133,10 @@
MessageBox.Show("正在审核或关闭上次审核结果才能进行审核");
return;
}
- boolfrmShResult = true;
frmSh = new FrmYJSHTC(globeControl1, globeControl2, layerTree);//layerManagerNode
if (frmSh.ShowDialog() == DialogResult.OK)
{
+ boolfrmShResult = true;
frmWait = new FrmWait("一键审核……");
frmWait.Location = new Point(Width - frmWait.Width - 10, Height - frmWait.Height - 50);
frmWait.Owner = this;
@@ -5275,7 +5149,6 @@
void doWork()
{
- FrmShResult frmShResult;
if (frmSh.rukuLayer != null)
{
try
@@ -5294,7 +5167,7 @@
globeControl1.Refresh();
}
- frmShResult = new FrmShResult(shlayername, globeControl1, Utility.m_PipelineLayerNames);
+ FrmShResult frmShResult = new FrmShResult(shlayername, globeControl1, Utility.m_PipelineLayerNames);
frmShResult.Location = new Point(Width - frmShResult.Width - 10, Height - frmShResult.Height - 50);
frmShResult.Owner = this;
frmShResult.analysis();
@@ -5309,9 +5182,9 @@
}
catch (Exception ex)
{
+ boolfrmShResult = false;
MessageBox.Show("系统运行错误:" + ex, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
-// boolfrmShResult = true;
}
void returnShTap()
@@ -5611,7 +5484,7 @@
private void 关联查询ToolStripMenuItem_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, "关联查询");
-
+
if (globeControl1.Globe.SelObjectCount != 1)
{
MessageBox.Show("请选中一个对象!", "提示");
@@ -5641,7 +5514,7 @@
private void buttonItemClear_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, "清除分析");
-
+
globeControl1.Globe.ClearMeasure();
layerTemp.RemoveAllFeature();
高度量算ToolStripMenuItem1.Checked = false;
@@ -5667,17 +5540,6 @@
// ClearUpDownTraceAnalysis(); //清除上下游分析
globeControl1.Globe.RemoveAllPits();//清除所有坑
MarkTools.removeAllMarker(globeControl1);//清除所有标注
- #region wxl 这段不清楚什么用处,注释掉,对系统没有影响
-
- // if (layerMarkerTree != null && layerMarkerTree.Nodes.Count > 0)
- // {
- // for (int i = 0; i < layerMarkerTree.Nodes[0].Nodes.Count; i++)
- // {
- // layerMarkerTree.Nodes[0].Nodes[i].Nodes.Clear();
- // }
- // }
- #endregion
-
clearFeatureHighLight();//取消管线高亮
GSOLayer layerGround = globeControl1.Globe.Layers.GetLayerByCaption(Utility.roadLayerName);//("180fd");
@@ -5685,10 +5547,11 @@
{
layerGround.Visible = true;
}
- globeControl1.Refresh();
- globeControl2.Refresh();
ClearRedlineAnalyseResult();
globeControl1.Globe.Action = EnumAction3D.ActionNull;
+
+ globeControl1.Refresh();
+ globeControl2.Refresh();
}
///
/// 管线长度全区域统计
@@ -5733,7 +5596,7 @@
///
///
private void 阀门数量统计ToolStripMenuItem1_Click(object sender, EventArgs e)
- {
+ {
LogManager.saveLog(Utility.userName, "阀门数量统计");
trackflag = "valvequery";
@@ -6121,7 +5984,6 @@
trackflag = "digFillAnalysis";
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack;
- ActionToolMenuChecked();
}
///
/// 沿线开挖
@@ -6132,28 +5994,9 @@
{
LogManager.saveLog(Utility.userName, "沿线开挖");
- if (!沿线开挖ToolStripMenuItem.Checked)
- {
- FrmDigPitSetting dlg = new FrmDigPitSetting(m_dDigPitValue, m_bDigPitByDepth, m_dDigPitWidthAlongLine);
- if (dlg.ShowDialog() == DialogResult.OK)
- {
- m_dDigPitValue = dlg.m_dDigPitValue;
- m_bDigPitByDepth = dlg.m_bDigPitByDepth;
- m_dDigPitWidthAlongLine = dlg.m_dDigPitWidthAlongLine;
- trackflag = "LineDigPit";
- globeControl1.Globe.Action = EnumAction3D.TrackPolyline;
- globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true;
- globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack;
- 沿线开挖ToolStripMenuItem.Checked = true;
- }
- }
- else
- {
- globeControl1.Globe.Action = EnumAction3D.ActionNull;
- 沿线开挖ToolStripMenuItem.Checked = false;
- globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = false;
- }
- ActionToolMenuChecked();
+ globeControl1.Globe.Action = EnumAction3D.TrackPolyline;
+ globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack;
+ trackPolylineEndMode = EnumTrackPolylineEndMode.YXKW_Analysis;
}
///
/// 创建隧道
@@ -6479,7 +6322,7 @@
return;
}
GSOGeoPolyline3D selLine = resFeature.Geometry as GSOGeoPolyline3D;
- if (selLine == null||selLine[0].Count <= 1)
+ if (selLine == null || selLine[0].Count <= 1)
{
return;
}
@@ -6512,13 +6355,15 @@
///
/// 距离标注
///
-// bool distanceMarker;
+ // bool distanceMarker;
private void 距离标注ToolStripMenuItem_Click(object sender, EventArgs e)
{
//日志记录
LogManager.saveLog(Utility.userName, 距离标注ToolStripMenuItem.Text);
globeControl1.Globe.Action = EnumAction3D.TrackPolyline;
+ trackPolylineEndMode = EnumTrackPolylineEndMode.JLBZ_Analysis;
+
}
///
/// 自定义标注
@@ -6928,11 +6773,6 @@
LogManager.saveLog(Utility.userName, buttonItemSJGL2.Text);
FrmValiData frm = new FrmValiData(globeControl1);
frm.ShowDialog();
-
- /*
- ValidateInfo validateInfo = ValidateConfig.LoadConfig();
- String ss = "";
- */
}
///
/// 数据预处理
@@ -7156,7 +6996,7 @@
///
///
///
-
+
private void buttonItemBJ4_Click(object sender, EventArgs e)
{
//日志记录
@@ -7167,7 +7007,7 @@
{
globeControl1.Globe.Action = EnumAction3D.DrawPolyline;
enumDesignMode = EnumDesignMode.AddCitySevenLine;
-
+
CitySevenLine citySevenLine = new CitySevenLine(frm.citySevenLineName,
frm.citySevenLineType);
globeControl1.Tag = citySevenLine;
@@ -7405,7 +7245,7 @@
MessageBox.Show("成功删除"+delSuccessCount+"个模型!", "提示");
globeControl1.Globe.Action = EnumAction3D.ActionNull;
}
-
+
/// 红线审核
///
///
@@ -7445,7 +7285,7 @@
}
void addRedLineDataToDataGridView(List dt, DataGridView dataGridView)
{
- DataTable table=new DataTable();
+ DataTable table = new DataTable();
table.Columns.Add("红线编号");
table.Columns.Add("管线类型");
table.Columns.Add("侵占面积/m³");
|