diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 7bf65dc..bd0f81b 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -19,17 +19,7 @@ private Dictionary map = null; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; - //TODOLIST:用晓伟的代理进行操作,功能拆分细化 - //public FrmAllWorkWellStatis(GSOGeoPolygon3D polygon, DataGridView dataGridViewX11, ToolStripStatusLabel toolStripNumbers1, GSOGlobeControl ctl, PanelEx p) - //{ - // InitializeComponent(); - // panel = p; - // dataGridViewX1 = dataGridViewX11; - // toolStripNumbers = toolStripNumbers1; - // globeControl1 = ctl; - // map = getAccsMap(polygon); - //} public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) { InitializeComponent(); @@ -117,8 +107,9 @@ sql = "select " + getpipeLineFields.getFields(layername, globeControl1) + " from " + layer.Name; sql += " where 1>2 "; - for (int i = 0; i < fs.Length && fs[i].GetFieldDefn("编号") != null; i++) + for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetFieldDefn("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 7bf65dc..bd0f81b 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -19,17 +19,7 @@ private Dictionary map = null; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; - //TODOLIST:用晓伟的代理进行操作,功能拆分细化 - //public FrmAllWorkWellStatis(GSOGeoPolygon3D polygon, DataGridView dataGridViewX11, ToolStripStatusLabel toolStripNumbers1, GSOGlobeControl ctl, PanelEx p) - //{ - // InitializeComponent(); - // panel = p; - // dataGridViewX1 = dataGridViewX11; - // toolStripNumbers = toolStripNumbers1; - // globeControl1 = ctl; - // map = getAccsMap(polygon); - //} public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) { InitializeComponent(); @@ -117,8 +107,9 @@ sql = "select " + getpipeLineFields.getFields(layername, globeControl1) + " from " + layer.Name; sql += " where 1>2 "; - for (int i = 0; i < fs.Length && fs[i].GetFieldDefn("编号") != null; i++) + for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetFieldDefn("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index 672f97a..17dad6c 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -120,6 +120,7 @@ sql += " where 1>2 "; for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetValue("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 7bf65dc..bd0f81b 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -19,17 +19,7 @@ private Dictionary map = null; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; - //TODOLIST:用晓伟的代理进行操作,功能拆分细化 - //public FrmAllWorkWellStatis(GSOGeoPolygon3D polygon, DataGridView dataGridViewX11, ToolStripStatusLabel toolStripNumbers1, GSOGlobeControl ctl, PanelEx p) - //{ - // InitializeComponent(); - // panel = p; - // dataGridViewX1 = dataGridViewX11; - // toolStripNumbers = toolStripNumbers1; - // globeControl1 = ctl; - // map = getAccsMap(polygon); - //} public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) { InitializeComponent(); @@ -117,8 +107,9 @@ sql = "select " + getpipeLineFields.getFields(layername, globeControl1) + " from " + layer.Name; sql += " where 1>2 "; - for (int i = 0; i < fs.Length && fs[i].GetFieldDefn("编号") != null; i++) + for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetFieldDefn("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index 672f97a..17dad6c 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -120,6 +120,7 @@ sql += " where 1>2 "; for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetValue("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmpipeDeepstatis.cs b/FrmpipeDeepstatis.cs index 879801a..c7edbc3 100644 --- a/FrmpipeDeepstatis.cs +++ b/FrmpipeDeepstatis.cs @@ -164,88 +164,6 @@ } } - //if (clbPipeLine.CheckedItems.Count > 0) - //{ - // if (dataGridViewX2.Rows.Count > 0) - // { - // for (int i = 0; i < clbPipeLine.CheckedItems.Count; i++) - // { - // GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(clbPipeLine.CheckedItems[i].ToString()); - // GSOFeatureLayer flayer = layer as GSOFeatureLayer; - // GSOFeatures feats = new GSOFeatures(); - // if (polygon == null) - // feats = flayer.GetAllFeatures(); - // else - // feats = flayer.FindFeaturesInPolygon(polygon, false); - // for (int j = 0; j < dataGridViewX2.Rows.Count; j++) - // { - // double totalLength = 0.00; - // int ncount = 0; - // for (int m = 0; m < feats.Length; m++) - // { - // GSOFeature feat = feats[m]; - // float radius = feat.GetFieldAsFloat("起始埋深"); - // bool upCompare = true; - // bool downCompare = true; - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null || dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["下限"].Value.ToString() != "") - // { - // if (radius >= Convert.ToDouble(dataGridViewX2.Rows[j].Cells["下限"].Value)) - // { - // downCompare = true; - // } - // else - // downCompare = false; - // } - // } - // if (dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["上限"].Value.ToString() != "") - // { - // if (radius <= Convert.ToDouble(dataGridViewX2.Rows[j].Cells["上限"].Value)) - // { - // upCompare = true; - // } - // else - // upCompare = false; - // } - // } - // if (upCompare && downCompare) - // { - // GSOGeoPolyline3D line = feat.Geometry as GSOGeoPolyline3D; - // double length = line.GetSpaceLength(true, 6378137); - // totalLength += length; - // ncount += 1; - // } - // } - // } - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null || dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // DataGridViewRow row = new DataGridViewRow(); - // int index = dataGridViewX1.Rows.Add(row); - // row = dataGridViewX1.Rows[index]; - // row.Cells["图层名称"].Value = layer.Caption; - // row.Cells["埋深范围"].Value = dataGridViewX2.Rows[j].Cells["下限"].Value + "-" + dataGridViewX2.Rows[j].Cells["上限"].Value; - // row.Cells["条数"].Value = ncount; - // row.Cells["总长度"].Value =Math.Round(totalLength,2); - - // dic.Add(layer.Caption + "," + row.Cells["埋深范围"].Value.ToString()+","+row.Cells["总长度"].Value.ToString(), ncount); - // } - // } - // } - // } - // else - // { - // MessageBox.Show("请添加分段!"); - // } - //} - //else - //{ - // MessageBox.Show("请选择图层!"); - //} showPipeWidget(); } catch (Exception ex) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 7bf65dc..bd0f81b 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -19,17 +19,7 @@ private Dictionary map = null; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; - //TODOLIST:用晓伟的代理进行操作,功能拆分细化 - //public FrmAllWorkWellStatis(GSOGeoPolygon3D polygon, DataGridView dataGridViewX11, ToolStripStatusLabel toolStripNumbers1, GSOGlobeControl ctl, PanelEx p) - //{ - // InitializeComponent(); - // panel = p; - // dataGridViewX1 = dataGridViewX11; - // toolStripNumbers = toolStripNumbers1; - // globeControl1 = ctl; - // map = getAccsMap(polygon); - //} public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) { InitializeComponent(); @@ -117,8 +107,9 @@ sql = "select " + getpipeLineFields.getFields(layername, globeControl1) + " from " + layer.Name; sql += " where 1>2 "; - for (int i = 0; i < fs.Length && fs[i].GetFieldDefn("编号") != null; i++) + for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetFieldDefn("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index 672f97a..17dad6c 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -120,6 +120,7 @@ sql += " where 1>2 "; for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetValue("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmpipeDeepstatis.cs b/FrmpipeDeepstatis.cs index 879801a..c7edbc3 100644 --- a/FrmpipeDeepstatis.cs +++ b/FrmpipeDeepstatis.cs @@ -164,88 +164,6 @@ } } - //if (clbPipeLine.CheckedItems.Count > 0) - //{ - // if (dataGridViewX2.Rows.Count > 0) - // { - // for (int i = 0; i < clbPipeLine.CheckedItems.Count; i++) - // { - // GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(clbPipeLine.CheckedItems[i].ToString()); - // GSOFeatureLayer flayer = layer as GSOFeatureLayer; - // GSOFeatures feats = new GSOFeatures(); - // if (polygon == null) - // feats = flayer.GetAllFeatures(); - // else - // feats = flayer.FindFeaturesInPolygon(polygon, false); - // for (int j = 0; j < dataGridViewX2.Rows.Count; j++) - // { - // double totalLength = 0.00; - // int ncount = 0; - // for (int m = 0; m < feats.Length; m++) - // { - // GSOFeature feat = feats[m]; - // float radius = feat.GetFieldAsFloat("起始埋深"); - // bool upCompare = true; - // bool downCompare = true; - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null || dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["下限"].Value.ToString() != "") - // { - // if (radius >= Convert.ToDouble(dataGridViewX2.Rows[j].Cells["下限"].Value)) - // { - // downCompare = true; - // } - // else - // downCompare = false; - // } - // } - // if (dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["上限"].Value.ToString() != "") - // { - // if (radius <= Convert.ToDouble(dataGridViewX2.Rows[j].Cells["上限"].Value)) - // { - // upCompare = true; - // } - // else - // upCompare = false; - // } - // } - // if (upCompare && downCompare) - // { - // GSOGeoPolyline3D line = feat.Geometry as GSOGeoPolyline3D; - // double length = line.GetSpaceLength(true, 6378137); - // totalLength += length; - // ncount += 1; - // } - // } - // } - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null || dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // DataGridViewRow row = new DataGridViewRow(); - // int index = dataGridViewX1.Rows.Add(row); - // row = dataGridViewX1.Rows[index]; - // row.Cells["图层名称"].Value = layer.Caption; - // row.Cells["埋深范围"].Value = dataGridViewX2.Rows[j].Cells["下限"].Value + "-" + dataGridViewX2.Rows[j].Cells["上限"].Value; - // row.Cells["条数"].Value = ncount; - // row.Cells["总长度"].Value =Math.Round(totalLength,2); - - // dic.Add(layer.Caption + "," + row.Cells["埋深范围"].Value.ToString()+","+row.Cells["总长度"].Value.ToString(), ncount); - // } - // } - // } - // } - // else - // { - // MessageBox.Show("请添加分段!"); - // } - //} - //else - //{ - // MessageBox.Show("请选择图层!"); - //} showPipeWidget(); } catch (Exception ex) diff --git a/FrmpipeMaterialGather.cs b/FrmpipeMaterialGather.cs index b7ab1d2..3e9f45d 100644 --- a/FrmpipeMaterialGather.cs +++ b/FrmpipeMaterialGather.cs @@ -180,79 +180,6 @@ } - //if (clbPipeLine.CheckedItems.Count > 0) - //{ - // for (int i = 0; i < clbPipeLine.CheckedItems.Count; i++) - // { - // GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(clbPipeLine.CheckedItems[i].ToString()); - // GSOFeatureLayer flayer = layer as GSOFeatureLayer; - // GSOFeatures feats = new GSOFeatures(); - // if (polygon == null) - // feats = flayer.GetAllFeatures(); - // else - // feats = flayer.FindFeaturesInPolygon(polygon, false); - // List lstDiameter = new List(); - - // for (int j = 0; j < clbmaterials.CheckedItems.Count; j++) - // { - // if (!lstDiameter.Contains(clbmaterials.CheckedItems[j].ToString())) - // { - // lstDiameter.Add(clbmaterials.CheckedItems[j].ToString()); - // } - // } - // //lstDiameter.Sort(); - // if (lstDiameter.Count > 0) - // { - // for (int m = 0; m < lstDiameter.Count; m++) - // { - // double totalLength = 0.00; - // int ncount = 0; - // for (int j = 0; j < feats.Length; j++) - // { - // if (lstDiameter[m] != "无") - // { - // if (feats[j].GetFieldAsString("材质") == lstDiameter[m]) - // { - // GSOGeoPolyline3D line = feats[j].Geometry as GSOGeoPolyline3D; - // if (line != null) - // { - // double length = line.GetSpaceLength(true, 6378137); - // totalLength += length; - // ncount += 1; - // } - // } - // } - // else - // { - // if (feats[j].GetFieldAsString("材质") == "") - // { - // GSOGeoPolyline3D line = feats[j].Geometry as GSOGeoPolyline3D; - // if (line != null) - // { - // double length = line.GetSpaceLength(true, 6378137); - // totalLength += length; - // ncount += 1; - // } - // } - // } - // } - // DataGridViewRow row = new DataGridViewRow(); - // int index = dataGridViewX1.Rows.Add(row); - // row = dataGridViewX1.Rows[index]; - // row.Cells["图层名称"].Value = layer.Caption; - // row.Cells["材质"].Value = lstDiameter[m]; - // row.Cells["条数"].Value = ncount; - // row.Cells["总长度"].Value = Math.Round(totalLength); - - // dic.Add(layer.Caption + "," + row.Cells["材质"].Value.ToString(), ncount); - // } - // } - // } - //} - //else - //{ - // MessageBox.Show("请选择图层!"); - //} showPipeWidget(); } catch (Exception ex) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 7bf65dc..bd0f81b 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -19,17 +19,7 @@ private Dictionary map = null; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; - //TODOLIST:用晓伟的代理进行操作,功能拆分细化 - //public FrmAllWorkWellStatis(GSOGeoPolygon3D polygon, DataGridView dataGridViewX11, ToolStripStatusLabel toolStripNumbers1, GSOGlobeControl ctl, PanelEx p) - //{ - // InitializeComponent(); - // panel = p; - // dataGridViewX1 = dataGridViewX11; - // toolStripNumbers = toolStripNumbers1; - // globeControl1 = ctl; - // map = getAccsMap(polygon); - //} public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) { InitializeComponent(); @@ -117,8 +107,9 @@ sql = "select " + getpipeLineFields.getFields(layername, globeControl1) + " from " + layer.Name; sql += " where 1>2 "; - for (int i = 0; i < fs.Length && fs[i].GetFieldDefn("编号") != null; i++) + for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetFieldDefn("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index 672f97a..17dad6c 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -120,6 +120,7 @@ sql += " where 1>2 "; for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetValue("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmpipeDeepstatis.cs b/FrmpipeDeepstatis.cs index 879801a..c7edbc3 100644 --- a/FrmpipeDeepstatis.cs +++ b/FrmpipeDeepstatis.cs @@ -164,88 +164,6 @@ } } - //if (clbPipeLine.CheckedItems.Count > 0) - //{ - // if (dataGridViewX2.Rows.Count > 0) - // { - // for (int i = 0; i < clbPipeLine.CheckedItems.Count; i++) - // { - // GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(clbPipeLine.CheckedItems[i].ToString()); - // GSOFeatureLayer flayer = layer as GSOFeatureLayer; - // GSOFeatures feats = new GSOFeatures(); - // if (polygon == null) - // feats = flayer.GetAllFeatures(); - // else - // feats = flayer.FindFeaturesInPolygon(polygon, false); - // for (int j = 0; j < dataGridViewX2.Rows.Count; j++) - // { - // double totalLength = 0.00; - // int ncount = 0; - // for (int m = 0; m < feats.Length; m++) - // { - // GSOFeature feat = feats[m]; - // float radius = feat.GetFieldAsFloat("起始埋深"); - // bool upCompare = true; - // bool downCompare = true; - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null || dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["下限"].Value.ToString() != "") - // { - // if (radius >= Convert.ToDouble(dataGridViewX2.Rows[j].Cells["下限"].Value)) - // { - // downCompare = true; - // } - // else - // downCompare = false; - // } - // } - // if (dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["上限"].Value.ToString() != "") - // { - // if (radius <= Convert.ToDouble(dataGridViewX2.Rows[j].Cells["上限"].Value)) - // { - // upCompare = true; - // } - // else - // upCompare = false; - // } - // } - // if (upCompare && downCompare) - // { - // GSOGeoPolyline3D line = feat.Geometry as GSOGeoPolyline3D; - // double length = line.GetSpaceLength(true, 6378137); - // totalLength += length; - // ncount += 1; - // } - // } - // } - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null || dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // DataGridViewRow row = new DataGridViewRow(); - // int index = dataGridViewX1.Rows.Add(row); - // row = dataGridViewX1.Rows[index]; - // row.Cells["图层名称"].Value = layer.Caption; - // row.Cells["埋深范围"].Value = dataGridViewX2.Rows[j].Cells["下限"].Value + "-" + dataGridViewX2.Rows[j].Cells["上限"].Value; - // row.Cells["条数"].Value = ncount; - // row.Cells["总长度"].Value =Math.Round(totalLength,2); - - // dic.Add(layer.Caption + "," + row.Cells["埋深范围"].Value.ToString()+","+row.Cells["总长度"].Value.ToString(), ncount); - // } - // } - // } - // } - // else - // { - // MessageBox.Show("请添加分段!"); - // } - //} - //else - //{ - // MessageBox.Show("请选择图层!"); - //} showPipeWidget(); } catch (Exception ex) diff --git a/FrmpipeMaterialGather.cs b/FrmpipeMaterialGather.cs index b7ab1d2..3e9f45d 100644 --- a/FrmpipeMaterialGather.cs +++ b/FrmpipeMaterialGather.cs @@ -180,79 +180,6 @@ } - //if (clbPipeLine.CheckedItems.Count > 0) - //{ - // for (int i = 0; i < clbPipeLine.CheckedItems.Count; i++) - // { - // GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(clbPipeLine.CheckedItems[i].ToString()); - // GSOFeatureLayer flayer = layer as GSOFeatureLayer; - // GSOFeatures feats = new GSOFeatures(); - // if (polygon == null) - // feats = flayer.GetAllFeatures(); - // else - // feats = flayer.FindFeaturesInPolygon(polygon, false); - // List lstDiameter = new List(); - - // for (int j = 0; j < clbmaterials.CheckedItems.Count; j++) - // { - // if (!lstDiameter.Contains(clbmaterials.CheckedItems[j].ToString())) - // { - // lstDiameter.Add(clbmaterials.CheckedItems[j].ToString()); - // } - // } - // //lstDiameter.Sort(); - // if (lstDiameter.Count > 0) - // { - // for (int m = 0; m < lstDiameter.Count; m++) - // { - // double totalLength = 0.00; - // int ncount = 0; - // for (int j = 0; j < feats.Length; j++) - // { - // if (lstDiameter[m] != "无") - // { - // if (feats[j].GetFieldAsString("材质") == lstDiameter[m]) - // { - // GSOGeoPolyline3D line = feats[j].Geometry as GSOGeoPolyline3D; - // if (line != null) - // { - // double length = line.GetSpaceLength(true, 6378137); - // totalLength += length; - // ncount += 1; - // } - // } - // } - // else - // { - // if (feats[j].GetFieldAsString("材质") == "") - // { - // GSOGeoPolyline3D line = feats[j].Geometry as GSOGeoPolyline3D; - // if (line != null) - // { - // double length = line.GetSpaceLength(true, 6378137); - // totalLength += length; - // ncount += 1; - // } - // } - // } - // } - // DataGridViewRow row = new DataGridViewRow(); - // int index = dataGridViewX1.Rows.Add(row); - // row = dataGridViewX1.Rows[index]; - // row.Cells["图层名称"].Value = layer.Caption; - // row.Cells["材质"].Value = lstDiameter[m]; - // row.Cells["条数"].Value = ncount; - // row.Cells["总长度"].Value = Math.Round(totalLength); - - // dic.Add(layer.Caption + "," + row.Cells["材质"].Value.ToString(), ncount); - // } - // } - // } - //} - //else - //{ - // MessageBox.Show("请选择图层!"); - //} showPipeWidget(); } catch (Exception ex) diff --git a/Frmpipediameterstatis.cs b/Frmpipediameterstatis.cs index 9953ac0..aa482d8 100644 --- a/Frmpipediameterstatis.cs +++ b/Frmpipediameterstatis.cs @@ -27,12 +27,9 @@ frm = new Frmpipediameterstatis(_globeControl1, pipeLayers, visibleId); frm.Show(_globeControl1.Parent); } - else + else if (frm.WindowState == FormWindowState.Minimized) { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } + frm.WindowState = FormWindowState.Normal; } } @@ -208,7 +205,8 @@ } catch (Exception ex) { - MessageBox.Show(ex.Message); + LogHelper.WriteLog(typeof(Frmpipediameterstatis), ex.Message); + //MessageBox.Show(ex.Message); LogError.PublishError(ex); } } @@ -290,76 +288,77 @@ /// private void btnExport_Click(object sender, EventArgs e) { - if (dataGridViewX1.Rows.Count > 0) + if (dataGridViewX1.Rows.Count <= 0) { - SaveFileDialog dlg = new SaveFileDialog(); - dlg.Filter = "Excel files (*.xls)|*.xls"; - dlg.FilterIndex = 0; - dlg.RestoreDirectory = true; - //dlg.CreatePrompt = true; - dlg.Title = "保存为Excel文件"; - dlg.FileName = DateTime.Now.ToString("yyyyMMdd") + ".xls"; - if (dlg.ShowDialog() == DialogResult.OK) + MessageBox.Show("统计结果为空,请重新统计之后再导出Excel!", "提示"); + return; + } + + SaveFileDialog dlg = new SaveFileDialog(); + dlg.Filter = "Excel files (*.xls)|*.xls"; + dlg.FilterIndex = 0; + dlg.RestoreDirectory = true; + //dlg.CreatePrompt = true; + dlg.Title = "保存为Excel文件"; + dlg.FileName = DateTime.Now.ToString("yyyyMMdd") + ".xls"; + if (dlg.ShowDialog() == DialogResult.OK) + { + Stream myStream; + myStream = dlg.OpenFile(); + StreamWriter sw = new StreamWriter(myStream, System.Text.Encoding.GetEncoding(-0)); + string columnTitle = ""; + try { - Stream myStream; - myStream = dlg.OpenFile(); - StreamWriter sw = new StreamWriter(myStream, System.Text.Encoding.GetEncoding(-0)); - string columnTitle = ""; - try + sw.WriteLine("日期:" + DateTime.Now.ToString("yyyy-MM-dd")); + + //写入列标题 + for (int i = 0; i < dataGridViewX1.ColumnCount; i++) { - sw.WriteLine("日期:" + DateTime.Now.ToString("yyyy-MM-dd")); - - //写入列标题 - for (int i = 0; i < dataGridViewX1.ColumnCount; i++) + if (i > 0) { - if (i > 0) - { - columnTitle += "\t"; - } - columnTitle += dataGridViewX1.Columns[i].HeaderText; + columnTitle += "\t"; } - sw.WriteLine(columnTitle); - - //写入列内容 - for (int j = 0; j < dataGridViewX1.Rows.Count; j++) - { - string columnValue = ""; - for (int k = 0; k < dataGridViewX1.Columns.Count; k++) - { - if (k > 0) - { - columnValue += "\t"; - } - if (dataGridViewX1.Rows[j].Cells[k].Value == null) - columnValue += ""; - else - columnValue += dataGridViewX1.Rows[j].Cells[k].Value.ToString().Trim(); - } - - sw.WriteLine(columnValue); - } - sw.Close(); - myStream.Close(); - if (MessageBox.Show("导出Excel文件成功!是否打开?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - System.Diagnostics.Process.Start(dlg.FileName); - } + columnTitle += dataGridViewX1.Columns[i].HeaderText; } - catch (Exception ex) + sw.WriteLine(columnTitle); + + //写入列内容 + for (int j = 0; j < dataGridViewX1.Rows.Count; j++) { - MessageBox.Show(ex.ToString()); + string columnValue = ""; + for (int k = 0; k < dataGridViewX1.Columns.Count; k++) + { + if (k > 0) + { + columnValue += "\t"; + } + if (dataGridViewX1.Rows[j].Cells[k].Value == null) + columnValue += ""; + else + columnValue += dataGridViewX1.Rows[j].Cells[k].Value.ToString().Trim(); + } + + sw.WriteLine(columnValue); } - finally + sw.Close(); + myStream.Close(); + if (MessageBox.Show("导出Excel文件成功!是否打开?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes) { - sw.Close(); - myStream.Close(); + System.Diagnostics.Process.Start(dlg.FileName); } } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + } + finally + { + sw.Close(); + myStream.Close(); + } } - else - { - MessageBox.Show("统计结果为空,请重新统计之后再导出Excel!","提示"); - } + + } /// /// 绘制区域分段统计 diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 7bf65dc..bd0f81b 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -19,17 +19,7 @@ private Dictionary map = null; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; - //TODOLIST:用晓伟的代理进行操作,功能拆分细化 - //public FrmAllWorkWellStatis(GSOGeoPolygon3D polygon, DataGridView dataGridViewX11, ToolStripStatusLabel toolStripNumbers1, GSOGlobeControl ctl, PanelEx p) - //{ - // InitializeComponent(); - // panel = p; - // dataGridViewX1 = dataGridViewX11; - // toolStripNumbers = toolStripNumbers1; - // globeControl1 = ctl; - // map = getAccsMap(polygon); - //} public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) { InitializeComponent(); @@ -117,8 +107,9 @@ sql = "select " + getpipeLineFields.getFields(layername, globeControl1) + " from " + layer.Name; sql += " where 1>2 "; - for (int i = 0; i < fs.Length && fs[i].GetFieldDefn("编号") != null; i++) + for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetFieldDefn("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index 672f97a..17dad6c 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -120,6 +120,7 @@ sql += " where 1>2 "; for (int i = 0; i < fs.Length; i++) { + if (fs[i].GetValue("编号") == null) continue; sql += " or 编号 = '" + fs[i].GetValue("编号").ToString() + "'"; } diff --git a/FrmpipeDeepstatis.cs b/FrmpipeDeepstatis.cs index 879801a..c7edbc3 100644 --- a/FrmpipeDeepstatis.cs +++ b/FrmpipeDeepstatis.cs @@ -164,88 +164,6 @@ } } - //if (clbPipeLine.CheckedItems.Count > 0) - //{ - // if (dataGridViewX2.Rows.Count > 0) - // { - // for (int i = 0; i < clbPipeLine.CheckedItems.Count; i++) - // { - // GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(clbPipeLine.CheckedItems[i].ToString()); - // GSOFeatureLayer flayer = layer as GSOFeatureLayer; - // GSOFeatures feats = new GSOFeatures(); - // if (polygon == null) - // feats = flayer.GetAllFeatures(); - // else - // feats = flayer.FindFeaturesInPolygon(polygon, false); - // for (int j = 0; j < dataGridViewX2.Rows.Count; j++) - // { - // double totalLength = 0.00; - // int ncount = 0; - // for (int m = 0; m < feats.Length; m++) - // { - // GSOFeature feat = feats[m]; - // float radius = feat.GetFieldAsFloat("起始埋深"); - // bool upCompare = true; - // bool downCompare = true; - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null || dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["下限"].Value.ToString() != "") - // { - // if (radius >= Convert.ToDouble(dataGridViewX2.Rows[j].Cells["下限"].Value)) - // { - // downCompare = true; - // } - // else - // downCompare = false; - // } - // } - // if (dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // if (dataGridViewX2.Rows[j].Cells["上限"].Value.ToString() != "") - // { - // if (radius <= Convert.ToDouble(dataGridViewX2.Rows[j].Cells["上限"].Value)) - // { - // upCompare = true; - // } - // else - // upCompare = false; - // } - // } - // if (upCompare && downCompare) - // { - // GSOGeoPolyline3D line = feat.Geometry as GSOGeoPolyline3D; - // double length = line.GetSpaceLength(true, 6378137); - // totalLength += length; - // ncount += 1; - // } - // } - // } - // if (dataGridViewX2.Rows[j].Cells["下限"].Value != null || dataGridViewX2.Rows[j].Cells["上限"].Value != null) - // { - // DataGridViewRow row = new DataGridViewRow(); - // int index = dataGridViewX1.Rows.Add(row); - // row = dataGridViewX1.Rows[index]; - // row.Cells["图层名称"].Value = layer.Caption; - // row.Cells["埋深范围"].Value = dataGridViewX2.Rows[j].Cells["下限"].Value + "-" + dataGridViewX2.Rows[j].Cells["上限"].Value; - // row.Cells["条数"].Value = ncount; - // row.Cells["总长度"].Value =Math.Round(totalLength,2); - - // dic.Add(layer.Caption + "," + row.Cells["埋深范围"].Value.ToString()+","+row.Cells["总长度"].Value.ToString(), ncount); - // } - // } - // } - // } - // else - // { - // MessageBox.Show("请添加分段!"); - // } - //} - //else - //{ - // MessageBox.Show("请选择图层!"); - //} showPipeWidget(); } catch (Exception ex) diff --git a/FrmpipeMaterialGather.cs b/FrmpipeMaterialGather.cs index b7ab1d2..3e9f45d 100644 --- a/FrmpipeMaterialGather.cs +++ b/FrmpipeMaterialGather.cs @@ -180,79 +180,6 @@ } - //if (clbPipeLine.CheckedItems.Count > 0) - //{ - // for (int i = 0; i < clbPipeLine.CheckedItems.Count; i++) - // { - // GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(clbPipeLine.CheckedItems[i].ToString()); - // GSOFeatureLayer flayer = layer as GSOFeatureLayer; - // GSOFeatures feats = new GSOFeatures(); - // if (polygon == null) - // feats = flayer.GetAllFeatures(); - // else - // feats = flayer.FindFeaturesInPolygon(polygon, false); - // List lstDiameter = new List(); - - // for (int j = 0; j < clbmaterials.CheckedItems.Count; j++) - // { - // if (!lstDiameter.Contains(clbmaterials.CheckedItems[j].ToString())) - // { - // lstDiameter.Add(clbmaterials.CheckedItems[j].ToString()); - // } - // } - // //lstDiameter.Sort(); - // if (lstDiameter.Count > 0) - // { - // for (int m = 0; m < lstDiameter.Count; m++) - // { - // double totalLength = 0.00; - // int ncount = 0; - // for (int j = 0; j < feats.Length; j++) - // { - // if (lstDiameter[m] != "无") - // { - // if (feats[j].GetFieldAsString("材质") == lstDiameter[m]) - // { - // GSOGeoPolyline3D line = feats[j].Geometry as GSOGeoPolyline3D; - // if (line != null) - // { - // double length = line.GetSpaceLength(true, 6378137); - // totalLength += length; - // ncount += 1; - // } - // } - // } - // else - // { - // if (feats[j].GetFieldAsString("材质") == "") - // { - // GSOGeoPolyline3D line = feats[j].Geometry as GSOGeoPolyline3D; - // if (line != null) - // { - // double length = line.GetSpaceLength(true, 6378137); - // totalLength += length; - // ncount += 1; - // } - // } - // } - // } - // DataGridViewRow row = new DataGridViewRow(); - // int index = dataGridViewX1.Rows.Add(row); - // row = dataGridViewX1.Rows[index]; - // row.Cells["图层名称"].Value = layer.Caption; - // row.Cells["材质"].Value = lstDiameter[m]; - // row.Cells["条数"].Value = ncount; - // row.Cells["总长度"].Value = Math.Round(totalLength); - - // dic.Add(layer.Caption + "," + row.Cells["材质"].Value.ToString(), ncount); - // } - // } - // } - //} - //else - //{ - // MessageBox.Show("请选择图层!"); - //} showPipeWidget(); } catch (Exception ex) diff --git a/Frmpipediameterstatis.cs b/Frmpipediameterstatis.cs index 9953ac0..aa482d8 100644 --- a/Frmpipediameterstatis.cs +++ b/Frmpipediameterstatis.cs @@ -27,12 +27,9 @@ frm = new Frmpipediameterstatis(_globeControl1, pipeLayers, visibleId); frm.Show(_globeControl1.Parent); } - else + else if (frm.WindowState == FormWindowState.Minimized) { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } + frm.WindowState = FormWindowState.Normal; } } @@ -208,7 +205,8 @@ } catch (Exception ex) { - MessageBox.Show(ex.Message); + LogHelper.WriteLog(typeof(Frmpipediameterstatis), ex.Message); + //MessageBox.Show(ex.Message); LogError.PublishError(ex); } } @@ -290,76 +288,77 @@ /// private void btnExport_Click(object sender, EventArgs e) { - if (dataGridViewX1.Rows.Count > 0) + if (dataGridViewX1.Rows.Count <= 0) { - SaveFileDialog dlg = new SaveFileDialog(); - dlg.Filter = "Excel files (*.xls)|*.xls"; - dlg.FilterIndex = 0; - dlg.RestoreDirectory = true; - //dlg.CreatePrompt = true; - dlg.Title = "保存为Excel文件"; - dlg.FileName = DateTime.Now.ToString("yyyyMMdd") + ".xls"; - if (dlg.ShowDialog() == DialogResult.OK) + MessageBox.Show("统计结果为空,请重新统计之后再导出Excel!", "提示"); + return; + } + + SaveFileDialog dlg = new SaveFileDialog(); + dlg.Filter = "Excel files (*.xls)|*.xls"; + dlg.FilterIndex = 0; + dlg.RestoreDirectory = true; + //dlg.CreatePrompt = true; + dlg.Title = "保存为Excel文件"; + dlg.FileName = DateTime.Now.ToString("yyyyMMdd") + ".xls"; + if (dlg.ShowDialog() == DialogResult.OK) + { + Stream myStream; + myStream = dlg.OpenFile(); + StreamWriter sw = new StreamWriter(myStream, System.Text.Encoding.GetEncoding(-0)); + string columnTitle = ""; + try { - Stream myStream; - myStream = dlg.OpenFile(); - StreamWriter sw = new StreamWriter(myStream, System.Text.Encoding.GetEncoding(-0)); - string columnTitle = ""; - try + sw.WriteLine("日期:" + DateTime.Now.ToString("yyyy-MM-dd")); + + //写入列标题 + for (int i = 0; i < dataGridViewX1.ColumnCount; i++) { - sw.WriteLine("日期:" + DateTime.Now.ToString("yyyy-MM-dd")); - - //写入列标题 - for (int i = 0; i < dataGridViewX1.ColumnCount; i++) + if (i > 0) { - if (i > 0) - { - columnTitle += "\t"; - } - columnTitle += dataGridViewX1.Columns[i].HeaderText; + columnTitle += "\t"; } - sw.WriteLine(columnTitle); - - //写入列内容 - for (int j = 0; j < dataGridViewX1.Rows.Count; j++) - { - string columnValue = ""; - for (int k = 0; k < dataGridViewX1.Columns.Count; k++) - { - if (k > 0) - { - columnValue += "\t"; - } - if (dataGridViewX1.Rows[j].Cells[k].Value == null) - columnValue += ""; - else - columnValue += dataGridViewX1.Rows[j].Cells[k].Value.ToString().Trim(); - } - - sw.WriteLine(columnValue); - } - sw.Close(); - myStream.Close(); - if (MessageBox.Show("导出Excel文件成功!是否打开?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - System.Diagnostics.Process.Start(dlg.FileName); - } + columnTitle += dataGridViewX1.Columns[i].HeaderText; } - catch (Exception ex) + sw.WriteLine(columnTitle); + + //写入列内容 + for (int j = 0; j < dataGridViewX1.Rows.Count; j++) { - MessageBox.Show(ex.ToString()); + string columnValue = ""; + for (int k = 0; k < dataGridViewX1.Columns.Count; k++) + { + if (k > 0) + { + columnValue += "\t"; + } + if (dataGridViewX1.Rows[j].Cells[k].Value == null) + columnValue += ""; + else + columnValue += dataGridViewX1.Rows[j].Cells[k].Value.ToString().Trim(); + } + + sw.WriteLine(columnValue); } - finally + sw.Close(); + myStream.Close(); + if (MessageBox.Show("导出Excel文件成功!是否打开?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes) { - sw.Close(); - myStream.Close(); + System.Diagnostics.Process.Start(dlg.FileName); } } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + } + finally + { + sw.Close(); + myStream.Close(); + } } - else - { - MessageBox.Show("统计结果为空,请重新统计之后再导出Excel!","提示"); - } + + } /// /// 绘制区域分段统计 diff --git a/MainFrm.cs b/MainFrm.cs index 9c7719f..73f3015 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -2894,25 +2894,6 @@ switch (trackflag) { case "valvequery": - //workWellLen.Clear(); - //List list = new List(); - ////找到所有阀门 - //if (Utility.LayerNamesList != null) - //{ - // ArrayList listpt = Utility.LayerNamesList; - - // for (int i = 0; i < listpt.Count; i++) - // { - // string pipelineType = (string)Utility.LayerNamesList[i]; - - // if ((pipelineType == "给水") || (pipelineType == "天然气") || (pipelineType == "热力")) - // { - // GSOFeatures fs = Intersect_PointLayerByType(polygon, pipelineType, "阀门"); - // list.Add(fs); - // } - // } - //} - //FrmValveStatistics frm = new FrmValveStatistics(workWellLen, list, globeControl1, new DataGridViewDelegate(InitDataGridViewX1)); FrmValveStatistics frm = new FrmValveStatistics(globeControl1,polygon, new DataGridViewDelegate(InitDataGridViewX1)); frm.Show(this); //panelEx6.Visible = true; @@ -2921,68 +2902,20 @@ break; case "PipelineDistanceStatistics": - //pipeLineDis.Clear(); - //List list1 = new List(); - //for (int i = 0; i < m_PipelineLayerNames.Count; i++) - //{ - //GSOFeatures fs = Intersects_Pipeline(polygon, m_PipelineLayerNames[i]); - // list1.Add(fs); - //} - - //FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(0, pipeLineDis, list1, globeControl1, new DataGridViewDelegate(InitDataGridViewX1)); + FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames); frm1.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineSpatialQuery": - //pipeLineDis.Clear(); - //List list2 = new List(); - //for (int i = 0; i < m_PipelineLayerNames.Count; i++) - //{ - // GSOFeatures fs = Intersects_Pipeline(polygon, m_PipelineLayerNames[i]); - // if (fs != null) - // { - // list2.Add(fs); - // } - //} - - //FrmAllPipelineStatis.ShowForm(1, pipeLineDis, list2, globeControl1, new DataGridViewDelegate(InitDataGridViewX1)); + FrmAllPipelineStatis.ShowForm(globeControl1,polygon,new DataGridViewDelegate(InitDataGridViewX1),m_PipelineLayerNames); globeControl1.Globe.ClearAnalysis(); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "workwellquery": - //workWellLen.Clear(); - //List listWell = new List(); - ////找到所有井 - //if (Utility.LayerNamesList != null) - //{ - // ArrayList listpt = Utility.LayerNamesList; - - // for (int i = 0; i < listpt.Count; i++) - // { - // string pipelineType = (string)Utility.LayerNamesList[i]; - - // string sql = "select 附属物名称 from " + pipelineType + "管线附属物 group by 附属物名称"; - // DataSet dataset = OledbHelper.getDataSet(sql, pipelineType + "管线附属物"); - // if (dataset != null) - // { - // for (int j = 0; j < dataset.Tables[0].Rows.Count; j++) - // { - // string accname = dataset.Tables[0].Rows[j][0].ToString(); - // if ((accname.IndexOf("井") > 0) || (accname.IndexOf("孔") > 0) || (accname.IndexOf("篦") > 0)) - // { - // GSOFeatures fs = Intersect_PointLayerByType(polygon, pipelineType, dataset.Tables[0].Rows[j][0].ToString()); - // listWell.Add(fs); - // } - // } - // } - // } - //} - - //FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(polygon, dataGridViewX1, toolStripNumbers, globeControl1, panelOfTable); FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1)); frmWell.Show(this); @@ -9745,39 +9678,7 @@ /// /// private void buttonItemTJ3_ALL_Click(object sender, EventArgs e) - { - //日志记录 - //LogManager.saveLog(Utility.userName, "井盖数量统计"); - - //workWellLen.Clear(); - //List list = new List(); - - //if (Utility.LayerNamesList != null) - //{ - // ArrayList listpt = Utility.LayerNamesList; - - // for (int i = 0; i < listpt.Count; i++) - // { - // string pipelineType = (string)Utility.LayerNamesList[i]; - - // string sql = "select 附属物名称 from " + pipelineType + "管线附属物 group by 附属物名称"; - // DataSet dataset = OledbHelper.getDataSet(sql, pipelineType + "管线附属物"); - // if (dataset != null) - // { - // for (int j = 0; j < dataset.Tables[0].Rows.Count; j++) - // { - // string accname = dataset.Tables[0].Rows[j][0].ToString(); - // if ((accname.IndexOf("井") > 0) || (accname.IndexOf("孔") > 0) || (accname.IndexOf("篦") > 0)) - // { - // GSOFeatures fs = Intersect_PointLayerByType(null, pipelineType, dataset.Tables[0].Rows[j][0].ToString()); - // list.Add(fs); - // } - // } - // } - // } - //} - - //FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(null, dataGridViewX1, toolStripNumbers, globeControl1, panelOfTable); + { FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1)); frm.Show(this); } @@ -9790,7 +9691,7 @@ { //日志记录 LogManager.saveLog(Utility.userName, "井盖数量统计"); - + trackflag = "workwellquery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack;