diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmMaterialSel.cs b/FrmMaterialSel.cs index d23f385..c5af730 100644 --- a/FrmMaterialSel.cs +++ b/FrmMaterialSel.cs @@ -14,13 +14,14 @@ static FrmMaterialSel frm; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1); + frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +33,13 @@ } } - public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -142,13 +144,22 @@ filedValueList.Add(listBox2.Items[i].ToString()); } - ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, - comboBoxEx1.Text.Trim(), "材质", filedValueList); +// ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, +// comboBoxEx1.Text.Trim(), "材质", filedValueList); - if (table != null && table.Rows.Count > 0) +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "材质", filedValueList); + if (total > 0) { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "材质", filedValueList); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -178,7 +189,7 @@ /// private void FrmMaterialSel_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmMaterialSel.cs b/FrmMaterialSel.cs index d23f385..c5af730 100644 --- a/FrmMaterialSel.cs +++ b/FrmMaterialSel.cs @@ -14,13 +14,14 @@ static FrmMaterialSel frm; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1); + frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +33,13 @@ } } - public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -142,13 +144,22 @@ filedValueList.Add(listBox2.Items[i].ToString()); } - ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, - comboBoxEx1.Text.Trim(), "材质", filedValueList); +// ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, +// comboBoxEx1.Text.Trim(), "材质", filedValueList); - if (table != null && table.Rows.Count > 0) +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "材质", filedValueList); + if (total > 0) { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "材质", filedValueList); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -178,7 +189,7 @@ /// private void FrmMaterialSel_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmQuerySQL.cs b/FrmQuerySQL.cs index 3c05684..591e731 100644 --- a/FrmQuerySQL.cs +++ b/FrmQuerySQL.cs @@ -16,14 +16,14 @@ public string currentLayerName; static FrmQuerySQL frm; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmQuerySQL(_ctl, InitDataGridViewX1); + frm = new FrmQuerySQL(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -35,11 +35,12 @@ } } - public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); m_globeControl = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } #region 符号按钮双击事件 @@ -227,12 +228,21 @@ { currentLayerName = cbox_Layers.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); +// ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); - if (table != null && table.Rows.Count != 0) +// if (table != null && table.Rows.Count != 0) +// { +// strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; +// m_InitDataGridViewX1(table, strLable, currentLayerName, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(currentLayerName, textBox_WhereClause.Text); + if (total > 0) { - strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; - m_InitDataGridViewX1(table, strLable, currentLayerName, true); + string strLable = currentLayerName + " || 共有:" + total + "记录"; + string sql = PaginationUtil.GetQuerySql(m_globeControl, currentLayerName, textBox_WhereClause.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, currentLayerName); + pagination.FillDataGridView(); } else { @@ -290,7 +300,7 @@ /// private void Frm_QuerySQL_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmMaterialSel.cs b/FrmMaterialSel.cs index d23f385..c5af730 100644 --- a/FrmMaterialSel.cs +++ b/FrmMaterialSel.cs @@ -14,13 +14,14 @@ static FrmMaterialSel frm; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1); + frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +33,13 @@ } } - public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -142,13 +144,22 @@ filedValueList.Add(listBox2.Items[i].ToString()); } - ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, - comboBoxEx1.Text.Trim(), "材质", filedValueList); +// ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, +// comboBoxEx1.Text.Trim(), "材质", filedValueList); - if (table != null && table.Rows.Count > 0) +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "材质", filedValueList); + if (total > 0) { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "材质", filedValueList); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -178,7 +189,7 @@ /// private void FrmMaterialSel_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmQuerySQL.cs b/FrmQuerySQL.cs index 3c05684..591e731 100644 --- a/FrmQuerySQL.cs +++ b/FrmQuerySQL.cs @@ -16,14 +16,14 @@ public string currentLayerName; static FrmQuerySQL frm; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmQuerySQL(_ctl, InitDataGridViewX1); + frm = new FrmQuerySQL(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -35,11 +35,12 @@ } } - public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); m_globeControl = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } #region 符号按钮双击事件 @@ -227,12 +228,21 @@ { currentLayerName = cbox_Layers.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); +// ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); - if (table != null && table.Rows.Count != 0) +// if (table != null && table.Rows.Count != 0) +// { +// strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; +// m_InitDataGridViewX1(table, strLable, currentLayerName, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(currentLayerName, textBox_WhereClause.Text); + if (total > 0) { - strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; - m_InitDataGridViewX1(table, strLable, currentLayerName, true); + string strLable = currentLayerName + " || 共有:" + total + "记录"; + string sql = PaginationUtil.GetQuerySql(m_globeControl, currentLayerName, textBox_WhereClause.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, currentLayerName); + pagination.FillDataGridView(); } else { @@ -290,7 +300,7 @@ /// private void Frm_QuerySQL_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index f4770a9..369a7ee 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -17,23 +17,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - //public FrmValveStatistics(Dictionary wellLen, List _list, - // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate initDataGridViewX1) - //{ - // InitializeComponent(); - // workWellLengthAndType = wellLen; - // list = _list; - // globeControl1 = ctl; - // m_InitDataGridViewX1 = initDataGridViewX1; - //} - - public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -94,7 +86,7 @@ { //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chaFamenStatis.Series["阀门"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -107,18 +99,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - for (int i = 0; i < fs.Length; i++) - { - if (fs[i].GetValue("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetValue("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// } +// +// DataTable table = OledbHelper.QueryTable(sql); +// string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(table, strLable, layername, true); + + + List list = new List(); + for (int i = 0; i < fs.Length; i++) + { + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable table = OledbHelper.QueryTable(sql); - string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; - m_InitDataGridViewX1(table, strLable, layername, true); - + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号",list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } } /// diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmMaterialSel.cs b/FrmMaterialSel.cs index d23f385..c5af730 100644 --- a/FrmMaterialSel.cs +++ b/FrmMaterialSel.cs @@ -14,13 +14,14 @@ static FrmMaterialSel frm; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1); + frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +33,13 @@ } } - public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -142,13 +144,22 @@ filedValueList.Add(listBox2.Items[i].ToString()); } - ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, - comboBoxEx1.Text.Trim(), "材质", filedValueList); +// ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, +// comboBoxEx1.Text.Trim(), "材质", filedValueList); - if (table != null && table.Rows.Count > 0) +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "材质", filedValueList); + if (total > 0) { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "材质", filedValueList); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -178,7 +189,7 @@ /// private void FrmMaterialSel_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmQuerySQL.cs b/FrmQuerySQL.cs index 3c05684..591e731 100644 --- a/FrmQuerySQL.cs +++ b/FrmQuerySQL.cs @@ -16,14 +16,14 @@ public string currentLayerName; static FrmQuerySQL frm; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmQuerySQL(_ctl, InitDataGridViewX1); + frm = new FrmQuerySQL(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -35,11 +35,12 @@ } } - public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); m_globeControl = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } #region 符号按钮双击事件 @@ -227,12 +228,21 @@ { currentLayerName = cbox_Layers.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); +// ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); - if (table != null && table.Rows.Count != 0) +// if (table != null && table.Rows.Count != 0) +// { +// strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; +// m_InitDataGridViewX1(table, strLable, currentLayerName, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(currentLayerName, textBox_WhereClause.Text); + if (total > 0) { - strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; - m_InitDataGridViewX1(table, strLable, currentLayerName, true); + string strLable = currentLayerName + " || 共有:" + total + "记录"; + string sql = PaginationUtil.GetQuerySql(m_globeControl, currentLayerName, textBox_WhereClause.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, currentLayerName); + pagination.FillDataGridView(); } else { @@ -290,7 +300,7 @@ /// private void Frm_QuerySQL_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index f4770a9..369a7ee 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -17,23 +17,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - //public FrmValveStatistics(Dictionary wellLen, List _list, - // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate initDataGridViewX1) - //{ - // InitializeComponent(); - // workWellLengthAndType = wellLen; - // list = _list; - // globeControl1 = ctl; - // m_InitDataGridViewX1 = initDataGridViewX1; - //} - - public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -94,7 +86,7 @@ { //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chaFamenStatis.Series["阀门"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -107,18 +99,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - for (int i = 0; i < fs.Length; i++) - { - if (fs[i].GetValue("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetValue("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// } +// +// DataTable table = OledbHelper.QueryTable(sql); +// string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(table, strLable, layername, true); + + + List list = new List(); + for (int i = 0; i < fs.Length; i++) + { + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable table = OledbHelper.QueryTable(sql); - string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; - m_InitDataGridViewX1(table, strLable, layername, true); - + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号",list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } } /// diff --git a/Frmpipediameterstatis.cs b/Frmpipediameterstatis.cs index 631a996..48ac35f 100644 --- a/Frmpipediameterstatis.cs +++ b/Frmpipediameterstatis.cs @@ -17,7 +17,9 @@ List pipeLayerNames ; static Frmpipediameterstatis frm; - public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers,int visibleId) +// private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { if (frm == null) { @@ -30,11 +32,12 @@ } } - public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) + public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { InitializeComponent(); globeControl1 = _globeControl1; pipeLayerNames = pipeLayers; +// _pageControl = pageControl; if (visibleId == 0) { buttonX9.Visible = false; @@ -459,12 +462,9 @@ bool b1 = false, b2 = false; b1 = float.TryParse(text.Text, out oldf); b2 = float.TryParse(text.Text + e.KeyChar, out f); - if (b2 == false) + if (!b2) { - if (b1) - e.Handled = true; - else - e.Handled = false; + e.Handled = b1; } } } diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmMaterialSel.cs b/FrmMaterialSel.cs index d23f385..c5af730 100644 --- a/FrmMaterialSel.cs +++ b/FrmMaterialSel.cs @@ -14,13 +14,14 @@ static FrmMaterialSel frm; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1); + frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +33,13 @@ } } - public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -142,13 +144,22 @@ filedValueList.Add(listBox2.Items[i].ToString()); } - ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, - comboBoxEx1.Text.Trim(), "材质", filedValueList); +// ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, +// comboBoxEx1.Text.Trim(), "材质", filedValueList); - if (table != null && table.Rows.Count > 0) +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "材质", filedValueList); + if (total > 0) { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "材质", filedValueList); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -178,7 +189,7 @@ /// private void FrmMaterialSel_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmQuerySQL.cs b/FrmQuerySQL.cs index 3c05684..591e731 100644 --- a/FrmQuerySQL.cs +++ b/FrmQuerySQL.cs @@ -16,14 +16,14 @@ public string currentLayerName; static FrmQuerySQL frm; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmQuerySQL(_ctl, InitDataGridViewX1); + frm = new FrmQuerySQL(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -35,11 +35,12 @@ } } - public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); m_globeControl = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } #region 符号按钮双击事件 @@ -227,12 +228,21 @@ { currentLayerName = cbox_Layers.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); +// ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); - if (table != null && table.Rows.Count != 0) +// if (table != null && table.Rows.Count != 0) +// { +// strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; +// m_InitDataGridViewX1(table, strLable, currentLayerName, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(currentLayerName, textBox_WhereClause.Text); + if (total > 0) { - strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; - m_InitDataGridViewX1(table, strLable, currentLayerName, true); + string strLable = currentLayerName + " || 共有:" + total + "记录"; + string sql = PaginationUtil.GetQuerySql(m_globeControl, currentLayerName, textBox_WhereClause.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, currentLayerName); + pagination.FillDataGridView(); } else { @@ -290,7 +300,7 @@ /// private void Frm_QuerySQL_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index f4770a9..369a7ee 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -17,23 +17,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - //public FrmValveStatistics(Dictionary wellLen, List _list, - // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate initDataGridViewX1) - //{ - // InitializeComponent(); - // workWellLengthAndType = wellLen; - // list = _list; - // globeControl1 = ctl; - // m_InitDataGridViewX1 = initDataGridViewX1; - //} - - public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -94,7 +86,7 @@ { //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chaFamenStatis.Series["阀门"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -107,18 +99,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - for (int i = 0; i < fs.Length; i++) - { - if (fs[i].GetValue("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetValue("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// } +// +// DataTable table = OledbHelper.QueryTable(sql); +// string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(table, strLable, layername, true); + + + List list = new List(); + for (int i = 0; i < fs.Length; i++) + { + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable table = OledbHelper.QueryTable(sql); - string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; - m_InitDataGridViewX1(table, strLable, layername, true); - + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号",list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } } /// diff --git a/Frmpipediameterstatis.cs b/Frmpipediameterstatis.cs index 631a996..48ac35f 100644 --- a/Frmpipediameterstatis.cs +++ b/Frmpipediameterstatis.cs @@ -17,7 +17,9 @@ List pipeLayerNames ; static Frmpipediameterstatis frm; - public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers,int visibleId) +// private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { if (frm == null) { @@ -30,11 +32,12 @@ } } - public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) + public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { InitializeComponent(); globeControl1 = _globeControl1; pipeLayerNames = pipeLayers; +// _pageControl = pageControl; if (visibleId == 0) { buttonX9.Visible = false; @@ -459,12 +462,9 @@ bool b1 = false, b2 = false; b1 = float.TryParse(text.Text, out oldf); b2 = float.TryParse(text.Text + e.KeyChar, out f); - if (b2 == false) + if (!b2) { - if (b1) - e.Handled = true; - else - e.Handled = false; + e.Handled = b1; } } } diff --git a/MainFrm.cs b/MainFrm.cs index 57d21ac..24f70a6 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -101,6 +101,18 @@ float mouseDownX1, mouseDownY1; float mouseDownX2, mouseDownY2; + //控制分页的数据结构,首页、末页、上一页、下一页 + public struct PageControlStuct + { + public ToolStripStatusLabel firstpage; + public ToolStripStatusLabel prepage; + public ToolStripStatusLabel nextpage; + public ToolStripStatusLabel lastpage; + public ToolStripStatusLabel pageinfo; + public ToolStripStatusLabel toolStripNumbers; + public ToolStripStatusLabel toolStripFeatureLength; + } + /// /// /// @@ -1827,31 +1839,36 @@ { if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon || e.Polygon == null) return; GSOGeoPolygon3D polygon = e.Polygon; - + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; switch (trackflag) { case "valvequery": - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1); + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1,pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineDistanceStatistics": - FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm1.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineSpatialQuery": - FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); globeControl1.Globe.ClearAnalysis(); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "workwellquery": - FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1); + FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1, pageControl); frmWell.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; @@ -5394,6 +5411,8 @@ FrmKeywordQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); } + + /// /// 编号查询 /// @@ -5402,8 +5421,15 @@ private void 编号查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "编号查询"); - - FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; +// pageControl.toolStripFeatureLength = toolStripFeatureLength; + pageControl.toolStripNumbers = toolStripNumbers; + FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 坐标查询 @@ -5424,8 +5450,13 @@ private void 附属物查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "附属物查询"); - - FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1, pageControl); } /// /// 管径查询 @@ -5435,8 +5466,13 @@ private void 管径查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径查询"); - - FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 材质查询 @@ -5446,8 +5482,13 @@ private void 材质查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "材质查询"); - - FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1,pageControl); } /// /// 基本查询 @@ -5457,8 +5498,13 @@ private void 基本查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "基本查询"); - - FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 复合查询 @@ -5468,8 +5514,13 @@ private void 复合查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "复合查询"); - - FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 关联查询 @@ -5493,8 +5544,7 @@ GSOLayer layer = null; globeControl1.Globe.GetSelectObject(j, out feature, out layer); - if (feature == null && feature.Geometry == null || (feature.Geometry.Type == EnumGeometryType.GeoPolygon3D - || feature.Geometry.Type == EnumGeometryType.GeoWater)) + if (feature == null || feature.Geometry == null || feature.Geometry.Type == EnumGeometryType.GeoPolygon3D || feature.Geometry.Type == EnumGeometryType.GeoWater) return; ClassSearchAnalysis.ResultRelationAnalysis(globeControl1, feature, Utility.valueLayerNames, Utility.workwellLayerNames, Utility.instrumenLayerNames, Utility.pipefittingLayerNames, Utility.m_PipelineLayerNames, valueAllowance); @@ -5556,7 +5606,13 @@ private void 管线长度统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管线长度统计"); - FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm.Show(this); } /// @@ -5572,6 +5628,7 @@ globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; } + /// /// 阀门数量全区域统计 /// @@ -5580,11 +5637,18 @@ private void 阀门数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1, pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; } + /// /// 阀门数量绘制区域统计 /// @@ -5593,7 +5657,6 @@ private void 阀门数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - trackflag = "valvequery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5605,7 +5668,13 @@ /// private void 井盖数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { - FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1,pageControl); frm.Show(this); } /// @@ -5616,7 +5685,6 @@ private void 井盖数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "井盖数量统计"); - trackflag = "workwellquery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5629,7 +5697,6 @@ private void 管径分段统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 0); } /// @@ -5640,7 +5707,6 @@ private void 管径分段统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - trackflag = null; Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 1); } diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmMaterialSel.cs b/FrmMaterialSel.cs index d23f385..c5af730 100644 --- a/FrmMaterialSel.cs +++ b/FrmMaterialSel.cs @@ -14,13 +14,14 @@ static FrmMaterialSel frm; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1); + frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +33,13 @@ } } - public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -142,13 +144,22 @@ filedValueList.Add(listBox2.Items[i].ToString()); } - ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, - comboBoxEx1.Text.Trim(), "材质", filedValueList); +// ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, +// comboBoxEx1.Text.Trim(), "材质", filedValueList); - if (table != null && table.Rows.Count > 0) +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "材质", filedValueList); + if (total > 0) { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "材质", filedValueList); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -178,7 +189,7 @@ /// private void FrmMaterialSel_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmQuerySQL.cs b/FrmQuerySQL.cs index 3c05684..591e731 100644 --- a/FrmQuerySQL.cs +++ b/FrmQuerySQL.cs @@ -16,14 +16,14 @@ public string currentLayerName; static FrmQuerySQL frm; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmQuerySQL(_ctl, InitDataGridViewX1); + frm = new FrmQuerySQL(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -35,11 +35,12 @@ } } - public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); m_globeControl = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } #region 符号按钮双击事件 @@ -227,12 +228,21 @@ { currentLayerName = cbox_Layers.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); +// ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); - if (table != null && table.Rows.Count != 0) +// if (table != null && table.Rows.Count != 0) +// { +// strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; +// m_InitDataGridViewX1(table, strLable, currentLayerName, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(currentLayerName, textBox_WhereClause.Text); + if (total > 0) { - strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; - m_InitDataGridViewX1(table, strLable, currentLayerName, true); + string strLable = currentLayerName + " || 共有:" + total + "记录"; + string sql = PaginationUtil.GetQuerySql(m_globeControl, currentLayerName, textBox_WhereClause.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, currentLayerName); + pagination.FillDataGridView(); } else { @@ -290,7 +300,7 @@ /// private void Frm_QuerySQL_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index f4770a9..369a7ee 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -17,23 +17,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - //public FrmValveStatistics(Dictionary wellLen, List _list, - // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate initDataGridViewX1) - //{ - // InitializeComponent(); - // workWellLengthAndType = wellLen; - // list = _list; - // globeControl1 = ctl; - // m_InitDataGridViewX1 = initDataGridViewX1; - //} - - public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -94,7 +86,7 @@ { //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chaFamenStatis.Series["阀门"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -107,18 +99,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - for (int i = 0; i < fs.Length; i++) - { - if (fs[i].GetValue("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetValue("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// } +// +// DataTable table = OledbHelper.QueryTable(sql); +// string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(table, strLable, layername, true); + + + List list = new List(); + for (int i = 0; i < fs.Length; i++) + { + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable table = OledbHelper.QueryTable(sql); - string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; - m_InitDataGridViewX1(table, strLable, layername, true); - + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号",list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } } /// diff --git a/Frmpipediameterstatis.cs b/Frmpipediameterstatis.cs index 631a996..48ac35f 100644 --- a/Frmpipediameterstatis.cs +++ b/Frmpipediameterstatis.cs @@ -17,7 +17,9 @@ List pipeLayerNames ; static Frmpipediameterstatis frm; - public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers,int visibleId) +// private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { if (frm == null) { @@ -30,11 +32,12 @@ } } - public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) + public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { InitializeComponent(); globeControl1 = _globeControl1; pipeLayerNames = pipeLayers; +// _pageControl = pageControl; if (visibleId == 0) { buttonX9.Visible = false; @@ -459,12 +462,9 @@ bool b1 = false, b2 = false; b1 = float.TryParse(text.Text, out oldf); b2 = float.TryParse(text.Text + e.KeyChar, out f); - if (b2 == false) + if (!b2) { - if (b1) - e.Handled = true; - else - e.Handled = false; + e.Handled = b1; } } } diff --git a/MainFrm.cs b/MainFrm.cs index 57d21ac..24f70a6 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -101,6 +101,18 @@ float mouseDownX1, mouseDownY1; float mouseDownX2, mouseDownY2; + //控制分页的数据结构,首页、末页、上一页、下一页 + public struct PageControlStuct + { + public ToolStripStatusLabel firstpage; + public ToolStripStatusLabel prepage; + public ToolStripStatusLabel nextpage; + public ToolStripStatusLabel lastpage; + public ToolStripStatusLabel pageinfo; + public ToolStripStatusLabel toolStripNumbers; + public ToolStripStatusLabel toolStripFeatureLength; + } + /// /// /// @@ -1827,31 +1839,36 @@ { if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon || e.Polygon == null) return; GSOGeoPolygon3D polygon = e.Polygon; - + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; switch (trackflag) { case "valvequery": - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1); + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1,pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineDistanceStatistics": - FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm1.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineSpatialQuery": - FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); globeControl1.Globe.ClearAnalysis(); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "workwellquery": - FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1); + FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1, pageControl); frmWell.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; @@ -5394,6 +5411,8 @@ FrmKeywordQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); } + + /// /// 编号查询 /// @@ -5402,8 +5421,15 @@ private void 编号查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "编号查询"); - - FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; +// pageControl.toolStripFeatureLength = toolStripFeatureLength; + pageControl.toolStripNumbers = toolStripNumbers; + FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 坐标查询 @@ -5424,8 +5450,13 @@ private void 附属物查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "附属物查询"); - - FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1, pageControl); } /// /// 管径查询 @@ -5435,8 +5466,13 @@ private void 管径查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径查询"); - - FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 材质查询 @@ -5446,8 +5482,13 @@ private void 材质查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "材质查询"); - - FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1,pageControl); } /// /// 基本查询 @@ -5457,8 +5498,13 @@ private void 基本查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "基本查询"); - - FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 复合查询 @@ -5468,8 +5514,13 @@ private void 复合查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "复合查询"); - - FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 关联查询 @@ -5493,8 +5544,7 @@ GSOLayer layer = null; globeControl1.Globe.GetSelectObject(j, out feature, out layer); - if (feature == null && feature.Geometry == null || (feature.Geometry.Type == EnumGeometryType.GeoPolygon3D - || feature.Geometry.Type == EnumGeometryType.GeoWater)) + if (feature == null || feature.Geometry == null || feature.Geometry.Type == EnumGeometryType.GeoPolygon3D || feature.Geometry.Type == EnumGeometryType.GeoWater) return; ClassSearchAnalysis.ResultRelationAnalysis(globeControl1, feature, Utility.valueLayerNames, Utility.workwellLayerNames, Utility.instrumenLayerNames, Utility.pipefittingLayerNames, Utility.m_PipelineLayerNames, valueAllowance); @@ -5556,7 +5606,13 @@ private void 管线长度统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管线长度统计"); - FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm.Show(this); } /// @@ -5572,6 +5628,7 @@ globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; } + /// /// 阀门数量全区域统计 /// @@ -5580,11 +5637,18 @@ private void 阀门数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1, pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; } + /// /// 阀门数量绘制区域统计 /// @@ -5593,7 +5657,6 @@ private void 阀门数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - trackflag = "valvequery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5605,7 +5668,13 @@ /// private void 井盖数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { - FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1,pageControl); frm.Show(this); } /// @@ -5616,7 +5685,6 @@ private void 井盖数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "井盖数量统计"); - trackflag = "workwellquery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5629,7 +5697,6 @@ private void 管径分段统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 0); } /// @@ -5640,7 +5707,6 @@ private void 管径分段统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - trackflag = null; Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 1); } diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index 1c8ad99..abcf2ec 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -90,6 +90,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -244,26 +245,6 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_role_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem(); - this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); - this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -319,6 +300,26 @@ this.buttonItemXT4 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItemXT4_1 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItemXT4_2 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_role_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem(); + this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); + this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); this.gxdw_ribbonbar = new DevComponents.DotNetBar.RibbonBar(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); @@ -386,6 +387,16 @@ this.statusStrip2 = new System.Windows.Forms.StatusStrip(); this.toolStripNumbers = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabel5 = new System.Windows.Forms.ToolStripStatusLabel(); + this.firstpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.prepage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel7 = new System.Windows.Forms.ToolStripStatusLabel(); + this.nextpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel9 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lastpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.pageinfo = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel11 = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripDropDownButton3 = new System.Windows.Forms.ToolStripStatusLabel(); this.expandableSplitter2 = new DevComponents.DotNetBar.ExpandableSplitter(); this.miniToolStrip = new System.Windows.Forms.StatusStrip(); @@ -518,7 +529,6 @@ this.labelX17 = new DevComponents.DotNetBar.LabelX(); this.panelEx4 = new DevComponents.DotNetBar.PanelEx(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -529,10 +539,10 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel15.SuspendLayout(); this.ribbonPanel7.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); @@ -957,6 +967,18 @@ this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); this.layerSensorTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + this.layerTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseClick); + this.layerTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1131,7 +1153,7 @@ this.区域分析ToolStripMenuItem, this.清除分析ToolStripMenuItem}); this.toolRightMenu.Name = "toolRightMenu"; - this.toolRightMenu.Size = new System.Drawing.Size(149, 290); + this.toolRightMenu.Size = new System.Drawing.Size(153, 312); // // 量算ToolStripMenuItem // @@ -1144,7 +1166,7 @@ this.水平面积ToolStripMenuItem1, this.地表面积ToolStripMenuItem1}); this.量算ToolStripMenuItem.Name = "量算ToolStripMenuItem"; - this.量算ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.量算ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.量算ToolStripMenuItem.Text = "量算"; // // 水平距离ToolStripMenuItem1 @@ -1207,7 +1229,7 @@ this.前进ToolStripMenuItem, this.后退ToolStripMenuItem}); this.编辑ToolStripMenuItem.Name = "编辑ToolStripMenuItem"; - this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.编辑ToolStripMenuItem.Text = "编辑"; // // 平移对象ToolStripMenuItem @@ -1283,7 +1305,7 @@ this.绕中心点飞行ToolStripMenuItem, this.绕眼睛飞行ToolStripMenuItem}); this.飞行ToolStripMenuItem.Name = "飞行ToolStripMenuItem"; - this.飞行ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.飞行ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.飞行ToolStripMenuItem.Text = "飞行"; // // 自定义飞行ToolStripMenuItem @@ -1328,7 +1350,7 @@ this.属性标注ToolStripMenuItem, this.标注管理ToolStripMenuItem}); this.标注ToolStripMenuItem.Name = "标注ToolStripMenuItem"; - this.标注ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.标注ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.标注ToolStripMenuItem.Text = "标注"; // // 标高标注ToolStripMenuItem @@ -1415,76 +1437,76 @@ this.关联查询ToolStripMenuItem, this.关键字查询ToolStripMenuItem}); this.查询ToolStripMenuItem.Name = "查询ToolStripMenuItem"; - this.查询ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.查询ToolStripMenuItem.Text = "查询"; // // 空间查询ToolStripMenuItem // this.空间查询ToolStripMenuItem.Name = "空间查询ToolStripMenuItem"; - this.空间查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.空间查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.空间查询ToolStripMenuItem.Text = "空间查询"; this.空间查询ToolStripMenuItem.Click += new System.EventHandler(this.空间查询ToolStripMenuItem_Click); // // 编号查询ToolStripMenuItem // this.编号查询ToolStripMenuItem.Name = "编号查询ToolStripMenuItem"; - this.编号查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.编号查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.编号查询ToolStripMenuItem.Text = "编号查询"; this.编号查询ToolStripMenuItem.Click += new System.EventHandler(this.编号查询ToolStripMenuItem_Click); // // 坐标查询ToolStripMenuItem // this.坐标查询ToolStripMenuItem.Name = "坐标查询ToolStripMenuItem"; - this.坐标查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.坐标查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.坐标查询ToolStripMenuItem.Text = "坐标查询"; this.坐标查询ToolStripMenuItem.Click += new System.EventHandler(this.坐标查询ToolStripMenuItem_Click); // // 附属物查询ToolStripMenuItem // this.附属物查询ToolStripMenuItem.Name = "附属物查询ToolStripMenuItem"; - this.附属物查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.附属物查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.附属物查询ToolStripMenuItem.Text = "配件查询"; this.附属物查询ToolStripMenuItem.Click += new System.EventHandler(this.附属物查询ToolStripMenuItem_Click); // // 管径查询ToolStripMenuItem // this.管径查询ToolStripMenuItem.Name = "管径查询ToolStripMenuItem"; - this.管径查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.管径查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.管径查询ToolStripMenuItem.Text = "管径查询"; this.管径查询ToolStripMenuItem.Click += new System.EventHandler(this.管径查询ToolStripMenuItem_Click); // // 材质查询ToolStripMenuItem // this.材质查询ToolStripMenuItem.Name = "材质查询ToolStripMenuItem"; - this.材质查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.材质查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.材质查询ToolStripMenuItem.Text = "材质查询"; this.材质查询ToolStripMenuItem.Click += new System.EventHandler(this.材质查询ToolStripMenuItem_Click); // // 基本查询ToolStripMenuItem // this.基本查询ToolStripMenuItem.Name = "基本查询ToolStripMenuItem"; - this.基本查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.基本查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.基本查询ToolStripMenuItem.Text = "基本查询"; this.基本查询ToolStripMenuItem.Click += new System.EventHandler(this.基本查询ToolStripMenuItem_Click); // // 复合查询ToolStripMenuItem // this.复合查询ToolStripMenuItem.Name = "复合查询ToolStripMenuItem"; - this.复合查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.复合查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.复合查询ToolStripMenuItem.Text = "复合查询"; this.复合查询ToolStripMenuItem.Click += new System.EventHandler(this.复合查询ToolStripMenuItem_Click); // // 关联查询ToolStripMenuItem // this.关联查询ToolStripMenuItem.Name = "关联查询ToolStripMenuItem"; - this.关联查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.关联查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.关联查询ToolStripMenuItem.Text = "关联查询"; this.关联查询ToolStripMenuItem.Click += new System.EventHandler(this.关联查询ToolStripMenuItem_Click); // // 关键字查询ToolStripMenuItem // this.关键字查询ToolStripMenuItem.Name = "关键字查询ToolStripMenuItem"; - this.关键字查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.关键字查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.关键字查询ToolStripMenuItem.Text = "关键字查询"; this.关键字查询ToolStripMenuItem.Click += new System.EventHandler(this.关键字查询ToolStripMenuItem_Click); // @@ -1501,7 +1523,7 @@ this.附属物分类统计ToolStripMenuItem, this.标识器分类统计ToolStripMenuItem}); this.全区域统计ToolStripMenuItem.Name = "全区域统计ToolStripMenuItem"; - this.全区域统计ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.全区域统计ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.全区域统计ToolStripMenuItem.Text = "全区域统计"; // // 管线长度统计ToolStripMenuItem @@ -1580,7 +1602,7 @@ this.附属物分类统计ToolStripMenuItem1, this.标识器分类统计ToolStripMenuItem1}); this.绘制区域统计ToolStripMenuItem.Name = "绘制区域统计ToolStripMenuItem"; - this.绘制区域统计ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.绘制区域统计ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.绘制区域统计ToolStripMenuItem.Text = "绘制区域统计"; // // 管线长度统计ToolStripMenuItem1 @@ -1654,7 +1676,7 @@ this.道路断面分析ToolStripMenuItem, this.基线剖面分析ToolStripMenuItem}); this.断面分析ToolStripMenuItem.Name = "断面分析ToolStripMenuItem"; - this.断面分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.断面分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.断面分析ToolStripMenuItem.Text = "断面分析"; // // 横断面分析ToolStripMenuItem @@ -1696,7 +1718,7 @@ this.连通分析ToolStripMenuItem, this.爆管分析ToolStripMenuItem}); this.拓扑分析ToolStripMenuItem.Name = "拓扑分析ToolStripMenuItem"; - this.拓扑分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.拓扑分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.拓扑分析ToolStripMenuItem.Text = "拓扑分析"; // // 创建拓扑ToolStripMenuItem @@ -1758,7 +1780,7 @@ this.隐藏隧道ToolStripMenuItem, this.删除隧道ToolStripMenuItem}); this.开挖分析ToolStripMenuItem.Name = "开挖分析ToolStripMenuItem"; - this.开挖分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.开挖分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.开挖分析ToolStripMenuItem.Text = "开挖分析"; // // 多边形开挖ToolStripMenuItem @@ -1810,7 +1832,7 @@ this.可视域分析ToolStripMenuItem, this.可视包络分析ToolStripMenuItem}); this.视域分析ToolStripMenuItem.Name = "视域分析ToolStripMenuItem"; - this.视域分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.视域分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.视域分析ToolStripMenuItem.Text = "视域分析"; // // 通视分析ToolStripMenuItem @@ -1841,7 +1863,7 @@ this.缓冲区分析ToolStripMenuItem, this.无源淹没分析ToolStripMenuItem}); this.区域分析ToolStripMenuItem.Name = "区域分析ToolStripMenuItem"; - this.区域分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.区域分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.区域分析ToolStripMenuItem.Text = "区域分析"; // // 附属物分析ToolStripMenuItem @@ -1868,7 +1890,7 @@ // 清除分析ToolStripMenuItem // this.清除分析ToolStripMenuItem.Name = "清除分析ToolStripMenuItem"; - this.清除分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.清除分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.清除分析ToolStripMenuItem.Text = "清除分析"; this.清除分析ToolStripMenuItem.Click += new System.EventHandler(this.buttonItemClear_Click); // @@ -2201,328 +2223,6 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - this.ribbonPanel6.Visible = false; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // - // ribbonPanel2 - // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar3); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; - // - // ribbonBar3 - // - this.ribbonBar3.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar3.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar3.BackgroundStyle.Class = ""; - this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar3.ContainerControlProcessDialogKey = true; - this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_user_info, - this.btn_role_info, - this.btn_resc_info, - this.btn_role_resc, - this.btn_user_role, - this.btn_password_edit, - this.buttonItemPasswordReset}); - this.ribbonBar3.Location = new System.Drawing.Point(3, 0); - this.ribbonBar3.Name = "ribbonBar3"; - this.ribbonBar3.Size = new System.Drawing.Size(551, 59); - this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar3.TabIndex = 1; - // - // - // - this.ribbonBar3.TitleStyle.Class = ""; - this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar3.TitleStyleMouseOver.Class = ""; - this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar3.TitleVisible = false; - // - // btn_user_info - // - this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image"))); - this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_user_info.Name = "btn_user_info"; - this.btn_user_info.SubItemsExpandWidth = 14; - this.btn_user_info.Text = "用户管理"; - this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click); - // - // btn_role_info - // - this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image"))); - this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_role_info.Name = "btn_role_info"; - this.btn_role_info.SubItemsExpandWidth = 14; - this.btn_role_info.Text = "角色管理"; - this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click); - // - // btn_resc_info - // - this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image"))); - this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_resc_info.Name = "btn_resc_info"; - this.btn_resc_info.SubItemsExpandWidth = 14; - this.btn_resc_info.Text = "资源管理"; - this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click); - // - // btn_role_resc - // - this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image"))); - this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_role_resc.Name = "btn_role_resc"; - this.btn_role_resc.SubItemsExpandWidth = 14; - this.btn_role_resc.Text = "角色授权"; - this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click); - // - // btn_user_role - // - this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image"))); - this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_user_role.Name = "btn_user_role"; - this.btn_user_role.SubItemsExpandWidth = 14; - this.btn_user_role.Text = "用户授权"; - this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click); - // - // btn_password_edit - // - this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image"))); - this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_password_edit.Name = "btn_password_edit"; - this.btn_password_edit.SubItemsExpandWidth = 14; - this.btn_password_edit.Text = "密码修改"; - this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click); - // - // buttonItemPasswordReset - // - this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image"))); - this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemPasswordReset.Name = "buttonItemPasswordReset"; - this.buttonItemPasswordReset.SubItemsExpandWidth = 14; - this.buttonItemPasswordReset.Text = "重置密码"; - this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click); - // - // ribbonPanel3 - // - this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel3.Controls.Add(this.ribbonBar4); - this.ribbonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel3.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel3.Name = "ribbonPanel3"; - this.ribbonPanel3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel3.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel3.Style.Class = ""; - this.ribbonPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel3.StyleMouseDown.Class = ""; - this.ribbonPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel3.StyleMouseOver.Class = ""; - this.ribbonPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel3.TabIndex = 40; - this.ribbonPanel3.Visible = false; - // - // ribbonBar4 - // - this.ribbonBar4.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(634, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - // - // - // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.LabelWidth = 50; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.TextColor = System.Drawing.Color.Black; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3002,6 +2702,328 @@ this.buttonItemXT4_2.Text = "人员修改"; this.buttonItemXT4_2.Click += new System.EventHandler(this.buttonItemXT4_2_Click); // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + this.ribbonPanel6.Visible = false; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // + // ribbonPanel2 + // + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar3); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; + // + // ribbonBar3 + // + this.ribbonBar3.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar3.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar3.BackgroundStyle.Class = ""; + this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar3.ContainerControlProcessDialogKey = true; + this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_user_info, + this.btn_role_info, + this.btn_resc_info, + this.btn_role_resc, + this.btn_user_role, + this.btn_password_edit, + this.buttonItemPasswordReset}); + this.ribbonBar3.Location = new System.Drawing.Point(3, 0); + this.ribbonBar3.Name = "ribbonBar3"; + this.ribbonBar3.Size = new System.Drawing.Size(551, 59); + this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar3.TabIndex = 1; + // + // + // + this.ribbonBar3.TitleStyle.Class = ""; + this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar3.TitleStyleMouseOver.Class = ""; + this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar3.TitleVisible = false; + // + // btn_user_info + // + this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image"))); + this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_user_info.Name = "btn_user_info"; + this.btn_user_info.SubItemsExpandWidth = 14; + this.btn_user_info.Text = "用户管理"; + this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click); + // + // btn_role_info + // + this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image"))); + this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_role_info.Name = "btn_role_info"; + this.btn_role_info.SubItemsExpandWidth = 14; + this.btn_role_info.Text = "角色管理"; + this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click); + // + // btn_resc_info + // + this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image"))); + this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_resc_info.Name = "btn_resc_info"; + this.btn_resc_info.SubItemsExpandWidth = 14; + this.btn_resc_info.Text = "资源管理"; + this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click); + // + // btn_role_resc + // + this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image"))); + this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_role_resc.Name = "btn_role_resc"; + this.btn_role_resc.SubItemsExpandWidth = 14; + this.btn_role_resc.Text = "角色授权"; + this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click); + // + // btn_user_role + // + this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image"))); + this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_user_role.Name = "btn_user_role"; + this.btn_user_role.SubItemsExpandWidth = 14; + this.btn_user_role.Text = "用户授权"; + this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click); + // + // btn_password_edit + // + this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image"))); + this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_password_edit.Name = "btn_password_edit"; + this.btn_password_edit.SubItemsExpandWidth = 14; + this.btn_password_edit.Text = "密码修改"; + this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click); + // + // buttonItemPasswordReset + // + this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image"))); + this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemPasswordReset.Name = "buttonItemPasswordReset"; + this.buttonItemPasswordReset.SubItemsExpandWidth = 14; + this.buttonItemPasswordReset.Text = "重置密码"; + this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click); + // + // ribbonPanel3 + // + this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel3.Controls.Add(this.ribbonBar4); + this.ribbonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel3.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel3.Name = "ribbonPanel3"; + this.ribbonPanel3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel3.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel3.Style.Class = ""; + this.ribbonPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel3.StyleMouseDown.Class = ""; + this.ribbonPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel3.StyleMouseOver.Class = ""; + this.ribbonPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel3.TabIndex = 40; + this.ribbonPanel3.Visible = false; + // + // ribbonBar4 + // + this.ribbonBar4.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(634, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + // + // + // + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.LabelWidth = 50; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.TextColor = System.Drawing.Color.Black; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel7 // this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3837,7 +3859,7 @@ this.dataGridViewX1.Name = "dataGridViewX1"; this.dataGridViewX1.ReadOnly = true; this.dataGridViewX1.RowTemplate.Height = 23; - this.dataGridViewX1.Size = new System.Drawing.Size(1125, 65); + this.dataGridViewX1.Size = new System.Drawing.Size(1125, 61); this.dataGridViewX1.TabIndex = 13; this.dataGridViewX1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX1_MouseDoubleClick); // @@ -3847,10 +3869,20 @@ this.statusStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripNumbers, this.toolStripStatusLabel5, + this.firstpage, + this.toolStripStatusLabel3, + this.prepage, + this.toolStripStatusLabel7, + this.nextpage, + this.toolStripStatusLabel9, + this.lastpage, + this.toolStripStatusLabel1, + this.pageinfo, + this.toolStripStatusLabel11, this.toolStripDropDownButton3}); - this.statusStrip2.Location = new System.Drawing.Point(0, 70); + this.statusStrip2.Location = new System.Drawing.Point(0, 66); this.statusStrip2.Name = "statusStrip2"; - this.statusStrip2.Size = new System.Drawing.Size(1125, 22); + this.statusStrip2.Size = new System.Drawing.Size(1125, 26); this.statusStrip2.SizingGrip = false; this.statusStrip2.TabIndex = 12; this.statusStrip2.Text = "statusStrip2"; @@ -3858,15 +3890,95 @@ // toolStripNumbers // this.toolStripNumbers.Name = "toolStripNumbers"; - this.toolStripNumbers.Size = new System.Drawing.Size(56, 17); + this.toolStripNumbers.Size = new System.Drawing.Size(56, 21); this.toolStripNumbers.Text = "管线类型"; // // toolStripStatusLabel5 // this.toolStripStatusLabel5.Name = "toolStripStatusLabel5"; - this.toolStripStatusLabel5.Size = new System.Drawing.Size(15, 17); + this.toolStripStatusLabel5.Size = new System.Drawing.Size(15, 21); this.toolStripStatusLabel5.Text = " |"; // + // firstpage + // + this.firstpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.firstpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.firstpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.firstpage.Name = "firstpage"; + this.firstpage.Size = new System.Drawing.Size(36, 21); + this.firstpage.Text = "首页"; + // + // toolStripStatusLabel3 + // + this.toolStripStatusLabel3.Name = "toolStripStatusLabel3"; + this.toolStripStatusLabel3.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel3.Text = "|"; + // + // prepage + // + this.prepage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.prepage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.prepage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.prepage.Name = "prepage"; + this.prepage.Size = new System.Drawing.Size(48, 21); + this.prepage.Text = "上一页"; + // + // toolStripStatusLabel7 + // + this.toolStripStatusLabel7.Name = "toolStripStatusLabel7"; + this.toolStripStatusLabel7.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel7.Text = "|"; + // + // nextpage + // + this.nextpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.nextpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.nextpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.nextpage.Name = "nextpage"; + this.nextpage.Size = new System.Drawing.Size(48, 21); + this.nextpage.Text = "下一页"; + // + // toolStripStatusLabel9 + // + this.toolStripStatusLabel9.Name = "toolStripStatusLabel9"; + this.toolStripStatusLabel9.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel9.Text = "|"; + // + // lastpage + // + this.lastpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.lastpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.lastpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.lastpage.Name = "lastpage"; + this.lastpage.Size = new System.Drawing.Size(36, 21); + this.lastpage.Text = "末页"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel1.Text = "|"; + // + // pageinfo + // + this.pageinfo.Name = "pageinfo"; + this.pageinfo.Size = new System.Drawing.Size(37, 21); + this.pageinfo.Text = "共*页"; + // + // toolStripStatusLabel11 + // + this.toolStripStatusLabel11.Name = "toolStripStatusLabel11"; + this.toolStripStatusLabel11.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel11.Text = "|"; + // // toolStripDropDownButton3 // this.toolStripDropDownButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); @@ -3880,7 +3992,6 @@ this.toolStripDropDownButton3.Name = "toolStripDropDownButton3"; this.toolStripDropDownButton3.Size = new System.Drawing.Size(75, 21); this.toolStripDropDownButton3.Text = "导出xls文件"; - this.toolStripDropDownButton3.Visible = false; this.toolStripDropDownButton3.Click += new System.EventHandler(this.toolStripDropDownButton3_Click); // // expandableSplitter2 @@ -4457,7 +4568,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(34051, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(34645, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4551,7 +4662,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(34050, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(34644, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5737,18 +5848,6 @@ this.pictureBox1.TabStop = false; this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - this.layerTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseClick); - this.layerTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -5791,10 +5890,10 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); @@ -6311,6 +6410,16 @@ private ButtonItem buttonItem12; private ButtonItem buttonItem13; private ButtonItem buttonItem14; + private ToolStripStatusLabel firstpage; + private ToolStripStatusLabel toolStripStatusLabel3; + private ToolStripStatusLabel prepage; + private ToolStripStatusLabel toolStripStatusLabel7; + private ToolStripStatusLabel nextpage; + private ToolStripStatusLabel toolStripStatusLabel9; + private ToolStripStatusLabel lastpage; + private ToolStripStatusLabel toolStripStatusLabel11; + private ToolStripStatusLabel toolStripStatusLabel1; + private ToolStripStatusLabel pageinfo; } } diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmMaterialSel.cs b/FrmMaterialSel.cs index d23f385..c5af730 100644 --- a/FrmMaterialSel.cs +++ b/FrmMaterialSel.cs @@ -14,13 +14,14 @@ static FrmMaterialSel frm; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1); + frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +33,13 @@ } } - public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -142,13 +144,22 @@ filedValueList.Add(listBox2.Items[i].ToString()); } - ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, - comboBoxEx1.Text.Trim(), "材质", filedValueList); +// ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, +// comboBoxEx1.Text.Trim(), "材质", filedValueList); - if (table != null && table.Rows.Count > 0) +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "材质", filedValueList); + if (total > 0) { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "材质", filedValueList); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -178,7 +189,7 @@ /// private void FrmMaterialSel_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmQuerySQL.cs b/FrmQuerySQL.cs index 3c05684..591e731 100644 --- a/FrmQuerySQL.cs +++ b/FrmQuerySQL.cs @@ -16,14 +16,14 @@ public string currentLayerName; static FrmQuerySQL frm; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmQuerySQL(_ctl, InitDataGridViewX1); + frm = new FrmQuerySQL(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -35,11 +35,12 @@ } } - public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); m_globeControl = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } #region 符号按钮双击事件 @@ -227,12 +228,21 @@ { currentLayerName = cbox_Layers.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); +// ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); - if (table != null && table.Rows.Count != 0) +// if (table != null && table.Rows.Count != 0) +// { +// strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; +// m_InitDataGridViewX1(table, strLable, currentLayerName, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(currentLayerName, textBox_WhereClause.Text); + if (total > 0) { - strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; - m_InitDataGridViewX1(table, strLable, currentLayerName, true); + string strLable = currentLayerName + " || 共有:" + total + "记录"; + string sql = PaginationUtil.GetQuerySql(m_globeControl, currentLayerName, textBox_WhereClause.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, currentLayerName); + pagination.FillDataGridView(); } else { @@ -290,7 +300,7 @@ /// private void Frm_QuerySQL_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index f4770a9..369a7ee 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -17,23 +17,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - //public FrmValveStatistics(Dictionary wellLen, List _list, - // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate initDataGridViewX1) - //{ - // InitializeComponent(); - // workWellLengthAndType = wellLen; - // list = _list; - // globeControl1 = ctl; - // m_InitDataGridViewX1 = initDataGridViewX1; - //} - - public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -94,7 +86,7 @@ { //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chaFamenStatis.Series["阀门"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -107,18 +99,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - for (int i = 0; i < fs.Length; i++) - { - if (fs[i].GetValue("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetValue("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// } +// +// DataTable table = OledbHelper.QueryTable(sql); +// string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(table, strLable, layername, true); + + + List list = new List(); + for (int i = 0; i < fs.Length; i++) + { + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable table = OledbHelper.QueryTable(sql); - string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; - m_InitDataGridViewX1(table, strLable, layername, true); - + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号",list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } } /// diff --git a/Frmpipediameterstatis.cs b/Frmpipediameterstatis.cs index 631a996..48ac35f 100644 --- a/Frmpipediameterstatis.cs +++ b/Frmpipediameterstatis.cs @@ -17,7 +17,9 @@ List pipeLayerNames ; static Frmpipediameterstatis frm; - public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers,int visibleId) +// private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { if (frm == null) { @@ -30,11 +32,12 @@ } } - public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) + public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { InitializeComponent(); globeControl1 = _globeControl1; pipeLayerNames = pipeLayers; +// _pageControl = pageControl; if (visibleId == 0) { buttonX9.Visible = false; @@ -459,12 +462,9 @@ bool b1 = false, b2 = false; b1 = float.TryParse(text.Text, out oldf); b2 = float.TryParse(text.Text + e.KeyChar, out f); - if (b2 == false) + if (!b2) { - if (b1) - e.Handled = true; - else - e.Handled = false; + e.Handled = b1; } } } diff --git a/MainFrm.cs b/MainFrm.cs index 57d21ac..24f70a6 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -101,6 +101,18 @@ float mouseDownX1, mouseDownY1; float mouseDownX2, mouseDownY2; + //控制分页的数据结构,首页、末页、上一页、下一页 + public struct PageControlStuct + { + public ToolStripStatusLabel firstpage; + public ToolStripStatusLabel prepage; + public ToolStripStatusLabel nextpage; + public ToolStripStatusLabel lastpage; + public ToolStripStatusLabel pageinfo; + public ToolStripStatusLabel toolStripNumbers; + public ToolStripStatusLabel toolStripFeatureLength; + } + /// /// /// @@ -1827,31 +1839,36 @@ { if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon || e.Polygon == null) return; GSOGeoPolygon3D polygon = e.Polygon; - + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; switch (trackflag) { case "valvequery": - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1); + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1,pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineDistanceStatistics": - FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm1.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineSpatialQuery": - FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); globeControl1.Globe.ClearAnalysis(); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "workwellquery": - FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1); + FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1, pageControl); frmWell.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; @@ -5394,6 +5411,8 @@ FrmKeywordQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); } + + /// /// 编号查询 /// @@ -5402,8 +5421,15 @@ private void 编号查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "编号查询"); - - FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; +// pageControl.toolStripFeatureLength = toolStripFeatureLength; + pageControl.toolStripNumbers = toolStripNumbers; + FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 坐标查询 @@ -5424,8 +5450,13 @@ private void 附属物查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "附属物查询"); - - FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1, pageControl); } /// /// 管径查询 @@ -5435,8 +5466,13 @@ private void 管径查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径查询"); - - FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 材质查询 @@ -5446,8 +5482,13 @@ private void 材质查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "材质查询"); - - FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1,pageControl); } /// /// 基本查询 @@ -5457,8 +5498,13 @@ private void 基本查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "基本查询"); - - FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 复合查询 @@ -5468,8 +5514,13 @@ private void 复合查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "复合查询"); - - FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 关联查询 @@ -5493,8 +5544,7 @@ GSOLayer layer = null; globeControl1.Globe.GetSelectObject(j, out feature, out layer); - if (feature == null && feature.Geometry == null || (feature.Geometry.Type == EnumGeometryType.GeoPolygon3D - || feature.Geometry.Type == EnumGeometryType.GeoWater)) + if (feature == null || feature.Geometry == null || feature.Geometry.Type == EnumGeometryType.GeoPolygon3D || feature.Geometry.Type == EnumGeometryType.GeoWater) return; ClassSearchAnalysis.ResultRelationAnalysis(globeControl1, feature, Utility.valueLayerNames, Utility.workwellLayerNames, Utility.instrumenLayerNames, Utility.pipefittingLayerNames, Utility.m_PipelineLayerNames, valueAllowance); @@ -5556,7 +5606,13 @@ private void 管线长度统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管线长度统计"); - FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm.Show(this); } /// @@ -5572,6 +5628,7 @@ globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; } + /// /// 阀门数量全区域统计 /// @@ -5580,11 +5637,18 @@ private void 阀门数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1, pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; } + /// /// 阀门数量绘制区域统计 /// @@ -5593,7 +5657,6 @@ private void 阀门数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - trackflag = "valvequery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5605,7 +5668,13 @@ /// private void 井盖数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { - FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1,pageControl); frm.Show(this); } /// @@ -5616,7 +5685,6 @@ private void 井盖数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "井盖数量统计"); - trackflag = "workwellquery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5629,7 +5697,6 @@ private void 管径分段统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 0); } /// @@ -5640,7 +5707,6 @@ private void 管径分段统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - trackflag = null; Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 1); } diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index 1c8ad99..abcf2ec 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -90,6 +90,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -244,26 +245,6 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_role_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem(); - this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); - this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -319,6 +300,26 @@ this.buttonItemXT4 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItemXT4_1 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItemXT4_2 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_role_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem(); + this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); + this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); this.gxdw_ribbonbar = new DevComponents.DotNetBar.RibbonBar(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); @@ -386,6 +387,16 @@ this.statusStrip2 = new System.Windows.Forms.StatusStrip(); this.toolStripNumbers = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabel5 = new System.Windows.Forms.ToolStripStatusLabel(); + this.firstpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.prepage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel7 = new System.Windows.Forms.ToolStripStatusLabel(); + this.nextpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel9 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lastpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.pageinfo = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel11 = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripDropDownButton3 = new System.Windows.Forms.ToolStripStatusLabel(); this.expandableSplitter2 = new DevComponents.DotNetBar.ExpandableSplitter(); this.miniToolStrip = new System.Windows.Forms.StatusStrip(); @@ -518,7 +529,6 @@ this.labelX17 = new DevComponents.DotNetBar.LabelX(); this.panelEx4 = new DevComponents.DotNetBar.PanelEx(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -529,10 +539,10 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel15.SuspendLayout(); this.ribbonPanel7.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); @@ -957,6 +967,18 @@ this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); this.layerSensorTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + this.layerTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseClick); + this.layerTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1131,7 +1153,7 @@ this.区域分析ToolStripMenuItem, this.清除分析ToolStripMenuItem}); this.toolRightMenu.Name = "toolRightMenu"; - this.toolRightMenu.Size = new System.Drawing.Size(149, 290); + this.toolRightMenu.Size = new System.Drawing.Size(153, 312); // // 量算ToolStripMenuItem // @@ -1144,7 +1166,7 @@ this.水平面积ToolStripMenuItem1, this.地表面积ToolStripMenuItem1}); this.量算ToolStripMenuItem.Name = "量算ToolStripMenuItem"; - this.量算ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.量算ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.量算ToolStripMenuItem.Text = "量算"; // // 水平距离ToolStripMenuItem1 @@ -1207,7 +1229,7 @@ this.前进ToolStripMenuItem, this.后退ToolStripMenuItem}); this.编辑ToolStripMenuItem.Name = "编辑ToolStripMenuItem"; - this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.编辑ToolStripMenuItem.Text = "编辑"; // // 平移对象ToolStripMenuItem @@ -1283,7 +1305,7 @@ this.绕中心点飞行ToolStripMenuItem, this.绕眼睛飞行ToolStripMenuItem}); this.飞行ToolStripMenuItem.Name = "飞行ToolStripMenuItem"; - this.飞行ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.飞行ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.飞行ToolStripMenuItem.Text = "飞行"; // // 自定义飞行ToolStripMenuItem @@ -1328,7 +1350,7 @@ this.属性标注ToolStripMenuItem, this.标注管理ToolStripMenuItem}); this.标注ToolStripMenuItem.Name = "标注ToolStripMenuItem"; - this.标注ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.标注ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.标注ToolStripMenuItem.Text = "标注"; // // 标高标注ToolStripMenuItem @@ -1415,76 +1437,76 @@ this.关联查询ToolStripMenuItem, this.关键字查询ToolStripMenuItem}); this.查询ToolStripMenuItem.Name = "查询ToolStripMenuItem"; - this.查询ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.查询ToolStripMenuItem.Text = "查询"; // // 空间查询ToolStripMenuItem // this.空间查询ToolStripMenuItem.Name = "空间查询ToolStripMenuItem"; - this.空间查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.空间查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.空间查询ToolStripMenuItem.Text = "空间查询"; this.空间查询ToolStripMenuItem.Click += new System.EventHandler(this.空间查询ToolStripMenuItem_Click); // // 编号查询ToolStripMenuItem // this.编号查询ToolStripMenuItem.Name = "编号查询ToolStripMenuItem"; - this.编号查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.编号查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.编号查询ToolStripMenuItem.Text = "编号查询"; this.编号查询ToolStripMenuItem.Click += new System.EventHandler(this.编号查询ToolStripMenuItem_Click); // // 坐标查询ToolStripMenuItem // this.坐标查询ToolStripMenuItem.Name = "坐标查询ToolStripMenuItem"; - this.坐标查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.坐标查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.坐标查询ToolStripMenuItem.Text = "坐标查询"; this.坐标查询ToolStripMenuItem.Click += new System.EventHandler(this.坐标查询ToolStripMenuItem_Click); // // 附属物查询ToolStripMenuItem // this.附属物查询ToolStripMenuItem.Name = "附属物查询ToolStripMenuItem"; - this.附属物查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.附属物查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.附属物查询ToolStripMenuItem.Text = "配件查询"; this.附属物查询ToolStripMenuItem.Click += new System.EventHandler(this.附属物查询ToolStripMenuItem_Click); // // 管径查询ToolStripMenuItem // this.管径查询ToolStripMenuItem.Name = "管径查询ToolStripMenuItem"; - this.管径查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.管径查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.管径查询ToolStripMenuItem.Text = "管径查询"; this.管径查询ToolStripMenuItem.Click += new System.EventHandler(this.管径查询ToolStripMenuItem_Click); // // 材质查询ToolStripMenuItem // this.材质查询ToolStripMenuItem.Name = "材质查询ToolStripMenuItem"; - this.材质查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.材质查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.材质查询ToolStripMenuItem.Text = "材质查询"; this.材质查询ToolStripMenuItem.Click += new System.EventHandler(this.材质查询ToolStripMenuItem_Click); // // 基本查询ToolStripMenuItem // this.基本查询ToolStripMenuItem.Name = "基本查询ToolStripMenuItem"; - this.基本查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.基本查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.基本查询ToolStripMenuItem.Text = "基本查询"; this.基本查询ToolStripMenuItem.Click += new System.EventHandler(this.基本查询ToolStripMenuItem_Click); // // 复合查询ToolStripMenuItem // this.复合查询ToolStripMenuItem.Name = "复合查询ToolStripMenuItem"; - this.复合查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.复合查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.复合查询ToolStripMenuItem.Text = "复合查询"; this.复合查询ToolStripMenuItem.Click += new System.EventHandler(this.复合查询ToolStripMenuItem_Click); // // 关联查询ToolStripMenuItem // this.关联查询ToolStripMenuItem.Name = "关联查询ToolStripMenuItem"; - this.关联查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.关联查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.关联查询ToolStripMenuItem.Text = "关联查询"; this.关联查询ToolStripMenuItem.Click += new System.EventHandler(this.关联查询ToolStripMenuItem_Click); // // 关键字查询ToolStripMenuItem // this.关键字查询ToolStripMenuItem.Name = "关键字查询ToolStripMenuItem"; - this.关键字查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.关键字查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.关键字查询ToolStripMenuItem.Text = "关键字查询"; this.关键字查询ToolStripMenuItem.Click += new System.EventHandler(this.关键字查询ToolStripMenuItem_Click); // @@ -1501,7 +1523,7 @@ this.附属物分类统计ToolStripMenuItem, this.标识器分类统计ToolStripMenuItem}); this.全区域统计ToolStripMenuItem.Name = "全区域统计ToolStripMenuItem"; - this.全区域统计ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.全区域统计ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.全区域统计ToolStripMenuItem.Text = "全区域统计"; // // 管线长度统计ToolStripMenuItem @@ -1580,7 +1602,7 @@ this.附属物分类统计ToolStripMenuItem1, this.标识器分类统计ToolStripMenuItem1}); this.绘制区域统计ToolStripMenuItem.Name = "绘制区域统计ToolStripMenuItem"; - this.绘制区域统计ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.绘制区域统计ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.绘制区域统计ToolStripMenuItem.Text = "绘制区域统计"; // // 管线长度统计ToolStripMenuItem1 @@ -1654,7 +1676,7 @@ this.道路断面分析ToolStripMenuItem, this.基线剖面分析ToolStripMenuItem}); this.断面分析ToolStripMenuItem.Name = "断面分析ToolStripMenuItem"; - this.断面分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.断面分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.断面分析ToolStripMenuItem.Text = "断面分析"; // // 横断面分析ToolStripMenuItem @@ -1696,7 +1718,7 @@ this.连通分析ToolStripMenuItem, this.爆管分析ToolStripMenuItem}); this.拓扑分析ToolStripMenuItem.Name = "拓扑分析ToolStripMenuItem"; - this.拓扑分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.拓扑分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.拓扑分析ToolStripMenuItem.Text = "拓扑分析"; // // 创建拓扑ToolStripMenuItem @@ -1758,7 +1780,7 @@ this.隐藏隧道ToolStripMenuItem, this.删除隧道ToolStripMenuItem}); this.开挖分析ToolStripMenuItem.Name = "开挖分析ToolStripMenuItem"; - this.开挖分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.开挖分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.开挖分析ToolStripMenuItem.Text = "开挖分析"; // // 多边形开挖ToolStripMenuItem @@ -1810,7 +1832,7 @@ this.可视域分析ToolStripMenuItem, this.可视包络分析ToolStripMenuItem}); this.视域分析ToolStripMenuItem.Name = "视域分析ToolStripMenuItem"; - this.视域分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.视域分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.视域分析ToolStripMenuItem.Text = "视域分析"; // // 通视分析ToolStripMenuItem @@ -1841,7 +1863,7 @@ this.缓冲区分析ToolStripMenuItem, this.无源淹没分析ToolStripMenuItem}); this.区域分析ToolStripMenuItem.Name = "区域分析ToolStripMenuItem"; - this.区域分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.区域分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.区域分析ToolStripMenuItem.Text = "区域分析"; // // 附属物分析ToolStripMenuItem @@ -1868,7 +1890,7 @@ // 清除分析ToolStripMenuItem // this.清除分析ToolStripMenuItem.Name = "清除分析ToolStripMenuItem"; - this.清除分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.清除分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.清除分析ToolStripMenuItem.Text = "清除分析"; this.清除分析ToolStripMenuItem.Click += new System.EventHandler(this.buttonItemClear_Click); // @@ -2201,328 +2223,6 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - this.ribbonPanel6.Visible = false; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // - // ribbonPanel2 - // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar3); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; - // - // ribbonBar3 - // - this.ribbonBar3.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar3.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar3.BackgroundStyle.Class = ""; - this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar3.ContainerControlProcessDialogKey = true; - this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_user_info, - this.btn_role_info, - this.btn_resc_info, - this.btn_role_resc, - this.btn_user_role, - this.btn_password_edit, - this.buttonItemPasswordReset}); - this.ribbonBar3.Location = new System.Drawing.Point(3, 0); - this.ribbonBar3.Name = "ribbonBar3"; - this.ribbonBar3.Size = new System.Drawing.Size(551, 59); - this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar3.TabIndex = 1; - // - // - // - this.ribbonBar3.TitleStyle.Class = ""; - this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar3.TitleStyleMouseOver.Class = ""; - this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar3.TitleVisible = false; - // - // btn_user_info - // - this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image"))); - this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_user_info.Name = "btn_user_info"; - this.btn_user_info.SubItemsExpandWidth = 14; - this.btn_user_info.Text = "用户管理"; - this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click); - // - // btn_role_info - // - this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image"))); - this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_role_info.Name = "btn_role_info"; - this.btn_role_info.SubItemsExpandWidth = 14; - this.btn_role_info.Text = "角色管理"; - this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click); - // - // btn_resc_info - // - this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image"))); - this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_resc_info.Name = "btn_resc_info"; - this.btn_resc_info.SubItemsExpandWidth = 14; - this.btn_resc_info.Text = "资源管理"; - this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click); - // - // btn_role_resc - // - this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image"))); - this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_role_resc.Name = "btn_role_resc"; - this.btn_role_resc.SubItemsExpandWidth = 14; - this.btn_role_resc.Text = "角色授权"; - this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click); - // - // btn_user_role - // - this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image"))); - this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_user_role.Name = "btn_user_role"; - this.btn_user_role.SubItemsExpandWidth = 14; - this.btn_user_role.Text = "用户授权"; - this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click); - // - // btn_password_edit - // - this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image"))); - this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_password_edit.Name = "btn_password_edit"; - this.btn_password_edit.SubItemsExpandWidth = 14; - this.btn_password_edit.Text = "密码修改"; - this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click); - // - // buttonItemPasswordReset - // - this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image"))); - this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemPasswordReset.Name = "buttonItemPasswordReset"; - this.buttonItemPasswordReset.SubItemsExpandWidth = 14; - this.buttonItemPasswordReset.Text = "重置密码"; - this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click); - // - // ribbonPanel3 - // - this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel3.Controls.Add(this.ribbonBar4); - this.ribbonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel3.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel3.Name = "ribbonPanel3"; - this.ribbonPanel3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel3.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel3.Style.Class = ""; - this.ribbonPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel3.StyleMouseDown.Class = ""; - this.ribbonPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel3.StyleMouseOver.Class = ""; - this.ribbonPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel3.TabIndex = 40; - this.ribbonPanel3.Visible = false; - // - // ribbonBar4 - // - this.ribbonBar4.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(634, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - // - // - // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.LabelWidth = 50; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.TextColor = System.Drawing.Color.Black; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3002,6 +2702,328 @@ this.buttonItemXT4_2.Text = "人员修改"; this.buttonItemXT4_2.Click += new System.EventHandler(this.buttonItemXT4_2_Click); // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + this.ribbonPanel6.Visible = false; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // + // ribbonPanel2 + // + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar3); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; + // + // ribbonBar3 + // + this.ribbonBar3.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar3.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar3.BackgroundStyle.Class = ""; + this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar3.ContainerControlProcessDialogKey = true; + this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_user_info, + this.btn_role_info, + this.btn_resc_info, + this.btn_role_resc, + this.btn_user_role, + this.btn_password_edit, + this.buttonItemPasswordReset}); + this.ribbonBar3.Location = new System.Drawing.Point(3, 0); + this.ribbonBar3.Name = "ribbonBar3"; + this.ribbonBar3.Size = new System.Drawing.Size(551, 59); + this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar3.TabIndex = 1; + // + // + // + this.ribbonBar3.TitleStyle.Class = ""; + this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar3.TitleStyleMouseOver.Class = ""; + this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar3.TitleVisible = false; + // + // btn_user_info + // + this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image"))); + this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_user_info.Name = "btn_user_info"; + this.btn_user_info.SubItemsExpandWidth = 14; + this.btn_user_info.Text = "用户管理"; + this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click); + // + // btn_role_info + // + this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image"))); + this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_role_info.Name = "btn_role_info"; + this.btn_role_info.SubItemsExpandWidth = 14; + this.btn_role_info.Text = "角色管理"; + this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click); + // + // btn_resc_info + // + this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image"))); + this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_resc_info.Name = "btn_resc_info"; + this.btn_resc_info.SubItemsExpandWidth = 14; + this.btn_resc_info.Text = "资源管理"; + this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click); + // + // btn_role_resc + // + this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image"))); + this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_role_resc.Name = "btn_role_resc"; + this.btn_role_resc.SubItemsExpandWidth = 14; + this.btn_role_resc.Text = "角色授权"; + this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click); + // + // btn_user_role + // + this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image"))); + this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_user_role.Name = "btn_user_role"; + this.btn_user_role.SubItemsExpandWidth = 14; + this.btn_user_role.Text = "用户授权"; + this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click); + // + // btn_password_edit + // + this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image"))); + this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_password_edit.Name = "btn_password_edit"; + this.btn_password_edit.SubItemsExpandWidth = 14; + this.btn_password_edit.Text = "密码修改"; + this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click); + // + // buttonItemPasswordReset + // + this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image"))); + this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemPasswordReset.Name = "buttonItemPasswordReset"; + this.buttonItemPasswordReset.SubItemsExpandWidth = 14; + this.buttonItemPasswordReset.Text = "重置密码"; + this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click); + // + // ribbonPanel3 + // + this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel3.Controls.Add(this.ribbonBar4); + this.ribbonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel3.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel3.Name = "ribbonPanel3"; + this.ribbonPanel3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel3.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel3.Style.Class = ""; + this.ribbonPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel3.StyleMouseDown.Class = ""; + this.ribbonPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel3.StyleMouseOver.Class = ""; + this.ribbonPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel3.TabIndex = 40; + this.ribbonPanel3.Visible = false; + // + // ribbonBar4 + // + this.ribbonBar4.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(634, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + // + // + // + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.LabelWidth = 50; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.TextColor = System.Drawing.Color.Black; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel7 // this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3837,7 +3859,7 @@ this.dataGridViewX1.Name = "dataGridViewX1"; this.dataGridViewX1.ReadOnly = true; this.dataGridViewX1.RowTemplate.Height = 23; - this.dataGridViewX1.Size = new System.Drawing.Size(1125, 65); + this.dataGridViewX1.Size = new System.Drawing.Size(1125, 61); this.dataGridViewX1.TabIndex = 13; this.dataGridViewX1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX1_MouseDoubleClick); // @@ -3847,10 +3869,20 @@ this.statusStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripNumbers, this.toolStripStatusLabel5, + this.firstpage, + this.toolStripStatusLabel3, + this.prepage, + this.toolStripStatusLabel7, + this.nextpage, + this.toolStripStatusLabel9, + this.lastpage, + this.toolStripStatusLabel1, + this.pageinfo, + this.toolStripStatusLabel11, this.toolStripDropDownButton3}); - this.statusStrip2.Location = new System.Drawing.Point(0, 70); + this.statusStrip2.Location = new System.Drawing.Point(0, 66); this.statusStrip2.Name = "statusStrip2"; - this.statusStrip2.Size = new System.Drawing.Size(1125, 22); + this.statusStrip2.Size = new System.Drawing.Size(1125, 26); this.statusStrip2.SizingGrip = false; this.statusStrip2.TabIndex = 12; this.statusStrip2.Text = "statusStrip2"; @@ -3858,15 +3890,95 @@ // toolStripNumbers // this.toolStripNumbers.Name = "toolStripNumbers"; - this.toolStripNumbers.Size = new System.Drawing.Size(56, 17); + this.toolStripNumbers.Size = new System.Drawing.Size(56, 21); this.toolStripNumbers.Text = "管线类型"; // // toolStripStatusLabel5 // this.toolStripStatusLabel5.Name = "toolStripStatusLabel5"; - this.toolStripStatusLabel5.Size = new System.Drawing.Size(15, 17); + this.toolStripStatusLabel5.Size = new System.Drawing.Size(15, 21); this.toolStripStatusLabel5.Text = " |"; // + // firstpage + // + this.firstpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.firstpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.firstpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.firstpage.Name = "firstpage"; + this.firstpage.Size = new System.Drawing.Size(36, 21); + this.firstpage.Text = "首页"; + // + // toolStripStatusLabel3 + // + this.toolStripStatusLabel3.Name = "toolStripStatusLabel3"; + this.toolStripStatusLabel3.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel3.Text = "|"; + // + // prepage + // + this.prepage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.prepage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.prepage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.prepage.Name = "prepage"; + this.prepage.Size = new System.Drawing.Size(48, 21); + this.prepage.Text = "上一页"; + // + // toolStripStatusLabel7 + // + this.toolStripStatusLabel7.Name = "toolStripStatusLabel7"; + this.toolStripStatusLabel7.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel7.Text = "|"; + // + // nextpage + // + this.nextpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.nextpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.nextpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.nextpage.Name = "nextpage"; + this.nextpage.Size = new System.Drawing.Size(48, 21); + this.nextpage.Text = "下一页"; + // + // toolStripStatusLabel9 + // + this.toolStripStatusLabel9.Name = "toolStripStatusLabel9"; + this.toolStripStatusLabel9.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel9.Text = "|"; + // + // lastpage + // + this.lastpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.lastpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.lastpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.lastpage.Name = "lastpage"; + this.lastpage.Size = new System.Drawing.Size(36, 21); + this.lastpage.Text = "末页"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel1.Text = "|"; + // + // pageinfo + // + this.pageinfo.Name = "pageinfo"; + this.pageinfo.Size = new System.Drawing.Size(37, 21); + this.pageinfo.Text = "共*页"; + // + // toolStripStatusLabel11 + // + this.toolStripStatusLabel11.Name = "toolStripStatusLabel11"; + this.toolStripStatusLabel11.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel11.Text = "|"; + // // toolStripDropDownButton3 // this.toolStripDropDownButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); @@ -3880,7 +3992,6 @@ this.toolStripDropDownButton3.Name = "toolStripDropDownButton3"; this.toolStripDropDownButton3.Size = new System.Drawing.Size(75, 21); this.toolStripDropDownButton3.Text = "导出xls文件"; - this.toolStripDropDownButton3.Visible = false; this.toolStripDropDownButton3.Click += new System.EventHandler(this.toolStripDropDownButton3_Click); // // expandableSplitter2 @@ -4457,7 +4568,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(34051, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(34645, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4551,7 +4662,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(34050, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(34644, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5737,18 +5848,6 @@ this.pictureBox1.TabStop = false; this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - this.layerTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseClick); - this.layerTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -5791,10 +5890,10 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); @@ -6311,6 +6410,16 @@ private ButtonItem buttonItem12; private ButtonItem buttonItem13; private ButtonItem buttonItem14; + private ToolStripStatusLabel firstpage; + private ToolStripStatusLabel toolStripStatusLabel3; + private ToolStripStatusLabel prepage; + private ToolStripStatusLabel toolStripStatusLabel7; + private ToolStripStatusLabel nextpage; + private ToolStripStatusLabel toolStripStatusLabel9; + private ToolStripStatusLabel lastpage; + private ToolStripStatusLabel toolStripStatusLabel11; + private ToolStripStatusLabel toolStripStatusLabel1; + private ToolStripStatusLabel pageinfo; } } diff --git a/PaginationFeaturesUtil.cs b/PaginationFeaturesUtil.cs new file mode 100644 index 0000000..5ba7831 --- /dev/null +++ b/PaginationFeaturesUtil.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using GeoScene.Data; + +namespace Cyberpipe +{ + class PaginationFeaturesUtil + { + private static int _total = 0; + private static int _beginIndex = 1; + private static int _pagesize = 10; + private static MainFrm.PageControlStuct _pageControl; + private static MainFrm.DataGridViewDelegate _mInitDataGridViewX1; + private static PaginationFeaturesUtil _singlePagination = null; + private static string _queryInfo = ""; + private static string _layerName = ""; + private static GSOFeatures _features; + private static string[] _fields; + public static PaginationFeaturesUtil InitPagination(int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1, string queryInfo, string layerName, GSOFeatures features,string [] fields) + { + if (_singlePagination == null) + { + _singlePagination = new PaginationFeaturesUtil( total, pageControl, mInitDataGridViewX1, queryInfo, layerName, features, fields); + _pageControl.firstpage.Click += _singlePagination.FirstPageButtonClick; + _pageControl.nextpage.Click += _singlePagination.NextPageButtonClick; + _pageControl.prepage.Click += _singlePagination.PrePageButtonClick; + _pageControl.lastpage.Click += _singlePagination.LastPageButtonClick; + return _singlePagination; + } + _queryInfo = queryInfo; + _layerName = layerName; + _features = features; + _fields = fields; + _total = total; + return _singlePagination; + } + + private PaginationFeaturesUtil(int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1, string queryInfo, string layerName, GSOFeatures features, string[] fields) + { + _pageControl = pageControl; + _mInitDataGridViewX1 = mInitDataGridViewX1; + _queryInfo = queryInfo; + _layerName = layerName; + _total = total; + _features = features; + _fields = fields; + } + + /// + /// 执行sql语句,将执行的分页结果加载到指定datatable上 + /// + public void FillDataGridView() + { + DataTable table = ConvertGsoFeatures2DataTable(_features, _fields, _beginIndex, _pagesize); + ComputePageInfo(_beginIndex, _pagesize, _total); + _mInitDataGridViewX1(table, _queryInfo, _layerName, true); + //控制首页、上一页、下一页、末页按钮的显示 + _pageControl.nextpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.lastpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.firstpage.Visible = _beginIndex > 1; + _pageControl.prepage.Visible = _beginIndex > 1; + } + private void ComputePageInfo(int begin, int pagesize, int total) + { + int pageCount = (total - 1) / pagesize + 1; + int curPage = begin / pagesize + 1; + _pageControl.pageinfo.Text = "每页" + pagesize + "条," + curPage + "/" + pageCount + "页"; + } + /// + /// 分页查询 + /// + /// + /// + /// + /// + /// + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field, int begin, int pagesize) + { + if (features == null || features.Length == 0 || field.Length == 0) return null; + DataTable result = new DataTable(); + foreach (string t in field) + { + result.Columns.Add(t, typeof(String)); + } + int i = 0; + while (i < begin) i++; + for (; i < features.Length && i < begin + pagesize; i++) + { + GSOFeature feature = features[i]; + string[] values = new string[field.Length]; + for (int j = 0; j < field.Length; j++) + { + string value = feature.GetFieldAsString(field[j]); + values[j] = value; + } + result.Rows.Add(values); + } + return result; + } + + /// + /// 重置查询条件 + /// + public static void ResetPagination() + { + _total = 0; + _beginIndex = 1; + + } + + private void FirstPageButtonClick(object sender, EventArgs e) + { + _beginIndex = 1; + FillDataGridView(); + } + private void NextPageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex + _pagesize; + FillDataGridView(); + } + private void PrePageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex - _pagesize; + FillDataGridView(); + } + private void LastPageButtonClick(object sender, EventArgs e) + { + while (_beginIndex < _total - _pagesize + 1) _beginIndex += _pagesize; + FillDataGridView(); + } + + } +} diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmMaterialSel.cs b/FrmMaterialSel.cs index d23f385..c5af730 100644 --- a/FrmMaterialSel.cs +++ b/FrmMaterialSel.cs @@ -14,13 +14,14 @@ static FrmMaterialSel frm; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1); + frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +33,13 @@ } } - public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -142,13 +144,22 @@ filedValueList.Add(listBox2.Items[i].ToString()); } - ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, - comboBoxEx1.Text.Trim(), "材质", filedValueList); +// ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, +// comboBoxEx1.Text.Trim(), "材质", filedValueList); - if (table != null && table.Rows.Count > 0) +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "材质", filedValueList); + if (total > 0) { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "材质", filedValueList); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -178,7 +189,7 @@ /// private void FrmMaterialSel_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmQuerySQL.cs b/FrmQuerySQL.cs index 3c05684..591e731 100644 --- a/FrmQuerySQL.cs +++ b/FrmQuerySQL.cs @@ -16,14 +16,14 @@ public string currentLayerName; static FrmQuerySQL frm; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmQuerySQL(_ctl, InitDataGridViewX1); + frm = new FrmQuerySQL(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -35,11 +35,12 @@ } } - public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); m_globeControl = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } #region 符号按钮双击事件 @@ -227,12 +228,21 @@ { currentLayerName = cbox_Layers.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); +// ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); - if (table != null && table.Rows.Count != 0) +// if (table != null && table.Rows.Count != 0) +// { +// strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; +// m_InitDataGridViewX1(table, strLable, currentLayerName, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(currentLayerName, textBox_WhereClause.Text); + if (total > 0) { - strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; - m_InitDataGridViewX1(table, strLable, currentLayerName, true); + string strLable = currentLayerName + " || 共有:" + total + "记录"; + string sql = PaginationUtil.GetQuerySql(m_globeControl, currentLayerName, textBox_WhereClause.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, currentLayerName); + pagination.FillDataGridView(); } else { @@ -290,7 +300,7 @@ /// private void Frm_QuerySQL_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index f4770a9..369a7ee 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -17,23 +17,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - //public FrmValveStatistics(Dictionary wellLen, List _list, - // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate initDataGridViewX1) - //{ - // InitializeComponent(); - // workWellLengthAndType = wellLen; - // list = _list; - // globeControl1 = ctl; - // m_InitDataGridViewX1 = initDataGridViewX1; - //} - - public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -94,7 +86,7 @@ { //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chaFamenStatis.Series["阀门"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -107,18 +99,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - for (int i = 0; i < fs.Length; i++) - { - if (fs[i].GetValue("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetValue("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// } +// +// DataTable table = OledbHelper.QueryTable(sql); +// string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(table, strLable, layername, true); + + + List list = new List(); + for (int i = 0; i < fs.Length; i++) + { + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable table = OledbHelper.QueryTable(sql); - string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; - m_InitDataGridViewX1(table, strLable, layername, true); - + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号",list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } } /// diff --git a/Frmpipediameterstatis.cs b/Frmpipediameterstatis.cs index 631a996..48ac35f 100644 --- a/Frmpipediameterstatis.cs +++ b/Frmpipediameterstatis.cs @@ -17,7 +17,9 @@ List pipeLayerNames ; static Frmpipediameterstatis frm; - public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers,int visibleId) +// private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { if (frm == null) { @@ -30,11 +32,12 @@ } } - public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) + public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { InitializeComponent(); globeControl1 = _globeControl1; pipeLayerNames = pipeLayers; +// _pageControl = pageControl; if (visibleId == 0) { buttonX9.Visible = false; @@ -459,12 +462,9 @@ bool b1 = false, b2 = false; b1 = float.TryParse(text.Text, out oldf); b2 = float.TryParse(text.Text + e.KeyChar, out f); - if (b2 == false) + if (!b2) { - if (b1) - e.Handled = true; - else - e.Handled = false; + e.Handled = b1; } } } diff --git a/MainFrm.cs b/MainFrm.cs index 57d21ac..24f70a6 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -101,6 +101,18 @@ float mouseDownX1, mouseDownY1; float mouseDownX2, mouseDownY2; + //控制分页的数据结构,首页、末页、上一页、下一页 + public struct PageControlStuct + { + public ToolStripStatusLabel firstpage; + public ToolStripStatusLabel prepage; + public ToolStripStatusLabel nextpage; + public ToolStripStatusLabel lastpage; + public ToolStripStatusLabel pageinfo; + public ToolStripStatusLabel toolStripNumbers; + public ToolStripStatusLabel toolStripFeatureLength; + } + /// /// /// @@ -1827,31 +1839,36 @@ { if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon || e.Polygon == null) return; GSOGeoPolygon3D polygon = e.Polygon; - + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; switch (trackflag) { case "valvequery": - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1); + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1,pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineDistanceStatistics": - FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm1.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineSpatialQuery": - FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); globeControl1.Globe.ClearAnalysis(); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "workwellquery": - FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1); + FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1, pageControl); frmWell.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; @@ -5394,6 +5411,8 @@ FrmKeywordQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); } + + /// /// 编号查询 /// @@ -5402,8 +5421,15 @@ private void 编号查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "编号查询"); - - FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; +// pageControl.toolStripFeatureLength = toolStripFeatureLength; + pageControl.toolStripNumbers = toolStripNumbers; + FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 坐标查询 @@ -5424,8 +5450,13 @@ private void 附属物查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "附属物查询"); - - FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1, pageControl); } /// /// 管径查询 @@ -5435,8 +5466,13 @@ private void 管径查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径查询"); - - FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 材质查询 @@ -5446,8 +5482,13 @@ private void 材质查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "材质查询"); - - FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1,pageControl); } /// /// 基本查询 @@ -5457,8 +5498,13 @@ private void 基本查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "基本查询"); - - FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 复合查询 @@ -5468,8 +5514,13 @@ private void 复合查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "复合查询"); - - FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 关联查询 @@ -5493,8 +5544,7 @@ GSOLayer layer = null; globeControl1.Globe.GetSelectObject(j, out feature, out layer); - if (feature == null && feature.Geometry == null || (feature.Geometry.Type == EnumGeometryType.GeoPolygon3D - || feature.Geometry.Type == EnumGeometryType.GeoWater)) + if (feature == null || feature.Geometry == null || feature.Geometry.Type == EnumGeometryType.GeoPolygon3D || feature.Geometry.Type == EnumGeometryType.GeoWater) return; ClassSearchAnalysis.ResultRelationAnalysis(globeControl1, feature, Utility.valueLayerNames, Utility.workwellLayerNames, Utility.instrumenLayerNames, Utility.pipefittingLayerNames, Utility.m_PipelineLayerNames, valueAllowance); @@ -5556,7 +5606,13 @@ private void 管线长度统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管线长度统计"); - FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm.Show(this); } /// @@ -5572,6 +5628,7 @@ globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; } + /// /// 阀门数量全区域统计 /// @@ -5580,11 +5637,18 @@ private void 阀门数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1, pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; } + /// /// 阀门数量绘制区域统计 /// @@ -5593,7 +5657,6 @@ private void 阀门数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - trackflag = "valvequery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5605,7 +5668,13 @@ /// private void 井盖数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { - FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1,pageControl); frm.Show(this); } /// @@ -5616,7 +5685,6 @@ private void 井盖数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "井盖数量统计"); - trackflag = "workwellquery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5629,7 +5697,6 @@ private void 管径分段统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 0); } /// @@ -5640,7 +5707,6 @@ private void 管径分段统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - trackflag = null; Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 1); } diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index 1c8ad99..abcf2ec 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -90,6 +90,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -244,26 +245,6 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_role_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem(); - this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); - this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -319,6 +300,26 @@ this.buttonItemXT4 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItemXT4_1 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItemXT4_2 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_role_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem(); + this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); + this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); this.gxdw_ribbonbar = new DevComponents.DotNetBar.RibbonBar(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); @@ -386,6 +387,16 @@ this.statusStrip2 = new System.Windows.Forms.StatusStrip(); this.toolStripNumbers = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabel5 = new System.Windows.Forms.ToolStripStatusLabel(); + this.firstpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.prepage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel7 = new System.Windows.Forms.ToolStripStatusLabel(); + this.nextpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel9 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lastpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.pageinfo = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel11 = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripDropDownButton3 = new System.Windows.Forms.ToolStripStatusLabel(); this.expandableSplitter2 = new DevComponents.DotNetBar.ExpandableSplitter(); this.miniToolStrip = new System.Windows.Forms.StatusStrip(); @@ -518,7 +529,6 @@ this.labelX17 = new DevComponents.DotNetBar.LabelX(); this.panelEx4 = new DevComponents.DotNetBar.PanelEx(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -529,10 +539,10 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel15.SuspendLayout(); this.ribbonPanel7.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); @@ -957,6 +967,18 @@ this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); this.layerSensorTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + this.layerTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseClick); + this.layerTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1131,7 +1153,7 @@ this.区域分析ToolStripMenuItem, this.清除分析ToolStripMenuItem}); this.toolRightMenu.Name = "toolRightMenu"; - this.toolRightMenu.Size = new System.Drawing.Size(149, 290); + this.toolRightMenu.Size = new System.Drawing.Size(153, 312); // // 量算ToolStripMenuItem // @@ -1144,7 +1166,7 @@ this.水平面积ToolStripMenuItem1, this.地表面积ToolStripMenuItem1}); this.量算ToolStripMenuItem.Name = "量算ToolStripMenuItem"; - this.量算ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.量算ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.量算ToolStripMenuItem.Text = "量算"; // // 水平距离ToolStripMenuItem1 @@ -1207,7 +1229,7 @@ this.前进ToolStripMenuItem, this.后退ToolStripMenuItem}); this.编辑ToolStripMenuItem.Name = "编辑ToolStripMenuItem"; - this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.编辑ToolStripMenuItem.Text = "编辑"; // // 平移对象ToolStripMenuItem @@ -1283,7 +1305,7 @@ this.绕中心点飞行ToolStripMenuItem, this.绕眼睛飞行ToolStripMenuItem}); this.飞行ToolStripMenuItem.Name = "飞行ToolStripMenuItem"; - this.飞行ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.飞行ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.飞行ToolStripMenuItem.Text = "飞行"; // // 自定义飞行ToolStripMenuItem @@ -1328,7 +1350,7 @@ this.属性标注ToolStripMenuItem, this.标注管理ToolStripMenuItem}); this.标注ToolStripMenuItem.Name = "标注ToolStripMenuItem"; - this.标注ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.标注ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.标注ToolStripMenuItem.Text = "标注"; // // 标高标注ToolStripMenuItem @@ -1415,76 +1437,76 @@ this.关联查询ToolStripMenuItem, this.关键字查询ToolStripMenuItem}); this.查询ToolStripMenuItem.Name = "查询ToolStripMenuItem"; - this.查询ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.查询ToolStripMenuItem.Text = "查询"; // // 空间查询ToolStripMenuItem // this.空间查询ToolStripMenuItem.Name = "空间查询ToolStripMenuItem"; - this.空间查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.空间查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.空间查询ToolStripMenuItem.Text = "空间查询"; this.空间查询ToolStripMenuItem.Click += new System.EventHandler(this.空间查询ToolStripMenuItem_Click); // // 编号查询ToolStripMenuItem // this.编号查询ToolStripMenuItem.Name = "编号查询ToolStripMenuItem"; - this.编号查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.编号查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.编号查询ToolStripMenuItem.Text = "编号查询"; this.编号查询ToolStripMenuItem.Click += new System.EventHandler(this.编号查询ToolStripMenuItem_Click); // // 坐标查询ToolStripMenuItem // this.坐标查询ToolStripMenuItem.Name = "坐标查询ToolStripMenuItem"; - this.坐标查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.坐标查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.坐标查询ToolStripMenuItem.Text = "坐标查询"; this.坐标查询ToolStripMenuItem.Click += new System.EventHandler(this.坐标查询ToolStripMenuItem_Click); // // 附属物查询ToolStripMenuItem // this.附属物查询ToolStripMenuItem.Name = "附属物查询ToolStripMenuItem"; - this.附属物查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.附属物查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.附属物查询ToolStripMenuItem.Text = "配件查询"; this.附属物查询ToolStripMenuItem.Click += new System.EventHandler(this.附属物查询ToolStripMenuItem_Click); // // 管径查询ToolStripMenuItem // this.管径查询ToolStripMenuItem.Name = "管径查询ToolStripMenuItem"; - this.管径查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.管径查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.管径查询ToolStripMenuItem.Text = "管径查询"; this.管径查询ToolStripMenuItem.Click += new System.EventHandler(this.管径查询ToolStripMenuItem_Click); // // 材质查询ToolStripMenuItem // this.材质查询ToolStripMenuItem.Name = "材质查询ToolStripMenuItem"; - this.材质查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.材质查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.材质查询ToolStripMenuItem.Text = "材质查询"; this.材质查询ToolStripMenuItem.Click += new System.EventHandler(this.材质查询ToolStripMenuItem_Click); // // 基本查询ToolStripMenuItem // this.基本查询ToolStripMenuItem.Name = "基本查询ToolStripMenuItem"; - this.基本查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.基本查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.基本查询ToolStripMenuItem.Text = "基本查询"; this.基本查询ToolStripMenuItem.Click += new System.EventHandler(this.基本查询ToolStripMenuItem_Click); // // 复合查询ToolStripMenuItem // this.复合查询ToolStripMenuItem.Name = "复合查询ToolStripMenuItem"; - this.复合查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.复合查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.复合查询ToolStripMenuItem.Text = "复合查询"; this.复合查询ToolStripMenuItem.Click += new System.EventHandler(this.复合查询ToolStripMenuItem_Click); // // 关联查询ToolStripMenuItem // this.关联查询ToolStripMenuItem.Name = "关联查询ToolStripMenuItem"; - this.关联查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.关联查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.关联查询ToolStripMenuItem.Text = "关联查询"; this.关联查询ToolStripMenuItem.Click += new System.EventHandler(this.关联查询ToolStripMenuItem_Click); // // 关键字查询ToolStripMenuItem // this.关键字查询ToolStripMenuItem.Name = "关键字查询ToolStripMenuItem"; - this.关键字查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.关键字查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.关键字查询ToolStripMenuItem.Text = "关键字查询"; this.关键字查询ToolStripMenuItem.Click += new System.EventHandler(this.关键字查询ToolStripMenuItem_Click); // @@ -1501,7 +1523,7 @@ this.附属物分类统计ToolStripMenuItem, this.标识器分类统计ToolStripMenuItem}); this.全区域统计ToolStripMenuItem.Name = "全区域统计ToolStripMenuItem"; - this.全区域统计ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.全区域统计ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.全区域统计ToolStripMenuItem.Text = "全区域统计"; // // 管线长度统计ToolStripMenuItem @@ -1580,7 +1602,7 @@ this.附属物分类统计ToolStripMenuItem1, this.标识器分类统计ToolStripMenuItem1}); this.绘制区域统计ToolStripMenuItem.Name = "绘制区域统计ToolStripMenuItem"; - this.绘制区域统计ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.绘制区域统计ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.绘制区域统计ToolStripMenuItem.Text = "绘制区域统计"; // // 管线长度统计ToolStripMenuItem1 @@ -1654,7 +1676,7 @@ this.道路断面分析ToolStripMenuItem, this.基线剖面分析ToolStripMenuItem}); this.断面分析ToolStripMenuItem.Name = "断面分析ToolStripMenuItem"; - this.断面分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.断面分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.断面分析ToolStripMenuItem.Text = "断面分析"; // // 横断面分析ToolStripMenuItem @@ -1696,7 +1718,7 @@ this.连通分析ToolStripMenuItem, this.爆管分析ToolStripMenuItem}); this.拓扑分析ToolStripMenuItem.Name = "拓扑分析ToolStripMenuItem"; - this.拓扑分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.拓扑分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.拓扑分析ToolStripMenuItem.Text = "拓扑分析"; // // 创建拓扑ToolStripMenuItem @@ -1758,7 +1780,7 @@ this.隐藏隧道ToolStripMenuItem, this.删除隧道ToolStripMenuItem}); this.开挖分析ToolStripMenuItem.Name = "开挖分析ToolStripMenuItem"; - this.开挖分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.开挖分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.开挖分析ToolStripMenuItem.Text = "开挖分析"; // // 多边形开挖ToolStripMenuItem @@ -1810,7 +1832,7 @@ this.可视域分析ToolStripMenuItem, this.可视包络分析ToolStripMenuItem}); this.视域分析ToolStripMenuItem.Name = "视域分析ToolStripMenuItem"; - this.视域分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.视域分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.视域分析ToolStripMenuItem.Text = "视域分析"; // // 通视分析ToolStripMenuItem @@ -1841,7 +1863,7 @@ this.缓冲区分析ToolStripMenuItem, this.无源淹没分析ToolStripMenuItem}); this.区域分析ToolStripMenuItem.Name = "区域分析ToolStripMenuItem"; - this.区域分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.区域分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.区域分析ToolStripMenuItem.Text = "区域分析"; // // 附属物分析ToolStripMenuItem @@ -1868,7 +1890,7 @@ // 清除分析ToolStripMenuItem // this.清除分析ToolStripMenuItem.Name = "清除分析ToolStripMenuItem"; - this.清除分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.清除分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.清除分析ToolStripMenuItem.Text = "清除分析"; this.清除分析ToolStripMenuItem.Click += new System.EventHandler(this.buttonItemClear_Click); // @@ -2201,328 +2223,6 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - this.ribbonPanel6.Visible = false; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // - // ribbonPanel2 - // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar3); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; - // - // ribbonBar3 - // - this.ribbonBar3.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar3.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar3.BackgroundStyle.Class = ""; - this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar3.ContainerControlProcessDialogKey = true; - this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_user_info, - this.btn_role_info, - this.btn_resc_info, - this.btn_role_resc, - this.btn_user_role, - this.btn_password_edit, - this.buttonItemPasswordReset}); - this.ribbonBar3.Location = new System.Drawing.Point(3, 0); - this.ribbonBar3.Name = "ribbonBar3"; - this.ribbonBar3.Size = new System.Drawing.Size(551, 59); - this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar3.TabIndex = 1; - // - // - // - this.ribbonBar3.TitleStyle.Class = ""; - this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar3.TitleStyleMouseOver.Class = ""; - this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar3.TitleVisible = false; - // - // btn_user_info - // - this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image"))); - this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_user_info.Name = "btn_user_info"; - this.btn_user_info.SubItemsExpandWidth = 14; - this.btn_user_info.Text = "用户管理"; - this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click); - // - // btn_role_info - // - this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image"))); - this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_role_info.Name = "btn_role_info"; - this.btn_role_info.SubItemsExpandWidth = 14; - this.btn_role_info.Text = "角色管理"; - this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click); - // - // btn_resc_info - // - this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image"))); - this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_resc_info.Name = "btn_resc_info"; - this.btn_resc_info.SubItemsExpandWidth = 14; - this.btn_resc_info.Text = "资源管理"; - this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click); - // - // btn_role_resc - // - this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image"))); - this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_role_resc.Name = "btn_role_resc"; - this.btn_role_resc.SubItemsExpandWidth = 14; - this.btn_role_resc.Text = "角色授权"; - this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click); - // - // btn_user_role - // - this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image"))); - this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_user_role.Name = "btn_user_role"; - this.btn_user_role.SubItemsExpandWidth = 14; - this.btn_user_role.Text = "用户授权"; - this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click); - // - // btn_password_edit - // - this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image"))); - this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_password_edit.Name = "btn_password_edit"; - this.btn_password_edit.SubItemsExpandWidth = 14; - this.btn_password_edit.Text = "密码修改"; - this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click); - // - // buttonItemPasswordReset - // - this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image"))); - this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemPasswordReset.Name = "buttonItemPasswordReset"; - this.buttonItemPasswordReset.SubItemsExpandWidth = 14; - this.buttonItemPasswordReset.Text = "重置密码"; - this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click); - // - // ribbonPanel3 - // - this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel3.Controls.Add(this.ribbonBar4); - this.ribbonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel3.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel3.Name = "ribbonPanel3"; - this.ribbonPanel3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel3.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel3.Style.Class = ""; - this.ribbonPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel3.StyleMouseDown.Class = ""; - this.ribbonPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel3.StyleMouseOver.Class = ""; - this.ribbonPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel3.TabIndex = 40; - this.ribbonPanel3.Visible = false; - // - // ribbonBar4 - // - this.ribbonBar4.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(634, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - // - // - // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.LabelWidth = 50; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.TextColor = System.Drawing.Color.Black; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3002,6 +2702,328 @@ this.buttonItemXT4_2.Text = "人员修改"; this.buttonItemXT4_2.Click += new System.EventHandler(this.buttonItemXT4_2_Click); // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + this.ribbonPanel6.Visible = false; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // + // ribbonPanel2 + // + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar3); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; + // + // ribbonBar3 + // + this.ribbonBar3.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar3.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar3.BackgroundStyle.Class = ""; + this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar3.ContainerControlProcessDialogKey = true; + this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_user_info, + this.btn_role_info, + this.btn_resc_info, + this.btn_role_resc, + this.btn_user_role, + this.btn_password_edit, + this.buttonItemPasswordReset}); + this.ribbonBar3.Location = new System.Drawing.Point(3, 0); + this.ribbonBar3.Name = "ribbonBar3"; + this.ribbonBar3.Size = new System.Drawing.Size(551, 59); + this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar3.TabIndex = 1; + // + // + // + this.ribbonBar3.TitleStyle.Class = ""; + this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar3.TitleStyleMouseOver.Class = ""; + this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar3.TitleVisible = false; + // + // btn_user_info + // + this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image"))); + this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_user_info.Name = "btn_user_info"; + this.btn_user_info.SubItemsExpandWidth = 14; + this.btn_user_info.Text = "用户管理"; + this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click); + // + // btn_role_info + // + this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image"))); + this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_role_info.Name = "btn_role_info"; + this.btn_role_info.SubItemsExpandWidth = 14; + this.btn_role_info.Text = "角色管理"; + this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click); + // + // btn_resc_info + // + this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image"))); + this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_resc_info.Name = "btn_resc_info"; + this.btn_resc_info.SubItemsExpandWidth = 14; + this.btn_resc_info.Text = "资源管理"; + this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click); + // + // btn_role_resc + // + this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image"))); + this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_role_resc.Name = "btn_role_resc"; + this.btn_role_resc.SubItemsExpandWidth = 14; + this.btn_role_resc.Text = "角色授权"; + this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click); + // + // btn_user_role + // + this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image"))); + this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_user_role.Name = "btn_user_role"; + this.btn_user_role.SubItemsExpandWidth = 14; + this.btn_user_role.Text = "用户授权"; + this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click); + // + // btn_password_edit + // + this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image"))); + this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_password_edit.Name = "btn_password_edit"; + this.btn_password_edit.SubItemsExpandWidth = 14; + this.btn_password_edit.Text = "密码修改"; + this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click); + // + // buttonItemPasswordReset + // + this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image"))); + this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemPasswordReset.Name = "buttonItemPasswordReset"; + this.buttonItemPasswordReset.SubItemsExpandWidth = 14; + this.buttonItemPasswordReset.Text = "重置密码"; + this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click); + // + // ribbonPanel3 + // + this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel3.Controls.Add(this.ribbonBar4); + this.ribbonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel3.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel3.Name = "ribbonPanel3"; + this.ribbonPanel3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel3.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel3.Style.Class = ""; + this.ribbonPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel3.StyleMouseDown.Class = ""; + this.ribbonPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel3.StyleMouseOver.Class = ""; + this.ribbonPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel3.TabIndex = 40; + this.ribbonPanel3.Visible = false; + // + // ribbonBar4 + // + this.ribbonBar4.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(634, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + // + // + // + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.LabelWidth = 50; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.TextColor = System.Drawing.Color.Black; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel7 // this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3837,7 +3859,7 @@ this.dataGridViewX1.Name = "dataGridViewX1"; this.dataGridViewX1.ReadOnly = true; this.dataGridViewX1.RowTemplate.Height = 23; - this.dataGridViewX1.Size = new System.Drawing.Size(1125, 65); + this.dataGridViewX1.Size = new System.Drawing.Size(1125, 61); this.dataGridViewX1.TabIndex = 13; this.dataGridViewX1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX1_MouseDoubleClick); // @@ -3847,10 +3869,20 @@ this.statusStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripNumbers, this.toolStripStatusLabel5, + this.firstpage, + this.toolStripStatusLabel3, + this.prepage, + this.toolStripStatusLabel7, + this.nextpage, + this.toolStripStatusLabel9, + this.lastpage, + this.toolStripStatusLabel1, + this.pageinfo, + this.toolStripStatusLabel11, this.toolStripDropDownButton3}); - this.statusStrip2.Location = new System.Drawing.Point(0, 70); + this.statusStrip2.Location = new System.Drawing.Point(0, 66); this.statusStrip2.Name = "statusStrip2"; - this.statusStrip2.Size = new System.Drawing.Size(1125, 22); + this.statusStrip2.Size = new System.Drawing.Size(1125, 26); this.statusStrip2.SizingGrip = false; this.statusStrip2.TabIndex = 12; this.statusStrip2.Text = "statusStrip2"; @@ -3858,15 +3890,95 @@ // toolStripNumbers // this.toolStripNumbers.Name = "toolStripNumbers"; - this.toolStripNumbers.Size = new System.Drawing.Size(56, 17); + this.toolStripNumbers.Size = new System.Drawing.Size(56, 21); this.toolStripNumbers.Text = "管线类型"; // // toolStripStatusLabel5 // this.toolStripStatusLabel5.Name = "toolStripStatusLabel5"; - this.toolStripStatusLabel5.Size = new System.Drawing.Size(15, 17); + this.toolStripStatusLabel5.Size = new System.Drawing.Size(15, 21); this.toolStripStatusLabel5.Text = " |"; // + // firstpage + // + this.firstpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.firstpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.firstpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.firstpage.Name = "firstpage"; + this.firstpage.Size = new System.Drawing.Size(36, 21); + this.firstpage.Text = "首页"; + // + // toolStripStatusLabel3 + // + this.toolStripStatusLabel3.Name = "toolStripStatusLabel3"; + this.toolStripStatusLabel3.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel3.Text = "|"; + // + // prepage + // + this.prepage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.prepage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.prepage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.prepage.Name = "prepage"; + this.prepage.Size = new System.Drawing.Size(48, 21); + this.prepage.Text = "上一页"; + // + // toolStripStatusLabel7 + // + this.toolStripStatusLabel7.Name = "toolStripStatusLabel7"; + this.toolStripStatusLabel7.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel7.Text = "|"; + // + // nextpage + // + this.nextpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.nextpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.nextpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.nextpage.Name = "nextpage"; + this.nextpage.Size = new System.Drawing.Size(48, 21); + this.nextpage.Text = "下一页"; + // + // toolStripStatusLabel9 + // + this.toolStripStatusLabel9.Name = "toolStripStatusLabel9"; + this.toolStripStatusLabel9.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel9.Text = "|"; + // + // lastpage + // + this.lastpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.lastpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.lastpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.lastpage.Name = "lastpage"; + this.lastpage.Size = new System.Drawing.Size(36, 21); + this.lastpage.Text = "末页"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel1.Text = "|"; + // + // pageinfo + // + this.pageinfo.Name = "pageinfo"; + this.pageinfo.Size = new System.Drawing.Size(37, 21); + this.pageinfo.Text = "共*页"; + // + // toolStripStatusLabel11 + // + this.toolStripStatusLabel11.Name = "toolStripStatusLabel11"; + this.toolStripStatusLabel11.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel11.Text = "|"; + // // toolStripDropDownButton3 // this.toolStripDropDownButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); @@ -3880,7 +3992,6 @@ this.toolStripDropDownButton3.Name = "toolStripDropDownButton3"; this.toolStripDropDownButton3.Size = new System.Drawing.Size(75, 21); this.toolStripDropDownButton3.Text = "导出xls文件"; - this.toolStripDropDownButton3.Visible = false; this.toolStripDropDownButton3.Click += new System.EventHandler(this.toolStripDropDownButton3_Click); // // expandableSplitter2 @@ -4457,7 +4568,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(34051, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(34645, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4551,7 +4662,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(34050, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(34644, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5737,18 +5848,6 @@ this.pictureBox1.TabStop = false; this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - this.layerTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseClick); - this.layerTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -5791,10 +5890,10 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); @@ -6311,6 +6410,16 @@ private ButtonItem buttonItem12; private ButtonItem buttonItem13; private ButtonItem buttonItem14; + private ToolStripStatusLabel firstpage; + private ToolStripStatusLabel toolStripStatusLabel3; + private ToolStripStatusLabel prepage; + private ToolStripStatusLabel toolStripStatusLabel7; + private ToolStripStatusLabel nextpage; + private ToolStripStatusLabel toolStripStatusLabel9; + private ToolStripStatusLabel lastpage; + private ToolStripStatusLabel toolStripStatusLabel11; + private ToolStripStatusLabel toolStripStatusLabel1; + private ToolStripStatusLabel pageinfo; } } diff --git a/PaginationFeaturesUtil.cs b/PaginationFeaturesUtil.cs new file mode 100644 index 0000000..5ba7831 --- /dev/null +++ b/PaginationFeaturesUtil.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using GeoScene.Data; + +namespace Cyberpipe +{ + class PaginationFeaturesUtil + { + private static int _total = 0; + private static int _beginIndex = 1; + private static int _pagesize = 10; + private static MainFrm.PageControlStuct _pageControl; + private static MainFrm.DataGridViewDelegate _mInitDataGridViewX1; + private static PaginationFeaturesUtil _singlePagination = null; + private static string _queryInfo = ""; + private static string _layerName = ""; + private static GSOFeatures _features; + private static string[] _fields; + public static PaginationFeaturesUtil InitPagination(int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1, string queryInfo, string layerName, GSOFeatures features,string [] fields) + { + if (_singlePagination == null) + { + _singlePagination = new PaginationFeaturesUtil( total, pageControl, mInitDataGridViewX1, queryInfo, layerName, features, fields); + _pageControl.firstpage.Click += _singlePagination.FirstPageButtonClick; + _pageControl.nextpage.Click += _singlePagination.NextPageButtonClick; + _pageControl.prepage.Click += _singlePagination.PrePageButtonClick; + _pageControl.lastpage.Click += _singlePagination.LastPageButtonClick; + return _singlePagination; + } + _queryInfo = queryInfo; + _layerName = layerName; + _features = features; + _fields = fields; + _total = total; + return _singlePagination; + } + + private PaginationFeaturesUtil(int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1, string queryInfo, string layerName, GSOFeatures features, string[] fields) + { + _pageControl = pageControl; + _mInitDataGridViewX1 = mInitDataGridViewX1; + _queryInfo = queryInfo; + _layerName = layerName; + _total = total; + _features = features; + _fields = fields; + } + + /// + /// 执行sql语句,将执行的分页结果加载到指定datatable上 + /// + public void FillDataGridView() + { + DataTable table = ConvertGsoFeatures2DataTable(_features, _fields, _beginIndex, _pagesize); + ComputePageInfo(_beginIndex, _pagesize, _total); + _mInitDataGridViewX1(table, _queryInfo, _layerName, true); + //控制首页、上一页、下一页、末页按钮的显示 + _pageControl.nextpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.lastpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.firstpage.Visible = _beginIndex > 1; + _pageControl.prepage.Visible = _beginIndex > 1; + } + private void ComputePageInfo(int begin, int pagesize, int total) + { + int pageCount = (total - 1) / pagesize + 1; + int curPage = begin / pagesize + 1; + _pageControl.pageinfo.Text = "每页" + pagesize + "条," + curPage + "/" + pageCount + "页"; + } + /// + /// 分页查询 + /// + /// + /// + /// + /// + /// + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field, int begin, int pagesize) + { + if (features == null || features.Length == 0 || field.Length == 0) return null; + DataTable result = new DataTable(); + foreach (string t in field) + { + result.Columns.Add(t, typeof(String)); + } + int i = 0; + while (i < begin) i++; + for (; i < features.Length && i < begin + pagesize; i++) + { + GSOFeature feature = features[i]; + string[] values = new string[field.Length]; + for (int j = 0; j < field.Length; j++) + { + string value = feature.GetFieldAsString(field[j]); + values[j] = value; + } + result.Rows.Add(values); + } + return result; + } + + /// + /// 重置查询条件 + /// + public static void ResetPagination() + { + _total = 0; + _beginIndex = 1; + + } + + private void FirstPageButtonClick(object sender, EventArgs e) + { + _beginIndex = 1; + FillDataGridView(); + } + private void NextPageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex + _pagesize; + FillDataGridView(); + } + private void PrePageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex - _pagesize; + FillDataGridView(); + } + private void LastPageButtonClick(object sender, EventArgs e) + { + while (_beginIndex < _total - _pagesize + 1) _beginIndex += _pagesize; + FillDataGridView(); + } + + } +} diff --git a/PaginationUtil.cs b/PaginationUtil.cs new file mode 100644 index 0000000..e1a85ed --- /dev/null +++ b/PaginationUtil.cs @@ -0,0 +1,280 @@ +using System; +using System.Collections.Generic; +using System.Data; +using GeoScene.Globe; + +namespace Cyberpipe +{ + class PaginationUtil + { + private static int _total = 0; + private static int _beginIndex = 1; + private static int _pagesize = 10; + private static string _sql = ""; + private static MainFrm.PageControlStuct _pageControl; +// private static DataGridViewX _dataGridView1; + private static MainFrm.DataGridViewDelegate _mInitDataGridViewX1; + private static PaginationUtil _singlePagination = null; + private static string _queryInfo=""; + private static string _layerName=""; + //定义单例模式,防止点击事件被多次绑定 + public static PaginationUtil InitPagination(string sql, int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1,string queryInfo,string layerName) + { + if (_singlePagination == null) + { + _singlePagination = new PaginationUtil(sql, total, pageControl, mInitDataGridViewX1, queryInfo, layerName); + _pageControl.firstpage.Click += _singlePagination.FirstPageButtonClick; + _pageControl.nextpage.Click += _singlePagination.NextPageButtonClick; + _pageControl.prepage.Click += _singlePagination.PrePageButtonClick; + _pageControl.lastpage.Click += _singlePagination.LastPageButtonClick; + return _singlePagination; + } + _queryInfo = queryInfo; + _layerName = layerName; + _sql = sql; + _total = total; + return _singlePagination; + } + + private PaginationUtil(string sql, int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1,string queryInfo,string layerName) + { + _pageControl = pageControl; + _mInitDataGridViewX1 = mInitDataGridViewX1; + _queryInfo = queryInfo; + _layerName = layerName; + _sql = sql; + _total = total; + + } + + /// + /// 执行sql语句,将执行的分页结果加载到指定datatable上 + /// + public void FillDataGridView() + { + string sql = PageQuerySql(_sql, _beginIndex, _pagesize); + ComputePageInfo(_beginIndex,_pagesize,_total); + DataTable table = OledbHelper.QueryTable(sql); +// _dataGridView1.DataSource = table; + _mInitDataGridViewX1(table, _queryInfo, _layerName, true); + //控制首页、上一页、下一页、末页按钮的显示 + _pageControl.nextpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.lastpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.firstpage.Visible = _beginIndex > 1; + _pageControl.prepage.Visible = _beginIndex > 1; + } + /// + /// 查询总记录数 + /// + /// + /// +// public static int Count(string sql) +// { +// DataTable table = OledbHelper.QueryTable(sql); +// int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); +// return result; +// } + /// + /// 将一般查询语句转换为分页查询语句 + /// + /// 原sql语句 + /// 开始索引 + /// 每页记录数 + /// + private static string PageQuerySql(string sql, int begin, int pageSize) + { + int end = begin + pageSize - 1; + string result = "select * from (select rownum rn,A.* from (" + sql + ") A) B where rn between " + begin + " and " + end; + return result; + + } + /// + /// 查询的分页信息 + /// + /// + /// + /// + private void ComputePageInfo(int begin, int pagesize, int total) + { + int pageCount = (total - 1) / pagesize + 1; + int curPage = begin / pagesize + 1; + _pageControl.pageinfo.Text = "每页" + pagesize + "条," + curPage + "/" + pageCount + "页"; + } + + /// + /// 重置查询条件 + /// + public static void ResetPagination() + { + _total = 0; + _beginIndex = 1; + + } + + private void FirstPageButtonClick(object sender, EventArgs e) + { + _beginIndex = 1; + FillDataGridView(); + } + private void NextPageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex + _pagesize; + FillDataGridView(); + } + private void PrePageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex - _pagesize; + FillDataGridView(); + } + private void LastPageButtonClick(object sender, EventArgs e) + { + while (_beginIndex < _total - _pagesize + 1) _beginIndex += _pagesize; + FillDataGridView(); + } + + + + /// + /// 获取原查询的语句 + /// + /// + /// + /// + /// + /// + public static string GetQuerySql(GSOGlobeControl mGlobeControl, string layerName, + string filedObject, string filedValue) + { + string sql = ""; + if (filedObject == "") + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName; + } + else + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + filedObject + " like '%" + + filedValue + "%'"; + } + return sql; + } + + public static string GetQuerySql(GSOGlobeControl mGlobeControl, string layerName, + string filedObject, string mathT, string leftFiledValue, string rightFiledValue) + { + string sql = ""; + if (mathT == "区间") + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + filedObject + ">" + leftFiledValue + + "and " + filedObject + "<" + rightFiledValue; + } + else + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + filedObject + mathT + rightFiledValue; + } + return sql; + } + + public static string GetQuerySql(GSOGlobeControl mGlobeControl, + string layerName, string filedObject, List filedValueList) + { + string sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where 1>2 "; + foreach (string value in filedValueList) + { + if (value == "无") + { + sql += " or " + filedObject + " is null"; + } + else + { + sql += " or " + filedObject + " = '" + value + "'"; + } + } + return sql; + } + + public static string GetQuerySql(GSOGlobeControl mGlobeControl, string layerName, string whereSql) + { + string sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + whereSql; + + return sql; + } + /// + /// 查询记录总数 + /// + /// + /// + /// + /// + public static int CountSql(string layerName, + string filedObject, string filedValue) + { + string sql = ""; + if (filedObject == "") + { + sql = "select count(1) from " + layerName; + } + else + { + sql = "select count(1) from " + layerName + " where " + filedObject + " like '%" + + filedValue + "%'"; + } + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + + public static int CountSql(string layerName, + string filedObject, string mathT, string leftFiledValue, string rightFiledValue) + { + string sql = ""; + if (mathT == "区间") + { + sql = "select count(1) from " + layerName + " where " + filedObject + ">" + leftFiledValue + + "and " + filedObject + "<" + rightFiledValue; + } + else + { + sql = "select count(1) from " + layerName + " where " + filedObject + mathT + rightFiledValue; + } + + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + public static int CountSql(string layerName, string filedObject, List filedValueList) + { + string sql = "select count(1) from " + layerName + " where 1>2 "; + foreach (string value in filedValueList) + { + if (value == "无") + { + sql += " or " + filedObject + " is null"; + } + else + { + sql += " or " + filedObject + " = '" + value + "'"; + } + } + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + + public static int CountSql(string layerName, string whereSql) + { + string sql = "select count(1) from " + layerName + " where " + whereSql; + + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + } +} diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmMaterialSel.cs b/FrmMaterialSel.cs index d23f385..c5af730 100644 --- a/FrmMaterialSel.cs +++ b/FrmMaterialSel.cs @@ -14,13 +14,14 @@ static FrmMaterialSel frm; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1); + frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +33,13 @@ } } - public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -142,13 +144,22 @@ filedValueList.Add(listBox2.Items[i].ToString()); } - ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, - comboBoxEx1.Text.Trim(), "材质", filedValueList); +// ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, +// comboBoxEx1.Text.Trim(), "材质", filedValueList); - if (table != null && table.Rows.Count > 0) +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "材质", filedValueList); + if (total > 0) { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "材质", filedValueList); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -178,7 +189,7 @@ /// private void FrmMaterialSel_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmQuerySQL.cs b/FrmQuerySQL.cs index 3c05684..591e731 100644 --- a/FrmQuerySQL.cs +++ b/FrmQuerySQL.cs @@ -16,14 +16,14 @@ public string currentLayerName; static FrmQuerySQL frm; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmQuerySQL(_ctl, InitDataGridViewX1); + frm = new FrmQuerySQL(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -35,11 +35,12 @@ } } - public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); m_globeControl = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } #region 符号按钮双击事件 @@ -227,12 +228,21 @@ { currentLayerName = cbox_Layers.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); +// ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); - if (table != null && table.Rows.Count != 0) +// if (table != null && table.Rows.Count != 0) +// { +// strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; +// m_InitDataGridViewX1(table, strLable, currentLayerName, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(currentLayerName, textBox_WhereClause.Text); + if (total > 0) { - strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; - m_InitDataGridViewX1(table, strLable, currentLayerName, true); + string strLable = currentLayerName + " || 共有:" + total + "记录"; + string sql = PaginationUtil.GetQuerySql(m_globeControl, currentLayerName, textBox_WhereClause.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, currentLayerName); + pagination.FillDataGridView(); } else { @@ -290,7 +300,7 @@ /// private void Frm_QuerySQL_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index f4770a9..369a7ee 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -17,23 +17,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - //public FrmValveStatistics(Dictionary wellLen, List _list, - // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate initDataGridViewX1) - //{ - // InitializeComponent(); - // workWellLengthAndType = wellLen; - // list = _list; - // globeControl1 = ctl; - // m_InitDataGridViewX1 = initDataGridViewX1; - //} - - public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -94,7 +86,7 @@ { //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chaFamenStatis.Series["阀门"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -107,18 +99,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - for (int i = 0; i < fs.Length; i++) - { - if (fs[i].GetValue("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetValue("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// } +// +// DataTable table = OledbHelper.QueryTable(sql); +// string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(table, strLable, layername, true); + + + List list = new List(); + for (int i = 0; i < fs.Length; i++) + { + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable table = OledbHelper.QueryTable(sql); - string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; - m_InitDataGridViewX1(table, strLable, layername, true); - + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号",list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } } /// diff --git a/Frmpipediameterstatis.cs b/Frmpipediameterstatis.cs index 631a996..48ac35f 100644 --- a/Frmpipediameterstatis.cs +++ b/Frmpipediameterstatis.cs @@ -17,7 +17,9 @@ List pipeLayerNames ; static Frmpipediameterstatis frm; - public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers,int visibleId) +// private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { if (frm == null) { @@ -30,11 +32,12 @@ } } - public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) + public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { InitializeComponent(); globeControl1 = _globeControl1; pipeLayerNames = pipeLayers; +// _pageControl = pageControl; if (visibleId == 0) { buttonX9.Visible = false; @@ -459,12 +462,9 @@ bool b1 = false, b2 = false; b1 = float.TryParse(text.Text, out oldf); b2 = float.TryParse(text.Text + e.KeyChar, out f); - if (b2 == false) + if (!b2) { - if (b1) - e.Handled = true; - else - e.Handled = false; + e.Handled = b1; } } } diff --git a/MainFrm.cs b/MainFrm.cs index 57d21ac..24f70a6 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -101,6 +101,18 @@ float mouseDownX1, mouseDownY1; float mouseDownX2, mouseDownY2; + //控制分页的数据结构,首页、末页、上一页、下一页 + public struct PageControlStuct + { + public ToolStripStatusLabel firstpage; + public ToolStripStatusLabel prepage; + public ToolStripStatusLabel nextpage; + public ToolStripStatusLabel lastpage; + public ToolStripStatusLabel pageinfo; + public ToolStripStatusLabel toolStripNumbers; + public ToolStripStatusLabel toolStripFeatureLength; + } + /// /// /// @@ -1827,31 +1839,36 @@ { if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon || e.Polygon == null) return; GSOGeoPolygon3D polygon = e.Polygon; - + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; switch (trackflag) { case "valvequery": - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1); + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1,pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineDistanceStatistics": - FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm1.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineSpatialQuery": - FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); globeControl1.Globe.ClearAnalysis(); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "workwellquery": - FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1); + FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1, pageControl); frmWell.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; @@ -5394,6 +5411,8 @@ FrmKeywordQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); } + + /// /// 编号查询 /// @@ -5402,8 +5421,15 @@ private void 编号查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "编号查询"); - - FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; +// pageControl.toolStripFeatureLength = toolStripFeatureLength; + pageControl.toolStripNumbers = toolStripNumbers; + FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 坐标查询 @@ -5424,8 +5450,13 @@ private void 附属物查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "附属物查询"); - - FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1, pageControl); } /// /// 管径查询 @@ -5435,8 +5466,13 @@ private void 管径查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径查询"); - - FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 材质查询 @@ -5446,8 +5482,13 @@ private void 材质查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "材质查询"); - - FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1,pageControl); } /// /// 基本查询 @@ -5457,8 +5498,13 @@ private void 基本查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "基本查询"); - - FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 复合查询 @@ -5468,8 +5514,13 @@ private void 复合查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "复合查询"); - - FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 关联查询 @@ -5493,8 +5544,7 @@ GSOLayer layer = null; globeControl1.Globe.GetSelectObject(j, out feature, out layer); - if (feature == null && feature.Geometry == null || (feature.Geometry.Type == EnumGeometryType.GeoPolygon3D - || feature.Geometry.Type == EnumGeometryType.GeoWater)) + if (feature == null || feature.Geometry == null || feature.Geometry.Type == EnumGeometryType.GeoPolygon3D || feature.Geometry.Type == EnumGeometryType.GeoWater) return; ClassSearchAnalysis.ResultRelationAnalysis(globeControl1, feature, Utility.valueLayerNames, Utility.workwellLayerNames, Utility.instrumenLayerNames, Utility.pipefittingLayerNames, Utility.m_PipelineLayerNames, valueAllowance); @@ -5556,7 +5606,13 @@ private void 管线长度统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管线长度统计"); - FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm.Show(this); } /// @@ -5572,6 +5628,7 @@ globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; } + /// /// 阀门数量全区域统计 /// @@ -5580,11 +5637,18 @@ private void 阀门数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1, pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; } + /// /// 阀门数量绘制区域统计 /// @@ -5593,7 +5657,6 @@ private void 阀门数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - trackflag = "valvequery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5605,7 +5668,13 @@ /// private void 井盖数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { - FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1,pageControl); frm.Show(this); } /// @@ -5616,7 +5685,6 @@ private void 井盖数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "井盖数量统计"); - trackflag = "workwellquery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5629,7 +5697,6 @@ private void 管径分段统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 0); } /// @@ -5640,7 +5707,6 @@ private void 管径分段统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - trackflag = null; Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 1); } diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index 1c8ad99..abcf2ec 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -90,6 +90,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -244,26 +245,6 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_role_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem(); - this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); - this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -319,6 +300,26 @@ this.buttonItemXT4 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItemXT4_1 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItemXT4_2 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_role_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem(); + this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); + this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); this.gxdw_ribbonbar = new DevComponents.DotNetBar.RibbonBar(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); @@ -386,6 +387,16 @@ this.statusStrip2 = new System.Windows.Forms.StatusStrip(); this.toolStripNumbers = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabel5 = new System.Windows.Forms.ToolStripStatusLabel(); + this.firstpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.prepage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel7 = new System.Windows.Forms.ToolStripStatusLabel(); + this.nextpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel9 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lastpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.pageinfo = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel11 = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripDropDownButton3 = new System.Windows.Forms.ToolStripStatusLabel(); this.expandableSplitter2 = new DevComponents.DotNetBar.ExpandableSplitter(); this.miniToolStrip = new System.Windows.Forms.StatusStrip(); @@ -518,7 +529,6 @@ this.labelX17 = new DevComponents.DotNetBar.LabelX(); this.panelEx4 = new DevComponents.DotNetBar.PanelEx(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -529,10 +539,10 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel15.SuspendLayout(); this.ribbonPanel7.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); @@ -957,6 +967,18 @@ this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); this.layerSensorTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + this.layerTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseClick); + this.layerTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1131,7 +1153,7 @@ this.区域分析ToolStripMenuItem, this.清除分析ToolStripMenuItem}); this.toolRightMenu.Name = "toolRightMenu"; - this.toolRightMenu.Size = new System.Drawing.Size(149, 290); + this.toolRightMenu.Size = new System.Drawing.Size(153, 312); // // 量算ToolStripMenuItem // @@ -1144,7 +1166,7 @@ this.水平面积ToolStripMenuItem1, this.地表面积ToolStripMenuItem1}); this.量算ToolStripMenuItem.Name = "量算ToolStripMenuItem"; - this.量算ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.量算ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.量算ToolStripMenuItem.Text = "量算"; // // 水平距离ToolStripMenuItem1 @@ -1207,7 +1229,7 @@ this.前进ToolStripMenuItem, this.后退ToolStripMenuItem}); this.编辑ToolStripMenuItem.Name = "编辑ToolStripMenuItem"; - this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.编辑ToolStripMenuItem.Text = "编辑"; // // 平移对象ToolStripMenuItem @@ -1283,7 +1305,7 @@ this.绕中心点飞行ToolStripMenuItem, this.绕眼睛飞行ToolStripMenuItem}); this.飞行ToolStripMenuItem.Name = "飞行ToolStripMenuItem"; - this.飞行ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.飞行ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.飞行ToolStripMenuItem.Text = "飞行"; // // 自定义飞行ToolStripMenuItem @@ -1328,7 +1350,7 @@ this.属性标注ToolStripMenuItem, this.标注管理ToolStripMenuItem}); this.标注ToolStripMenuItem.Name = "标注ToolStripMenuItem"; - this.标注ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.标注ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.标注ToolStripMenuItem.Text = "标注"; // // 标高标注ToolStripMenuItem @@ -1415,76 +1437,76 @@ this.关联查询ToolStripMenuItem, this.关键字查询ToolStripMenuItem}); this.查询ToolStripMenuItem.Name = "查询ToolStripMenuItem"; - this.查询ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.查询ToolStripMenuItem.Text = "查询"; // // 空间查询ToolStripMenuItem // this.空间查询ToolStripMenuItem.Name = "空间查询ToolStripMenuItem"; - this.空间查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.空间查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.空间查询ToolStripMenuItem.Text = "空间查询"; this.空间查询ToolStripMenuItem.Click += new System.EventHandler(this.空间查询ToolStripMenuItem_Click); // // 编号查询ToolStripMenuItem // this.编号查询ToolStripMenuItem.Name = "编号查询ToolStripMenuItem"; - this.编号查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.编号查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.编号查询ToolStripMenuItem.Text = "编号查询"; this.编号查询ToolStripMenuItem.Click += new System.EventHandler(this.编号查询ToolStripMenuItem_Click); // // 坐标查询ToolStripMenuItem // this.坐标查询ToolStripMenuItem.Name = "坐标查询ToolStripMenuItem"; - this.坐标查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.坐标查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.坐标查询ToolStripMenuItem.Text = "坐标查询"; this.坐标查询ToolStripMenuItem.Click += new System.EventHandler(this.坐标查询ToolStripMenuItem_Click); // // 附属物查询ToolStripMenuItem // this.附属物查询ToolStripMenuItem.Name = "附属物查询ToolStripMenuItem"; - this.附属物查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.附属物查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.附属物查询ToolStripMenuItem.Text = "配件查询"; this.附属物查询ToolStripMenuItem.Click += new System.EventHandler(this.附属物查询ToolStripMenuItem_Click); // // 管径查询ToolStripMenuItem // this.管径查询ToolStripMenuItem.Name = "管径查询ToolStripMenuItem"; - this.管径查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.管径查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.管径查询ToolStripMenuItem.Text = "管径查询"; this.管径查询ToolStripMenuItem.Click += new System.EventHandler(this.管径查询ToolStripMenuItem_Click); // // 材质查询ToolStripMenuItem // this.材质查询ToolStripMenuItem.Name = "材质查询ToolStripMenuItem"; - this.材质查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.材质查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.材质查询ToolStripMenuItem.Text = "材质查询"; this.材质查询ToolStripMenuItem.Click += new System.EventHandler(this.材质查询ToolStripMenuItem_Click); // // 基本查询ToolStripMenuItem // this.基本查询ToolStripMenuItem.Name = "基本查询ToolStripMenuItem"; - this.基本查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.基本查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.基本查询ToolStripMenuItem.Text = "基本查询"; this.基本查询ToolStripMenuItem.Click += new System.EventHandler(this.基本查询ToolStripMenuItem_Click); // // 复合查询ToolStripMenuItem // this.复合查询ToolStripMenuItem.Name = "复合查询ToolStripMenuItem"; - this.复合查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.复合查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.复合查询ToolStripMenuItem.Text = "复合查询"; this.复合查询ToolStripMenuItem.Click += new System.EventHandler(this.复合查询ToolStripMenuItem_Click); // // 关联查询ToolStripMenuItem // this.关联查询ToolStripMenuItem.Name = "关联查询ToolStripMenuItem"; - this.关联查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.关联查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.关联查询ToolStripMenuItem.Text = "关联查询"; this.关联查询ToolStripMenuItem.Click += new System.EventHandler(this.关联查询ToolStripMenuItem_Click); // // 关键字查询ToolStripMenuItem // this.关键字查询ToolStripMenuItem.Name = "关键字查询ToolStripMenuItem"; - this.关键字查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.关键字查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.关键字查询ToolStripMenuItem.Text = "关键字查询"; this.关键字查询ToolStripMenuItem.Click += new System.EventHandler(this.关键字查询ToolStripMenuItem_Click); // @@ -1501,7 +1523,7 @@ this.附属物分类统计ToolStripMenuItem, this.标识器分类统计ToolStripMenuItem}); this.全区域统计ToolStripMenuItem.Name = "全区域统计ToolStripMenuItem"; - this.全区域统计ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.全区域统计ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.全区域统计ToolStripMenuItem.Text = "全区域统计"; // // 管线长度统计ToolStripMenuItem @@ -1580,7 +1602,7 @@ this.附属物分类统计ToolStripMenuItem1, this.标识器分类统计ToolStripMenuItem1}); this.绘制区域统计ToolStripMenuItem.Name = "绘制区域统计ToolStripMenuItem"; - this.绘制区域统计ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.绘制区域统计ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.绘制区域统计ToolStripMenuItem.Text = "绘制区域统计"; // // 管线长度统计ToolStripMenuItem1 @@ -1654,7 +1676,7 @@ this.道路断面分析ToolStripMenuItem, this.基线剖面分析ToolStripMenuItem}); this.断面分析ToolStripMenuItem.Name = "断面分析ToolStripMenuItem"; - this.断面分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.断面分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.断面分析ToolStripMenuItem.Text = "断面分析"; // // 横断面分析ToolStripMenuItem @@ -1696,7 +1718,7 @@ this.连通分析ToolStripMenuItem, this.爆管分析ToolStripMenuItem}); this.拓扑分析ToolStripMenuItem.Name = "拓扑分析ToolStripMenuItem"; - this.拓扑分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.拓扑分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.拓扑分析ToolStripMenuItem.Text = "拓扑分析"; // // 创建拓扑ToolStripMenuItem @@ -1758,7 +1780,7 @@ this.隐藏隧道ToolStripMenuItem, this.删除隧道ToolStripMenuItem}); this.开挖分析ToolStripMenuItem.Name = "开挖分析ToolStripMenuItem"; - this.开挖分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.开挖分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.开挖分析ToolStripMenuItem.Text = "开挖分析"; // // 多边形开挖ToolStripMenuItem @@ -1810,7 +1832,7 @@ this.可视域分析ToolStripMenuItem, this.可视包络分析ToolStripMenuItem}); this.视域分析ToolStripMenuItem.Name = "视域分析ToolStripMenuItem"; - this.视域分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.视域分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.视域分析ToolStripMenuItem.Text = "视域分析"; // // 通视分析ToolStripMenuItem @@ -1841,7 +1863,7 @@ this.缓冲区分析ToolStripMenuItem, this.无源淹没分析ToolStripMenuItem}); this.区域分析ToolStripMenuItem.Name = "区域分析ToolStripMenuItem"; - this.区域分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.区域分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.区域分析ToolStripMenuItem.Text = "区域分析"; // // 附属物分析ToolStripMenuItem @@ -1868,7 +1890,7 @@ // 清除分析ToolStripMenuItem // this.清除分析ToolStripMenuItem.Name = "清除分析ToolStripMenuItem"; - this.清除分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.清除分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.清除分析ToolStripMenuItem.Text = "清除分析"; this.清除分析ToolStripMenuItem.Click += new System.EventHandler(this.buttonItemClear_Click); // @@ -2201,328 +2223,6 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - this.ribbonPanel6.Visible = false; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // - // ribbonPanel2 - // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar3); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; - // - // ribbonBar3 - // - this.ribbonBar3.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar3.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar3.BackgroundStyle.Class = ""; - this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar3.ContainerControlProcessDialogKey = true; - this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_user_info, - this.btn_role_info, - this.btn_resc_info, - this.btn_role_resc, - this.btn_user_role, - this.btn_password_edit, - this.buttonItemPasswordReset}); - this.ribbonBar3.Location = new System.Drawing.Point(3, 0); - this.ribbonBar3.Name = "ribbonBar3"; - this.ribbonBar3.Size = new System.Drawing.Size(551, 59); - this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar3.TabIndex = 1; - // - // - // - this.ribbonBar3.TitleStyle.Class = ""; - this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar3.TitleStyleMouseOver.Class = ""; - this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar3.TitleVisible = false; - // - // btn_user_info - // - this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image"))); - this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_user_info.Name = "btn_user_info"; - this.btn_user_info.SubItemsExpandWidth = 14; - this.btn_user_info.Text = "用户管理"; - this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click); - // - // btn_role_info - // - this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image"))); - this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_role_info.Name = "btn_role_info"; - this.btn_role_info.SubItemsExpandWidth = 14; - this.btn_role_info.Text = "角色管理"; - this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click); - // - // btn_resc_info - // - this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image"))); - this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_resc_info.Name = "btn_resc_info"; - this.btn_resc_info.SubItemsExpandWidth = 14; - this.btn_resc_info.Text = "资源管理"; - this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click); - // - // btn_role_resc - // - this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image"))); - this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_role_resc.Name = "btn_role_resc"; - this.btn_role_resc.SubItemsExpandWidth = 14; - this.btn_role_resc.Text = "角色授权"; - this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click); - // - // btn_user_role - // - this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image"))); - this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_user_role.Name = "btn_user_role"; - this.btn_user_role.SubItemsExpandWidth = 14; - this.btn_user_role.Text = "用户授权"; - this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click); - // - // btn_password_edit - // - this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image"))); - this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_password_edit.Name = "btn_password_edit"; - this.btn_password_edit.SubItemsExpandWidth = 14; - this.btn_password_edit.Text = "密码修改"; - this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click); - // - // buttonItemPasswordReset - // - this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image"))); - this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemPasswordReset.Name = "buttonItemPasswordReset"; - this.buttonItemPasswordReset.SubItemsExpandWidth = 14; - this.buttonItemPasswordReset.Text = "重置密码"; - this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click); - // - // ribbonPanel3 - // - this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel3.Controls.Add(this.ribbonBar4); - this.ribbonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel3.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel3.Name = "ribbonPanel3"; - this.ribbonPanel3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel3.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel3.Style.Class = ""; - this.ribbonPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel3.StyleMouseDown.Class = ""; - this.ribbonPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel3.StyleMouseOver.Class = ""; - this.ribbonPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel3.TabIndex = 40; - this.ribbonPanel3.Visible = false; - // - // ribbonBar4 - // - this.ribbonBar4.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(634, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - // - // - // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.LabelWidth = 50; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.TextColor = System.Drawing.Color.Black; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3002,6 +2702,328 @@ this.buttonItemXT4_2.Text = "人员修改"; this.buttonItemXT4_2.Click += new System.EventHandler(this.buttonItemXT4_2_Click); // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + this.ribbonPanel6.Visible = false; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // + // ribbonPanel2 + // + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar3); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; + // + // ribbonBar3 + // + this.ribbonBar3.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar3.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar3.BackgroundStyle.Class = ""; + this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar3.ContainerControlProcessDialogKey = true; + this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_user_info, + this.btn_role_info, + this.btn_resc_info, + this.btn_role_resc, + this.btn_user_role, + this.btn_password_edit, + this.buttonItemPasswordReset}); + this.ribbonBar3.Location = new System.Drawing.Point(3, 0); + this.ribbonBar3.Name = "ribbonBar3"; + this.ribbonBar3.Size = new System.Drawing.Size(551, 59); + this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar3.TabIndex = 1; + // + // + // + this.ribbonBar3.TitleStyle.Class = ""; + this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar3.TitleStyleMouseOver.Class = ""; + this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar3.TitleVisible = false; + // + // btn_user_info + // + this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image"))); + this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_user_info.Name = "btn_user_info"; + this.btn_user_info.SubItemsExpandWidth = 14; + this.btn_user_info.Text = "用户管理"; + this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click); + // + // btn_role_info + // + this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image"))); + this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_role_info.Name = "btn_role_info"; + this.btn_role_info.SubItemsExpandWidth = 14; + this.btn_role_info.Text = "角色管理"; + this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click); + // + // btn_resc_info + // + this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image"))); + this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_resc_info.Name = "btn_resc_info"; + this.btn_resc_info.SubItemsExpandWidth = 14; + this.btn_resc_info.Text = "资源管理"; + this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click); + // + // btn_role_resc + // + this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image"))); + this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_role_resc.Name = "btn_role_resc"; + this.btn_role_resc.SubItemsExpandWidth = 14; + this.btn_role_resc.Text = "角色授权"; + this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click); + // + // btn_user_role + // + this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image"))); + this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_user_role.Name = "btn_user_role"; + this.btn_user_role.SubItemsExpandWidth = 14; + this.btn_user_role.Text = "用户授权"; + this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click); + // + // btn_password_edit + // + this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image"))); + this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_password_edit.Name = "btn_password_edit"; + this.btn_password_edit.SubItemsExpandWidth = 14; + this.btn_password_edit.Text = "密码修改"; + this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click); + // + // buttonItemPasswordReset + // + this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image"))); + this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemPasswordReset.Name = "buttonItemPasswordReset"; + this.buttonItemPasswordReset.SubItemsExpandWidth = 14; + this.buttonItemPasswordReset.Text = "重置密码"; + this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click); + // + // ribbonPanel3 + // + this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel3.Controls.Add(this.ribbonBar4); + this.ribbonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel3.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel3.Name = "ribbonPanel3"; + this.ribbonPanel3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel3.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel3.Style.Class = ""; + this.ribbonPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel3.StyleMouseDown.Class = ""; + this.ribbonPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel3.StyleMouseOver.Class = ""; + this.ribbonPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel3.TabIndex = 40; + this.ribbonPanel3.Visible = false; + // + // ribbonBar4 + // + this.ribbonBar4.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(634, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + // + // + // + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.LabelWidth = 50; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.TextColor = System.Drawing.Color.Black; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel7 // this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3837,7 +3859,7 @@ this.dataGridViewX1.Name = "dataGridViewX1"; this.dataGridViewX1.ReadOnly = true; this.dataGridViewX1.RowTemplate.Height = 23; - this.dataGridViewX1.Size = new System.Drawing.Size(1125, 65); + this.dataGridViewX1.Size = new System.Drawing.Size(1125, 61); this.dataGridViewX1.TabIndex = 13; this.dataGridViewX1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX1_MouseDoubleClick); // @@ -3847,10 +3869,20 @@ this.statusStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripNumbers, this.toolStripStatusLabel5, + this.firstpage, + this.toolStripStatusLabel3, + this.prepage, + this.toolStripStatusLabel7, + this.nextpage, + this.toolStripStatusLabel9, + this.lastpage, + this.toolStripStatusLabel1, + this.pageinfo, + this.toolStripStatusLabel11, this.toolStripDropDownButton3}); - this.statusStrip2.Location = new System.Drawing.Point(0, 70); + this.statusStrip2.Location = new System.Drawing.Point(0, 66); this.statusStrip2.Name = "statusStrip2"; - this.statusStrip2.Size = new System.Drawing.Size(1125, 22); + this.statusStrip2.Size = new System.Drawing.Size(1125, 26); this.statusStrip2.SizingGrip = false; this.statusStrip2.TabIndex = 12; this.statusStrip2.Text = "statusStrip2"; @@ -3858,15 +3890,95 @@ // toolStripNumbers // this.toolStripNumbers.Name = "toolStripNumbers"; - this.toolStripNumbers.Size = new System.Drawing.Size(56, 17); + this.toolStripNumbers.Size = new System.Drawing.Size(56, 21); this.toolStripNumbers.Text = "管线类型"; // // toolStripStatusLabel5 // this.toolStripStatusLabel5.Name = "toolStripStatusLabel5"; - this.toolStripStatusLabel5.Size = new System.Drawing.Size(15, 17); + this.toolStripStatusLabel5.Size = new System.Drawing.Size(15, 21); this.toolStripStatusLabel5.Text = " |"; // + // firstpage + // + this.firstpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.firstpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.firstpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.firstpage.Name = "firstpage"; + this.firstpage.Size = new System.Drawing.Size(36, 21); + this.firstpage.Text = "首页"; + // + // toolStripStatusLabel3 + // + this.toolStripStatusLabel3.Name = "toolStripStatusLabel3"; + this.toolStripStatusLabel3.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel3.Text = "|"; + // + // prepage + // + this.prepage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.prepage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.prepage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.prepage.Name = "prepage"; + this.prepage.Size = new System.Drawing.Size(48, 21); + this.prepage.Text = "上一页"; + // + // toolStripStatusLabel7 + // + this.toolStripStatusLabel7.Name = "toolStripStatusLabel7"; + this.toolStripStatusLabel7.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel7.Text = "|"; + // + // nextpage + // + this.nextpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.nextpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.nextpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.nextpage.Name = "nextpage"; + this.nextpage.Size = new System.Drawing.Size(48, 21); + this.nextpage.Text = "下一页"; + // + // toolStripStatusLabel9 + // + this.toolStripStatusLabel9.Name = "toolStripStatusLabel9"; + this.toolStripStatusLabel9.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel9.Text = "|"; + // + // lastpage + // + this.lastpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.lastpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.lastpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.lastpage.Name = "lastpage"; + this.lastpage.Size = new System.Drawing.Size(36, 21); + this.lastpage.Text = "末页"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel1.Text = "|"; + // + // pageinfo + // + this.pageinfo.Name = "pageinfo"; + this.pageinfo.Size = new System.Drawing.Size(37, 21); + this.pageinfo.Text = "共*页"; + // + // toolStripStatusLabel11 + // + this.toolStripStatusLabel11.Name = "toolStripStatusLabel11"; + this.toolStripStatusLabel11.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel11.Text = "|"; + // // toolStripDropDownButton3 // this.toolStripDropDownButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); @@ -3880,7 +3992,6 @@ this.toolStripDropDownButton3.Name = "toolStripDropDownButton3"; this.toolStripDropDownButton3.Size = new System.Drawing.Size(75, 21); this.toolStripDropDownButton3.Text = "导出xls文件"; - this.toolStripDropDownButton3.Visible = false; this.toolStripDropDownButton3.Click += new System.EventHandler(this.toolStripDropDownButton3_Click); // // expandableSplitter2 @@ -4457,7 +4568,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(34051, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(34645, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4551,7 +4662,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(34050, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(34644, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5737,18 +5848,6 @@ this.pictureBox1.TabStop = false; this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - this.layerTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseClick); - this.layerTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -5791,10 +5890,10 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); @@ -6311,6 +6410,16 @@ private ButtonItem buttonItem12; private ButtonItem buttonItem13; private ButtonItem buttonItem14; + private ToolStripStatusLabel firstpage; + private ToolStripStatusLabel toolStripStatusLabel3; + private ToolStripStatusLabel prepage; + private ToolStripStatusLabel toolStripStatusLabel7; + private ToolStripStatusLabel nextpage; + private ToolStripStatusLabel toolStripStatusLabel9; + private ToolStripStatusLabel lastpage; + private ToolStripStatusLabel toolStripStatusLabel11; + private ToolStripStatusLabel toolStripStatusLabel1; + private ToolStripStatusLabel pageinfo; } } diff --git a/PaginationFeaturesUtil.cs b/PaginationFeaturesUtil.cs new file mode 100644 index 0000000..5ba7831 --- /dev/null +++ b/PaginationFeaturesUtil.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using GeoScene.Data; + +namespace Cyberpipe +{ + class PaginationFeaturesUtil + { + private static int _total = 0; + private static int _beginIndex = 1; + private static int _pagesize = 10; + private static MainFrm.PageControlStuct _pageControl; + private static MainFrm.DataGridViewDelegate _mInitDataGridViewX1; + private static PaginationFeaturesUtil _singlePagination = null; + private static string _queryInfo = ""; + private static string _layerName = ""; + private static GSOFeatures _features; + private static string[] _fields; + public static PaginationFeaturesUtil InitPagination(int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1, string queryInfo, string layerName, GSOFeatures features,string [] fields) + { + if (_singlePagination == null) + { + _singlePagination = new PaginationFeaturesUtil( total, pageControl, mInitDataGridViewX1, queryInfo, layerName, features, fields); + _pageControl.firstpage.Click += _singlePagination.FirstPageButtonClick; + _pageControl.nextpage.Click += _singlePagination.NextPageButtonClick; + _pageControl.prepage.Click += _singlePagination.PrePageButtonClick; + _pageControl.lastpage.Click += _singlePagination.LastPageButtonClick; + return _singlePagination; + } + _queryInfo = queryInfo; + _layerName = layerName; + _features = features; + _fields = fields; + _total = total; + return _singlePagination; + } + + private PaginationFeaturesUtil(int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1, string queryInfo, string layerName, GSOFeatures features, string[] fields) + { + _pageControl = pageControl; + _mInitDataGridViewX1 = mInitDataGridViewX1; + _queryInfo = queryInfo; + _layerName = layerName; + _total = total; + _features = features; + _fields = fields; + } + + /// + /// 执行sql语句,将执行的分页结果加载到指定datatable上 + /// + public void FillDataGridView() + { + DataTable table = ConvertGsoFeatures2DataTable(_features, _fields, _beginIndex, _pagesize); + ComputePageInfo(_beginIndex, _pagesize, _total); + _mInitDataGridViewX1(table, _queryInfo, _layerName, true); + //控制首页、上一页、下一页、末页按钮的显示 + _pageControl.nextpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.lastpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.firstpage.Visible = _beginIndex > 1; + _pageControl.prepage.Visible = _beginIndex > 1; + } + private void ComputePageInfo(int begin, int pagesize, int total) + { + int pageCount = (total - 1) / pagesize + 1; + int curPage = begin / pagesize + 1; + _pageControl.pageinfo.Text = "每页" + pagesize + "条," + curPage + "/" + pageCount + "页"; + } + /// + /// 分页查询 + /// + /// + /// + /// + /// + /// + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field, int begin, int pagesize) + { + if (features == null || features.Length == 0 || field.Length == 0) return null; + DataTable result = new DataTable(); + foreach (string t in field) + { + result.Columns.Add(t, typeof(String)); + } + int i = 0; + while (i < begin) i++; + for (; i < features.Length && i < begin + pagesize; i++) + { + GSOFeature feature = features[i]; + string[] values = new string[field.Length]; + for (int j = 0; j < field.Length; j++) + { + string value = feature.GetFieldAsString(field[j]); + values[j] = value; + } + result.Rows.Add(values); + } + return result; + } + + /// + /// 重置查询条件 + /// + public static void ResetPagination() + { + _total = 0; + _beginIndex = 1; + + } + + private void FirstPageButtonClick(object sender, EventArgs e) + { + _beginIndex = 1; + FillDataGridView(); + } + private void NextPageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex + _pagesize; + FillDataGridView(); + } + private void PrePageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex - _pagesize; + FillDataGridView(); + } + private void LastPageButtonClick(object sender, EventArgs e) + { + while (_beginIndex < _total - _pagesize + 1) _beginIndex += _pagesize; + FillDataGridView(); + } + + } +} diff --git a/PaginationUtil.cs b/PaginationUtil.cs new file mode 100644 index 0000000..e1a85ed --- /dev/null +++ b/PaginationUtil.cs @@ -0,0 +1,280 @@ +using System; +using System.Collections.Generic; +using System.Data; +using GeoScene.Globe; + +namespace Cyberpipe +{ + class PaginationUtil + { + private static int _total = 0; + private static int _beginIndex = 1; + private static int _pagesize = 10; + private static string _sql = ""; + private static MainFrm.PageControlStuct _pageControl; +// private static DataGridViewX _dataGridView1; + private static MainFrm.DataGridViewDelegate _mInitDataGridViewX1; + private static PaginationUtil _singlePagination = null; + private static string _queryInfo=""; + private static string _layerName=""; + //定义单例模式,防止点击事件被多次绑定 + public static PaginationUtil InitPagination(string sql, int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1,string queryInfo,string layerName) + { + if (_singlePagination == null) + { + _singlePagination = new PaginationUtil(sql, total, pageControl, mInitDataGridViewX1, queryInfo, layerName); + _pageControl.firstpage.Click += _singlePagination.FirstPageButtonClick; + _pageControl.nextpage.Click += _singlePagination.NextPageButtonClick; + _pageControl.prepage.Click += _singlePagination.PrePageButtonClick; + _pageControl.lastpage.Click += _singlePagination.LastPageButtonClick; + return _singlePagination; + } + _queryInfo = queryInfo; + _layerName = layerName; + _sql = sql; + _total = total; + return _singlePagination; + } + + private PaginationUtil(string sql, int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1,string queryInfo,string layerName) + { + _pageControl = pageControl; + _mInitDataGridViewX1 = mInitDataGridViewX1; + _queryInfo = queryInfo; + _layerName = layerName; + _sql = sql; + _total = total; + + } + + /// + /// 执行sql语句,将执行的分页结果加载到指定datatable上 + /// + public void FillDataGridView() + { + string sql = PageQuerySql(_sql, _beginIndex, _pagesize); + ComputePageInfo(_beginIndex,_pagesize,_total); + DataTable table = OledbHelper.QueryTable(sql); +// _dataGridView1.DataSource = table; + _mInitDataGridViewX1(table, _queryInfo, _layerName, true); + //控制首页、上一页、下一页、末页按钮的显示 + _pageControl.nextpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.lastpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.firstpage.Visible = _beginIndex > 1; + _pageControl.prepage.Visible = _beginIndex > 1; + } + /// + /// 查询总记录数 + /// + /// + /// +// public static int Count(string sql) +// { +// DataTable table = OledbHelper.QueryTable(sql); +// int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); +// return result; +// } + /// + /// 将一般查询语句转换为分页查询语句 + /// + /// 原sql语句 + /// 开始索引 + /// 每页记录数 + /// + private static string PageQuerySql(string sql, int begin, int pageSize) + { + int end = begin + pageSize - 1; + string result = "select * from (select rownum rn,A.* from (" + sql + ") A) B where rn between " + begin + " and " + end; + return result; + + } + /// + /// 查询的分页信息 + /// + /// + /// + /// + private void ComputePageInfo(int begin, int pagesize, int total) + { + int pageCount = (total - 1) / pagesize + 1; + int curPage = begin / pagesize + 1; + _pageControl.pageinfo.Text = "每页" + pagesize + "条," + curPage + "/" + pageCount + "页"; + } + + /// + /// 重置查询条件 + /// + public static void ResetPagination() + { + _total = 0; + _beginIndex = 1; + + } + + private void FirstPageButtonClick(object sender, EventArgs e) + { + _beginIndex = 1; + FillDataGridView(); + } + private void NextPageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex + _pagesize; + FillDataGridView(); + } + private void PrePageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex - _pagesize; + FillDataGridView(); + } + private void LastPageButtonClick(object sender, EventArgs e) + { + while (_beginIndex < _total - _pagesize + 1) _beginIndex += _pagesize; + FillDataGridView(); + } + + + + /// + /// 获取原查询的语句 + /// + /// + /// + /// + /// + /// + public static string GetQuerySql(GSOGlobeControl mGlobeControl, string layerName, + string filedObject, string filedValue) + { + string sql = ""; + if (filedObject == "") + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName; + } + else + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + filedObject + " like '%" + + filedValue + "%'"; + } + return sql; + } + + public static string GetQuerySql(GSOGlobeControl mGlobeControl, string layerName, + string filedObject, string mathT, string leftFiledValue, string rightFiledValue) + { + string sql = ""; + if (mathT == "区间") + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + filedObject + ">" + leftFiledValue + + "and " + filedObject + "<" + rightFiledValue; + } + else + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + filedObject + mathT + rightFiledValue; + } + return sql; + } + + public static string GetQuerySql(GSOGlobeControl mGlobeControl, + string layerName, string filedObject, List filedValueList) + { + string sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where 1>2 "; + foreach (string value in filedValueList) + { + if (value == "无") + { + sql += " or " + filedObject + " is null"; + } + else + { + sql += " or " + filedObject + " = '" + value + "'"; + } + } + return sql; + } + + public static string GetQuerySql(GSOGlobeControl mGlobeControl, string layerName, string whereSql) + { + string sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + whereSql; + + return sql; + } + /// + /// 查询记录总数 + /// + /// + /// + /// + /// + public static int CountSql(string layerName, + string filedObject, string filedValue) + { + string sql = ""; + if (filedObject == "") + { + sql = "select count(1) from " + layerName; + } + else + { + sql = "select count(1) from " + layerName + " where " + filedObject + " like '%" + + filedValue + "%'"; + } + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + + public static int CountSql(string layerName, + string filedObject, string mathT, string leftFiledValue, string rightFiledValue) + { + string sql = ""; + if (mathT == "区间") + { + sql = "select count(1) from " + layerName + " where " + filedObject + ">" + leftFiledValue + + "and " + filedObject + "<" + rightFiledValue; + } + else + { + sql = "select count(1) from " + layerName + " where " + filedObject + mathT + rightFiledValue; + } + + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + public static int CountSql(string layerName, string filedObject, List filedValueList) + { + string sql = "select count(1) from " + layerName + " where 1>2 "; + foreach (string value in filedValueList) + { + if (value == "无") + { + sql += " or " + filedObject + " is null"; + } + else + { + sql += " or " + filedObject + " = '" + value + "'"; + } + } + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + + public static int CountSql(string layerName, string whereSql) + { + string sql = "select count(1) from " + layerName + " where " + whereSql; + + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + } +} diff --git a/bin/x86/Debug/glVersion.txt b/bin/x86/Debug/glVersion.txt index cd82eca..755455e 100644 --- a/bin/x86/Debug/glVersion.txt +++ b/bin/x86/Debug/glVersion.txt Binary files differ diff --git a/ClassSearchAnalysis.cs b/ClassSearchAnalysis.cs index cb8b06d..7e68d2f 100644 --- a/ClassSearchAnalysis.cs +++ b/ClassSearchAnalysis.cs @@ -393,7 +393,7 @@ /// /// /// - public static DataTable convertGSOFeatures2DataTable(GSOFeatures features, string[] field) + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field) { if (features == null || features.Length == 0 || field.Length == 0) return null; DataTable result = new DataTable(); @@ -415,29 +415,30 @@ return result; } - public static string[] getFields(string caption, GSOGlobeControl m_globeControl) + public static string[] GetFields(string caption, GSOGlobeControl mGlobeControl) { - GSODataset ds; - GSOFeatureDataset sourcefDataset; - GSOLayer m_layer = m_globeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 - if (m_layer == null) return null; - GSOFeatureLayer flayer = m_layer as GSOFeatureLayer; - ds = m_layer.Dataset; - sourcefDataset = ds as GSOFeatureDataset; - sourcefDataset.Open(); - string fields = ""; - for (int j = 0; j < sourcefDataset.FieldCount; j++) + GSOLayer mLayer = mGlobeControl.Globe.Layers.GetLayerByCaption(caption);//获取当前选择的layer图层 + if (mLayer == null) return null; + var ds = mLayer.Dataset; + var sourcefDataset = ds as GSOFeatureDataset; + if (sourcefDataset != null) { - GSOFieldAttr fieldef = sourcefDataset.GetField(j); - string fieldName = fieldef.Name; - if (j < sourcefDataset.FieldCount - 1) + sourcefDataset.Open(); + string fields = ""; + for (int j = 0; j < sourcefDataset.FieldCount; j++) { - fields += fieldName + ","; + GSOFieldAttr fieldef = sourcefDataset.GetField(j); + string fieldName = fieldef.Name; + if (j < sourcefDataset.FieldCount - 1) + { + fields += fieldName + ","; + } + else + fields += fieldName; } - else - fields += fieldName; + return fields.Trim().Split(','); } - return fields.Trim().Split(','); + return null; } #endregion diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index f9e0618..a2e0440 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -44,7 +44,7 @@ DEBUG;TRACE prompt 4 - x86 + AnyCPU AllRules.ruleset @@ -1181,6 +1181,8 @@ + + Form diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 42f5d9a..409acc5 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs index 56848dc..6a93188 100644 --- a/FrmAllPipelineStatis.cs +++ b/FrmAllPipelineStatis.cs @@ -22,12 +22,14 @@ private List pipeLayerNames; private static bool isSpaceQuery; - public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { isSpaceQuery = true; if (frm == null) { - frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames); + frm = new FrmAllPipelineStatis(ctl,polygon, InitDataGridViewX1,pipeLayerNames,pageControl); frm.Show(ctl.Parent); } else if (frm.WindowState == FormWindowState.Minimized) @@ -36,7 +38,7 @@ } } - public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames) + public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames, MainFrm.PageControlStuct pageControl) { InitializeComponent(); Text = isSpaceQuery ? "空间查询" : "管线距离统计"; @@ -45,6 +47,7 @@ m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; this.pipeLayerNames = pipeLayerNames; + _pageControl = pageControl; } @@ -87,6 +90,7 @@ LogError.PublishError(ex); } } + private void chartAllAreaPipeline_MouseClick(object sender, MouseEventArgs e) { HitTestResult result = chartAllAreaPipeline.HitTest(e.X, e.Y, true); @@ -95,20 +99,28 @@ //GSOFeatures fs = list[indexHit]; - string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线"; + string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel + "管线"; GSOFeatures fs = nameAndPipesMap[pipetype]; - string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1); - DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields); - - if (table != null && table.Rows.Count > 0) + string[] fields = ClassSearchAnalysis.GetFields(pipetype, globeControl1); +// DataTable table = ClassSearchAnalysis.ConvertGsoFeatures2DataTable(fs, fields); +// if (table != null && table.Rows.Count > 0) +// { +// string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" +// + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") +// + " 米"; +// m_InitDataGridViewX1(table, strLable, pipetype, true); +// } + PaginationFeaturesUtil.ResetPagination(); + int total = fs.Length; + if (total > 0) { - string strLable = "共有:" + Convert.ToString(table.Rows.Count) + "条记录" + string strLable = "共有:" + Convert.ToString(total) + "条记录" + " 管线里程:" + chartAllAreaPipeline.Series["管线"].Points[indexHit].YValues[0].ToString("0.00") + " 米"; - m_InitDataGridViewX1(table, strLable, pipetype, true); + PaginationFeaturesUtil pagination = PaginationFeaturesUtil.InitPagination(total, _pageControl, m_InitDataGridViewX1, strLable, pipetype,fs,fields); + pagination.FillDataGridView(); } - } private void chartAllAreaPipeline_MouseMove(object sender, MouseEventArgs e) diff --git a/FrmAllWorkWellStatis.cs b/FrmAllWorkWellStatis.cs index 9798f59..25dce60 100644 --- a/FrmAllWorkWellStatis.cs +++ b/FrmAllWorkWellStatis.cs @@ -18,13 +18,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - public FrmAllWorkWellStatis(GSOGlobeControl ctl,GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmAllWorkWellStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } private void FrmAllPipelineStatis_Load(object sender, EventArgs e) @@ -78,7 +80,7 @@ //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chartAllAreaPipeline.Series["井盖"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -100,19 +102,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetFieldDefn("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// +// } +// +// DataTable dt = OledbHelper.QueryTable(sql); +// string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(dt, strLable, layername, true); + List list = new List(); for (int i = 0; i < fs.Length; i++) { - if (fs[i].GetFieldDefn("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; - + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable dt = OledbHelper.QueryTable(sql); - string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(dt.Rows.Count) + "条记录"; - m_InitDataGridViewX1(dt, strLable, layername, true); + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 井盖类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号", list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } diff --git a/FrmBasicQuery.cs b/FrmBasicQuery.cs index cc8d3ff..cb07576 100644 --- a/FrmBasicQuery.cs +++ b/FrmBasicQuery.cs @@ -17,7 +17,8 @@ private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; /// /// 单例模式 创建并显示窗体 /// @@ -26,11 +27,11 @@ /// /// /// - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmBasicQuery(_ctl, InitDataGridViewX1); + frm = new FrmBasicQuery(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -42,11 +43,12 @@ } } - public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmBasicQuery(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e) @@ -120,7 +122,7 @@ { DataRow dr = table.Rows[i]; string colString1 = dr[0].ToString(); - if (colString1 == null || colString1.Trim() == "") + if (colString1.Trim() == "") { continue; } @@ -129,7 +131,7 @@ } string strFiled = cbxFields.SelectedItem.ToString(); - if (table.Rows[0][strFiled].GetType() == typeof(string)) + if (table.Rows[0][strFiled] is string) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = false; @@ -138,8 +140,8 @@ checkBoxX5.Enabled = false; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(int) || table.Rows[0][strFiled].GetType() == typeof(float) - || table.Rows[0][strFiled].GetType() == typeof(double)) + else if (table.Rows[0][strFiled] is int || table.Rows[0][strFiled] is float + || table.Rows[0][strFiled] is double) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -148,7 +150,7 @@ checkBoxX5.Enabled = true; checkBoxX6.Enabled = true; } - else if (table.Rows[0][strFiled].GetType() == typeof(decimal)) + else if (table.Rows[0][strFiled] is decimal) { checkBoxX1.Enabled = true; checkBoxX2.Enabled = true; @@ -209,13 +211,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, - cbxFields.Text + s + lbxFieldValues.SelectedItem); - - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, cbxLayers.Text, +// cbxFields.Text + s + lbxFieldValues.SelectedItem); +// +// if (table != null && table.Rows.Count > 0) +// { +// strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + if (total > 0) { - strLable = cbxLayers.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, cbxLayers.Text, true); + string strLable = cbxLayers.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, cbxLayers.Text,cbxFields.Text + s + lbxFieldValues.SelectedItem); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, cbxLayers.Text); + pagination.FillDataGridView(); } else { @@ -270,7 +281,7 @@ /// private void FrmBasicQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmCodingQuery.cs b/FrmCodingQuery.cs index d4ec095..9d6cc0c 100644 --- a/FrmCodingQuery.cs +++ b/FrmCodingQuery.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar; using GeoScene.Globe; - +using DevComponents.DotNetBar.Controls; namespace Cyberpipe { public partial class FrmCodingQuery : Office2007Form @@ -12,15 +12,19 @@ GSOGlobeControl globeControl1; List layerNames = new List(); private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - static FrmCodingQuery frm; - string strLable = ""; - DataTable table = new DataTable(); +// DataGridViewX _dataGridView1; +// PanelEx _panel; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + static FrmCodingQuery frm; +// string strLable = ""; +// DataTable table = new DataTable(); + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmCodingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmCodingQuery(_ctl, _list, mInitDataGridViewX1, pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +36,13 @@ } } - public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmCodingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate mInitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; - m_InitDataGridViewX1 = InitDataGridViewX1; + m_InitDataGridViewX1 = mInitDataGridViewX1; + _pageControl = pageControl; } private void FrmCodingQuery_Load(object sender, EventArgs e) @@ -50,7 +55,8 @@ } private void FrmCodingQuery_Closing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); + PaginationUtil.ResetPagination(); frm = null; } @@ -70,15 +76,22 @@ return; } - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); - if (table != null && table.Rows.Count > 0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + if (total > 0) { - strLable = comboBoxEx1.Text + "共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "编号", textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1,strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } - else - { - } + } catch (Exception ex) { diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 75d7949..5a092fc 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -14,15 +14,16 @@ List layerNames = new List(); int value; static FrmDiameterQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmDiameterQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -34,12 +35,13 @@ } } - public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmDiameterQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -158,13 +160,22 @@ string mathT = comboBoxEx2.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", - mathT, textBoxX2.Text, textBoxX1.Text); - - if (table!=null && table.Rows.Count>0) +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text, "管径_毫米", +// mathT, textBoxX2.Text, textBoxX1.Text); +// +// if (table!=null && table.Rows.Count>0) +// { +// strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; +// m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + if (total > 0) { - strLable=comboBoxEx1.Text+" 共有:" + table.Rows.Count + "条"; - m_InitDataGridViewX1(table,strLable,comboBoxEx1.Text,true); + string strLable = comboBoxEx1.Text + "共有:" + total + "条"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text, "管径_毫米",mathT, textBoxX2.Text, textBoxX1.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -187,7 +198,7 @@ /// private void FrmDiameterQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } diff --git a/FrmFittingQuery.cs b/FrmFittingQuery.cs index 8645011..f836f84 100644 --- a/FrmFittingQuery.cs +++ b/FrmFittingQuery.cs @@ -12,15 +12,17 @@ GSOGlobeControl globeControl1; List layerNames = new List(); static FrmFittingQuery frm; - DataTable table = new DataTable(); - string strLable = ""; +// DataTable table = new DataTable(); +// string strLable = ""; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1); + frm = new FrmFittingQuery(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +34,13 @@ } } - public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmFittingQuery(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 查询按钮事件处理 @@ -54,17 +57,26 @@ return; } GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxEx1.Text.Trim()); - if (layer != null) + if (layer == null) return; +// ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "", ""); + if (total > 0) { - ClassSearchAnalysis.ResultDataTable(out table, globeControl1, comboBoxEx1.Text.Trim(), "", ""); - if (table != null && table.Rows.Count > 0) - { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); - } - else - { - } + string strLable = comboBoxEx1.Text + " 共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "", ""); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, + m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); + } + else + { + MessageBox.Show("没有查到符合条件的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) @@ -101,7 +113,7 @@ /// private void FrmFittingQuery_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmMaterialSel.cs b/FrmMaterialSel.cs index d23f385..c5af730 100644 --- a/FrmMaterialSel.cs +++ b/FrmMaterialSel.cs @@ -14,13 +14,14 @@ static FrmMaterialSel frm; private MainFrm.DataGridViewDelegate m_InitDataGridViewX1; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; + private MainFrm.PageControlStuct _pageControl; - public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public static void ShowForm(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1); + frm = new FrmMaterialSel(_ctl, _list, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -32,12 +33,13 @@ } } - public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmMaterialSel(GSOGlobeControl _ctl, List _list, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = _ctl; layerNames = _list; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -142,13 +144,22 @@ filedValueList.Add(listBox2.Items[i].ToString()); } - ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, - comboBoxEx1.Text.Trim(), "材质", filedValueList); +// ClassSearchAnalysis.ResultDataTableContainNull(out table, globeControl1, +// comboBoxEx1.Text.Trim(), "材质", filedValueList); - if (table != null && table.Rows.Count > 0) +// if (table != null && table.Rows.Count > 0) +// { +// strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; +// m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(comboBoxEx1.Text.Trim(), "材质", filedValueList); + if (total > 0) { - strLable = comboBoxEx1.Text + " 共有:" + table.Rows.Count + "个"; - m_InitDataGridViewX1(table, strLable, comboBoxEx1.Text, true); + string strLable = comboBoxEx1.Text + "共有:" + total + "个"; + string sql = PaginationUtil.GetQuerySql(globeControl1, comboBoxEx1.Text.Trim(), "材质", filedValueList); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, comboBoxEx1.Text); + pagination.FillDataGridView(); } else { @@ -178,7 +189,7 @@ /// private void FrmMaterialSel_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } /// diff --git a/FrmQuerySQL.cs b/FrmQuerySQL.cs index 3c05684..591e731 100644 --- a/FrmQuerySQL.cs +++ b/FrmQuerySQL.cs @@ -16,14 +16,14 @@ public string currentLayerName; static FrmQuerySQL frm; DataTable table = new DataTable(); - string strLable = ""; +// string strLable = ""; MainFrm.DataGridViewDelegate m_InitDataGridViewX1; - - public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + private MainFrm.PageControlStuct _pageControl; + public static void ShowForm(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { if (frm == null) { - frm = new FrmQuerySQL(_ctl, InitDataGridViewX1); + frm = new FrmQuerySQL(_ctl, InitDataGridViewX1,pageControl); frm.Show(_ctl.Parent); } else @@ -35,11 +35,12 @@ } } - public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmQuerySQL(GSOGlobeControl _ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); m_globeControl = _ctl; m_InitDataGridViewX1 = InitDataGridViewX1; + _pageControl = pageControl; } #region 符号按钮双击事件 @@ -227,12 +228,21 @@ { currentLayerName = cbox_Layers.SelectedItem.ToString(); - ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); +// ClassSearchAnalysis.ResultDataTable(out table, m_globeControl, currentLayerName, textBox_WhereClause.Text); - if (table != null && table.Rows.Count != 0) +// if (table != null && table.Rows.Count != 0) +// { +// strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; +// m_InitDataGridViewX1(table, strLable, currentLayerName, true); +// } + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(currentLayerName, textBox_WhereClause.Text); + if (total > 0) { - strLable = currentLayerName + " || 共有:" + table.Rows.Count + "记录"; - m_InitDataGridViewX1(table, strLable, currentLayerName, true); + string strLable = currentLayerName + " || 共有:" + total + "记录"; + string sql = PaginationUtil.GetQuerySql(m_globeControl, currentLayerName, textBox_WhereClause.Text); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, currentLayerName); + pagination.FillDataGridView(); } else { @@ -290,7 +300,7 @@ /// private void Frm_QuerySQL_FormClosing(object sender, FormClosingEventArgs e) { - m_InitDataGridViewX1(table, strLable, "", false); + m_InitDataGridViewX1(null, "", "", false); frm = null; } } diff --git a/FrmValveStatistics.cs b/FrmValveStatistics.cs index f4770a9..369a7ee 100644 --- a/FrmValveStatistics.cs +++ b/FrmValveStatistics.cs @@ -17,23 +17,15 @@ private Dictionary map; private GSOGlobeControl globeControl1; private GSOGeoPolygon3D polygon; + private MainFrm.PageControlStuct _pageControl; - //public FrmValveStatistics(Dictionary wellLen, List _list, - // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate initDataGridViewX1) - //{ - // InitializeComponent(); - // workWellLengthAndType = wellLen; - // list = _list; - // globeControl1 = ctl; - // m_InitDataGridViewX1 = initDataGridViewX1; - //} - - public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1) + public FrmValveStatistics(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, MainFrm.PageControlStuct pageControl) { InitializeComponent(); globeControl1 = ctl; m_InitDataGridViewX1 = InitDataGridViewX1; this.polygon = polygon; + _pageControl = pageControl; } /// /// 窗体初始化事件处理 @@ -94,7 +86,7 @@ { //GSOFeatures fs = list[indexHit]; - string sql = ""; +// string sql = ""; string pipetype = chaFamenStatis.Series["阀门"].Points[indexHit].AxisLabel; GSOFeatures fs = map[pipetype]; @@ -107,18 +99,35 @@ return; } - sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; - sql += " where 1>2 "; - for (int i = 0; i < fs.Length; i++) - { - if (fs[i].GetValue("编号") == null) continue; - sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// sql = "select " + GetpipeLineFields.GetFields(layername, globeControl1) + " from " + layer.Name; +// sql += " where 1>2 "; +// for (int i = 0; i < fs.Length; i++) +// { +// if (fs[i].GetValue("编号") == null) continue; +// sql += " or 编号 = '" + fs[i].GetValue("编号") + "'"; +// } +// +// DataTable table = OledbHelper.QueryTable(sql); +// string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; +// m_InitDataGridViewX1(table, strLable, layername, true); + + + List list = new List(); + for (int i = 0; i < fs.Length; i++) + { + string value = (string)fs[i].GetValue("编号"); + if (value == null) continue; + list.Add(value); } - - DataTable table = OledbHelper.QueryTable(sql); - string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(table.Rows.Count) + "条记录"; - m_InitDataGridViewX1(table, strLable, layername, true); - + PaginationUtil.ResetPagination(); + int total = PaginationUtil.CountSql(layername, "编号", list); + if (total > 0) + { + string strLable = " 阀门类型:" + pipetype + "||共有:" + Convert.ToString(total) + "条记录"; + string sql = PaginationUtil.GetQuerySql(globeControl1, layername, "编号",list); + PaginationUtil pagination = PaginationUtil.InitPagination(sql, total, _pageControl, m_InitDataGridViewX1, strLable, layername); + pagination.FillDataGridView(); + } } } /// diff --git a/Frmpipediameterstatis.cs b/Frmpipediameterstatis.cs index 631a996..48ac35f 100644 --- a/Frmpipediameterstatis.cs +++ b/Frmpipediameterstatis.cs @@ -17,7 +17,9 @@ List pipeLayerNames ; static Frmpipediameterstatis frm; - public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers,int visibleId) +// private MainFrm.PageControlStuct _pageControl; + + public static void ShowForm(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { if (frm == null) { @@ -30,11 +32,12 @@ } } - public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) + public Frmpipediameterstatis(GSOGlobeControl _globeControl1, List pipeLayers, int visibleId) { InitializeComponent(); globeControl1 = _globeControl1; pipeLayerNames = pipeLayers; +// _pageControl = pageControl; if (visibleId == 0) { buttonX9.Visible = false; @@ -459,12 +462,9 @@ bool b1 = false, b2 = false; b1 = float.TryParse(text.Text, out oldf); b2 = float.TryParse(text.Text + e.KeyChar, out f); - if (b2 == false) + if (!b2) { - if (b1) - e.Handled = true; - else - e.Handled = false; + e.Handled = b1; } } } diff --git a/MainFrm.cs b/MainFrm.cs index 57d21ac..24f70a6 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -101,6 +101,18 @@ float mouseDownX1, mouseDownY1; float mouseDownX2, mouseDownY2; + //控制分页的数据结构,首页、末页、上一页、下一页 + public struct PageControlStuct + { + public ToolStripStatusLabel firstpage; + public ToolStripStatusLabel prepage; + public ToolStripStatusLabel nextpage; + public ToolStripStatusLabel lastpage; + public ToolStripStatusLabel pageinfo; + public ToolStripStatusLabel toolStripNumbers; + public ToolStripStatusLabel toolStripFeatureLength; + } + /// /// /// @@ -1827,31 +1839,36 @@ { if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon || e.Polygon == null) return; GSOGeoPolygon3D polygon = e.Polygon; - + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; switch (trackflag) { case "valvequery": - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1); + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, InitDataGridViewX1,pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineDistanceStatistics": - FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm1.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "PipelineSpatialQuery": - FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames); + FrmAllPipelineStatis.ShowForm(globeControl1, polygon, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); globeControl1.Globe.ClearAnalysis(); globeControl1.Globe.Action = EnumAction3D.ActionNull; break; case "workwellquery": - FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1); + FrmAllWorkWellStatis frmWell = new FrmAllWorkWellStatis(globeControl1, polygon, InitDataGridViewX1, pageControl); frmWell.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; @@ -5394,6 +5411,8 @@ FrmKeywordQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); } + + /// /// 编号查询 /// @@ -5402,8 +5421,15 @@ private void 编号查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "编号查询"); - - FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; +// pageControl.toolStripFeatureLength = toolStripFeatureLength; + pageControl.toolStripNumbers = toolStripNumbers; + FrmCodingQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 坐标查询 @@ -5424,8 +5450,13 @@ private void 附属物查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "附属物查询"); - - FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmFittingQuery.ShowForm(globeControl1, Utility.instrumenLayerNames, InitDataGridViewX1, pageControl); } /// /// 管径查询 @@ -5435,8 +5466,13 @@ private void 管径查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径查询"); - - FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmDiameterQuery.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1, pageControl); } /// /// 材质查询 @@ -5446,8 +5482,13 @@ private void 材质查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "材质查询"); - - FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmMaterialSel.ShowForm(globeControl1, Utility.m_PipelineLayerNames, InitDataGridViewX1,pageControl); } /// /// 基本查询 @@ -5457,8 +5498,13 @@ private void 基本查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "基本查询"); - - FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmBasicQuery.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 复合查询 @@ -5468,8 +5514,13 @@ private void 复合查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "复合查询"); - - FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmQuerySQL.ShowForm(globeControl1, InitDataGridViewX1, pageControl); } /// /// 关联查询 @@ -5493,8 +5544,7 @@ GSOLayer layer = null; globeControl1.Globe.GetSelectObject(j, out feature, out layer); - if (feature == null && feature.Geometry == null || (feature.Geometry.Type == EnumGeometryType.GeoPolygon3D - || feature.Geometry.Type == EnumGeometryType.GeoWater)) + if (feature == null || feature.Geometry == null || feature.Geometry.Type == EnumGeometryType.GeoPolygon3D || feature.Geometry.Type == EnumGeometryType.GeoWater) return; ClassSearchAnalysis.ResultRelationAnalysis(globeControl1, feature, Utility.valueLayerNames, Utility.workwellLayerNames, Utility.instrumenLayerNames, Utility.pipefittingLayerNames, Utility.m_PipelineLayerNames, valueAllowance); @@ -5556,7 +5606,13 @@ private void 管线长度统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管线长度统计"); - FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, InitDataGridViewX1, Utility.m_PipelineLayerNames,pageControl); frm.Show(this); } /// @@ -5572,6 +5628,7 @@ globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; } + /// /// 阀门数量全区域统计 /// @@ -5580,11 +5637,18 @@ private void 阀门数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, InitDataGridViewX1, pageControl); frm.Show(this); globeControl1.Globe.Action = EnumAction3D.ActionNull; } + /// /// 阀门数量绘制区域统计 /// @@ -5593,7 +5657,6 @@ private void 阀门数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "阀门数量统计"); - trackflag = "valvequery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5605,7 +5668,13 @@ /// private void 井盖数量统计ToolStripMenuItem_Click(object sender, EventArgs e) { - FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1); + PageControlStuct pageControl = new PageControlStuct(); + pageControl.firstpage = firstpage; + pageControl.lastpage = lastpage; + pageControl.nextpage = nextpage; + pageControl.prepage = prepage; + pageControl.pageinfo = pageinfo; + FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, InitDataGridViewX1,pageControl); frm.Show(this); } /// @@ -5616,7 +5685,6 @@ private void 井盖数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "井盖数量统计"); - trackflag = "workwellquery"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; @@ -5629,7 +5697,6 @@ private void 管径分段统计ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 0); } /// @@ -5640,7 +5707,6 @@ private void 管径分段统计ToolStripMenuItem1_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "管径分段统计"); - trackflag = null; Frmpipediameterstatis.ShowForm(globeControl1, Utility.m_PipelineLayerNames, 1); } diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index 1c8ad99..abcf2ec 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -90,6 +90,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -244,26 +245,6 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_role_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem(); - this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem(); - this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); - this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -319,6 +300,26 @@ this.buttonItemXT4 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItemXT4_1 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItemXT4_2 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_role_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem(); + this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem(); + this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); + this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); this.gxdw_ribbonbar = new DevComponents.DotNetBar.RibbonBar(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); @@ -386,6 +387,16 @@ this.statusStrip2 = new System.Windows.Forms.StatusStrip(); this.toolStripNumbers = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabel5 = new System.Windows.Forms.ToolStripStatusLabel(); + this.firstpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.prepage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel7 = new System.Windows.Forms.ToolStripStatusLabel(); + this.nextpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel9 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lastpage = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.pageinfo = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel11 = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripDropDownButton3 = new System.Windows.Forms.ToolStripStatusLabel(); this.expandableSplitter2 = new DevComponents.DotNetBar.ExpandableSplitter(); this.miniToolStrip = new System.Windows.Forms.StatusStrip(); @@ -518,7 +529,6 @@ this.labelX17 = new DevComponents.DotNetBar.LabelX(); this.panelEx4 = new DevComponents.DotNetBar.PanelEx(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -529,10 +539,10 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel15.SuspendLayout(); this.ribbonPanel7.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); @@ -957,6 +967,18 @@ this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); this.layerSensorTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + this.layerTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseClick); + this.layerTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1131,7 +1153,7 @@ this.区域分析ToolStripMenuItem, this.清除分析ToolStripMenuItem}); this.toolRightMenu.Name = "toolRightMenu"; - this.toolRightMenu.Size = new System.Drawing.Size(149, 290); + this.toolRightMenu.Size = new System.Drawing.Size(153, 312); // // 量算ToolStripMenuItem // @@ -1144,7 +1166,7 @@ this.水平面积ToolStripMenuItem1, this.地表面积ToolStripMenuItem1}); this.量算ToolStripMenuItem.Name = "量算ToolStripMenuItem"; - this.量算ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.量算ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.量算ToolStripMenuItem.Text = "量算"; // // 水平距离ToolStripMenuItem1 @@ -1207,7 +1229,7 @@ this.前进ToolStripMenuItem, this.后退ToolStripMenuItem}); this.编辑ToolStripMenuItem.Name = "编辑ToolStripMenuItem"; - this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.编辑ToolStripMenuItem.Text = "编辑"; // // 平移对象ToolStripMenuItem @@ -1283,7 +1305,7 @@ this.绕中心点飞行ToolStripMenuItem, this.绕眼睛飞行ToolStripMenuItem}); this.飞行ToolStripMenuItem.Name = "飞行ToolStripMenuItem"; - this.飞行ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.飞行ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.飞行ToolStripMenuItem.Text = "飞行"; // // 自定义飞行ToolStripMenuItem @@ -1328,7 +1350,7 @@ this.属性标注ToolStripMenuItem, this.标注管理ToolStripMenuItem}); this.标注ToolStripMenuItem.Name = "标注ToolStripMenuItem"; - this.标注ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.标注ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.标注ToolStripMenuItem.Text = "标注"; // // 标高标注ToolStripMenuItem @@ -1415,76 +1437,76 @@ this.关联查询ToolStripMenuItem, this.关键字查询ToolStripMenuItem}); this.查询ToolStripMenuItem.Name = "查询ToolStripMenuItem"; - this.查询ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.查询ToolStripMenuItem.Text = "查询"; // // 空间查询ToolStripMenuItem // this.空间查询ToolStripMenuItem.Name = "空间查询ToolStripMenuItem"; - this.空间查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.空间查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.空间查询ToolStripMenuItem.Text = "空间查询"; this.空间查询ToolStripMenuItem.Click += new System.EventHandler(this.空间查询ToolStripMenuItem_Click); // // 编号查询ToolStripMenuItem // this.编号查询ToolStripMenuItem.Name = "编号查询ToolStripMenuItem"; - this.编号查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.编号查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.编号查询ToolStripMenuItem.Text = "编号查询"; this.编号查询ToolStripMenuItem.Click += new System.EventHandler(this.编号查询ToolStripMenuItem_Click); // // 坐标查询ToolStripMenuItem // this.坐标查询ToolStripMenuItem.Name = "坐标查询ToolStripMenuItem"; - this.坐标查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.坐标查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.坐标查询ToolStripMenuItem.Text = "坐标查询"; this.坐标查询ToolStripMenuItem.Click += new System.EventHandler(this.坐标查询ToolStripMenuItem_Click); // // 附属物查询ToolStripMenuItem // this.附属物查询ToolStripMenuItem.Name = "附属物查询ToolStripMenuItem"; - this.附属物查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.附属物查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.附属物查询ToolStripMenuItem.Text = "配件查询"; this.附属物查询ToolStripMenuItem.Click += new System.EventHandler(this.附属物查询ToolStripMenuItem_Click); // // 管径查询ToolStripMenuItem // this.管径查询ToolStripMenuItem.Name = "管径查询ToolStripMenuItem"; - this.管径查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.管径查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.管径查询ToolStripMenuItem.Text = "管径查询"; this.管径查询ToolStripMenuItem.Click += new System.EventHandler(this.管径查询ToolStripMenuItem_Click); // // 材质查询ToolStripMenuItem // this.材质查询ToolStripMenuItem.Name = "材质查询ToolStripMenuItem"; - this.材质查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.材质查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.材质查询ToolStripMenuItem.Text = "材质查询"; this.材质查询ToolStripMenuItem.Click += new System.EventHandler(this.材质查询ToolStripMenuItem_Click); // // 基本查询ToolStripMenuItem // this.基本查询ToolStripMenuItem.Name = "基本查询ToolStripMenuItem"; - this.基本查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.基本查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.基本查询ToolStripMenuItem.Text = "基本查询"; this.基本查询ToolStripMenuItem.Click += new System.EventHandler(this.基本查询ToolStripMenuItem_Click); // // 复合查询ToolStripMenuItem // this.复合查询ToolStripMenuItem.Name = "复合查询ToolStripMenuItem"; - this.复合查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.复合查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.复合查询ToolStripMenuItem.Text = "复合查询"; this.复合查询ToolStripMenuItem.Click += new System.EventHandler(this.复合查询ToolStripMenuItem_Click); // // 关联查询ToolStripMenuItem // this.关联查询ToolStripMenuItem.Name = "关联查询ToolStripMenuItem"; - this.关联查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.关联查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.关联查询ToolStripMenuItem.Text = "关联查询"; this.关联查询ToolStripMenuItem.Click += new System.EventHandler(this.关联查询ToolStripMenuItem_Click); // // 关键字查询ToolStripMenuItem // this.关键字查询ToolStripMenuItem.Name = "关键字查询ToolStripMenuItem"; - this.关键字查询ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.关键字查询ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.关键字查询ToolStripMenuItem.Text = "关键字查询"; this.关键字查询ToolStripMenuItem.Click += new System.EventHandler(this.关键字查询ToolStripMenuItem_Click); // @@ -1501,7 +1523,7 @@ this.附属物分类统计ToolStripMenuItem, this.标识器分类统计ToolStripMenuItem}); this.全区域统计ToolStripMenuItem.Name = "全区域统计ToolStripMenuItem"; - this.全区域统计ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.全区域统计ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.全区域统计ToolStripMenuItem.Text = "全区域统计"; // // 管线长度统计ToolStripMenuItem @@ -1580,7 +1602,7 @@ this.附属物分类统计ToolStripMenuItem1, this.标识器分类统计ToolStripMenuItem1}); this.绘制区域统计ToolStripMenuItem.Name = "绘制区域统计ToolStripMenuItem"; - this.绘制区域统计ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.绘制区域统计ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.绘制区域统计ToolStripMenuItem.Text = "绘制区域统计"; // // 管线长度统计ToolStripMenuItem1 @@ -1654,7 +1676,7 @@ this.道路断面分析ToolStripMenuItem, this.基线剖面分析ToolStripMenuItem}); this.断面分析ToolStripMenuItem.Name = "断面分析ToolStripMenuItem"; - this.断面分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.断面分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.断面分析ToolStripMenuItem.Text = "断面分析"; // // 横断面分析ToolStripMenuItem @@ -1696,7 +1718,7 @@ this.连通分析ToolStripMenuItem, this.爆管分析ToolStripMenuItem}); this.拓扑分析ToolStripMenuItem.Name = "拓扑分析ToolStripMenuItem"; - this.拓扑分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.拓扑分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.拓扑分析ToolStripMenuItem.Text = "拓扑分析"; // // 创建拓扑ToolStripMenuItem @@ -1758,7 +1780,7 @@ this.隐藏隧道ToolStripMenuItem, this.删除隧道ToolStripMenuItem}); this.开挖分析ToolStripMenuItem.Name = "开挖分析ToolStripMenuItem"; - this.开挖分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.开挖分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.开挖分析ToolStripMenuItem.Text = "开挖分析"; // // 多边形开挖ToolStripMenuItem @@ -1810,7 +1832,7 @@ this.可视域分析ToolStripMenuItem, this.可视包络分析ToolStripMenuItem}); this.视域分析ToolStripMenuItem.Name = "视域分析ToolStripMenuItem"; - this.视域分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.视域分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.视域分析ToolStripMenuItem.Text = "视域分析"; // // 通视分析ToolStripMenuItem @@ -1841,7 +1863,7 @@ this.缓冲区分析ToolStripMenuItem, this.无源淹没分析ToolStripMenuItem}); this.区域分析ToolStripMenuItem.Name = "区域分析ToolStripMenuItem"; - this.区域分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.区域分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.区域分析ToolStripMenuItem.Text = "区域分析"; // // 附属物分析ToolStripMenuItem @@ -1868,7 +1890,7 @@ // 清除分析ToolStripMenuItem // this.清除分析ToolStripMenuItem.Name = "清除分析ToolStripMenuItem"; - this.清除分析ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.清除分析ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.清除分析ToolStripMenuItem.Text = "清除分析"; this.清除分析ToolStripMenuItem.Click += new System.EventHandler(this.buttonItemClear_Click); // @@ -2201,328 +2223,6 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - this.ribbonPanel6.Visible = false; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // - // ribbonPanel2 - // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar3); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; - // - // ribbonBar3 - // - this.ribbonBar3.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar3.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar3.BackgroundStyle.Class = ""; - this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar3.ContainerControlProcessDialogKey = true; - this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_user_info, - this.btn_role_info, - this.btn_resc_info, - this.btn_role_resc, - this.btn_user_role, - this.btn_password_edit, - this.buttonItemPasswordReset}); - this.ribbonBar3.Location = new System.Drawing.Point(3, 0); - this.ribbonBar3.Name = "ribbonBar3"; - this.ribbonBar3.Size = new System.Drawing.Size(551, 59); - this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar3.TabIndex = 1; - // - // - // - this.ribbonBar3.TitleStyle.Class = ""; - this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar3.TitleStyleMouseOver.Class = ""; - this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar3.TitleVisible = false; - // - // btn_user_info - // - this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image"))); - this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_user_info.Name = "btn_user_info"; - this.btn_user_info.SubItemsExpandWidth = 14; - this.btn_user_info.Text = "用户管理"; - this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click); - // - // btn_role_info - // - this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image"))); - this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_role_info.Name = "btn_role_info"; - this.btn_role_info.SubItemsExpandWidth = 14; - this.btn_role_info.Text = "角色管理"; - this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click); - // - // btn_resc_info - // - this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image"))); - this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_resc_info.Name = "btn_resc_info"; - this.btn_resc_info.SubItemsExpandWidth = 14; - this.btn_resc_info.Text = "资源管理"; - this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click); - // - // btn_role_resc - // - this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image"))); - this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_role_resc.Name = "btn_role_resc"; - this.btn_role_resc.SubItemsExpandWidth = 14; - this.btn_role_resc.Text = "角色授权"; - this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click); - // - // btn_user_role - // - this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image"))); - this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_user_role.Name = "btn_user_role"; - this.btn_user_role.SubItemsExpandWidth = 14; - this.btn_user_role.Text = "用户授权"; - this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click); - // - // btn_password_edit - // - this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image"))); - this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_password_edit.Name = "btn_password_edit"; - this.btn_password_edit.SubItemsExpandWidth = 14; - this.btn_password_edit.Text = "密码修改"; - this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click); - // - // buttonItemPasswordReset - // - this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image"))); - this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemPasswordReset.Name = "buttonItemPasswordReset"; - this.buttonItemPasswordReset.SubItemsExpandWidth = 14; - this.buttonItemPasswordReset.Text = "重置密码"; - this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click); - // - // ribbonPanel3 - // - this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel3.Controls.Add(this.ribbonBar4); - this.ribbonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel3.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel3.Name = "ribbonPanel3"; - this.ribbonPanel3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel3.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel3.Style.Class = ""; - this.ribbonPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel3.StyleMouseDown.Class = ""; - this.ribbonPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel3.StyleMouseOver.Class = ""; - this.ribbonPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel3.TabIndex = 40; - this.ribbonPanel3.Visible = false; - // - // ribbonBar4 - // - this.ribbonBar4.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(634, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - // - // - // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.LabelWidth = 50; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.TextColor = System.Drawing.Color.Black; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3002,6 +2702,328 @@ this.buttonItemXT4_2.Text = "人员修改"; this.buttonItemXT4_2.Click += new System.EventHandler(this.buttonItemXT4_2_Click); // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + this.ribbonPanel6.Visible = false; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // + // ribbonPanel2 + // + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar3); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; + // + // ribbonBar3 + // + this.ribbonBar3.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar3.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar3.BackgroundStyle.Class = ""; + this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar3.ContainerControlProcessDialogKey = true; + this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_user_info, + this.btn_role_info, + this.btn_resc_info, + this.btn_role_resc, + this.btn_user_role, + this.btn_password_edit, + this.buttonItemPasswordReset}); + this.ribbonBar3.Location = new System.Drawing.Point(3, 0); + this.ribbonBar3.Name = "ribbonBar3"; + this.ribbonBar3.Size = new System.Drawing.Size(551, 59); + this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar3.TabIndex = 1; + // + // + // + this.ribbonBar3.TitleStyle.Class = ""; + this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar3.TitleStyleMouseOver.Class = ""; + this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar3.TitleVisible = false; + // + // btn_user_info + // + this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image"))); + this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_user_info.Name = "btn_user_info"; + this.btn_user_info.SubItemsExpandWidth = 14; + this.btn_user_info.Text = "用户管理"; + this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click); + // + // btn_role_info + // + this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image"))); + this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_role_info.Name = "btn_role_info"; + this.btn_role_info.SubItemsExpandWidth = 14; + this.btn_role_info.Text = "角色管理"; + this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click); + // + // btn_resc_info + // + this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image"))); + this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_resc_info.Name = "btn_resc_info"; + this.btn_resc_info.SubItemsExpandWidth = 14; + this.btn_resc_info.Text = "资源管理"; + this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click); + // + // btn_role_resc + // + this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image"))); + this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_role_resc.Name = "btn_role_resc"; + this.btn_role_resc.SubItemsExpandWidth = 14; + this.btn_role_resc.Text = "角色授权"; + this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click); + // + // btn_user_role + // + this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image"))); + this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_user_role.Name = "btn_user_role"; + this.btn_user_role.SubItemsExpandWidth = 14; + this.btn_user_role.Text = "用户授权"; + this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click); + // + // btn_password_edit + // + this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image"))); + this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_password_edit.Name = "btn_password_edit"; + this.btn_password_edit.SubItemsExpandWidth = 14; + this.btn_password_edit.Text = "密码修改"; + this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click); + // + // buttonItemPasswordReset + // + this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image"))); + this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemPasswordReset.Name = "buttonItemPasswordReset"; + this.buttonItemPasswordReset.SubItemsExpandWidth = 14; + this.buttonItemPasswordReset.Text = "重置密码"; + this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click); + // + // ribbonPanel3 + // + this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel3.Controls.Add(this.ribbonBar4); + this.ribbonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel3.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel3.Name = "ribbonPanel3"; + this.ribbonPanel3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel3.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel3.Style.Class = ""; + this.ribbonPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel3.StyleMouseDown.Class = ""; + this.ribbonPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel3.StyleMouseOver.Class = ""; + this.ribbonPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel3.TabIndex = 40; + this.ribbonPanel3.Visible = false; + // + // ribbonBar4 + // + this.ribbonBar4.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(634, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + // + // + // + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.LabelWidth = 50; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.TextColor = System.Drawing.Color.Black; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel7 // this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3837,7 +3859,7 @@ this.dataGridViewX1.Name = "dataGridViewX1"; this.dataGridViewX1.ReadOnly = true; this.dataGridViewX1.RowTemplate.Height = 23; - this.dataGridViewX1.Size = new System.Drawing.Size(1125, 65); + this.dataGridViewX1.Size = new System.Drawing.Size(1125, 61); this.dataGridViewX1.TabIndex = 13; this.dataGridViewX1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX1_MouseDoubleClick); // @@ -3847,10 +3869,20 @@ this.statusStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripNumbers, this.toolStripStatusLabel5, + this.firstpage, + this.toolStripStatusLabel3, + this.prepage, + this.toolStripStatusLabel7, + this.nextpage, + this.toolStripStatusLabel9, + this.lastpage, + this.toolStripStatusLabel1, + this.pageinfo, + this.toolStripStatusLabel11, this.toolStripDropDownButton3}); - this.statusStrip2.Location = new System.Drawing.Point(0, 70); + this.statusStrip2.Location = new System.Drawing.Point(0, 66); this.statusStrip2.Name = "statusStrip2"; - this.statusStrip2.Size = new System.Drawing.Size(1125, 22); + this.statusStrip2.Size = new System.Drawing.Size(1125, 26); this.statusStrip2.SizingGrip = false; this.statusStrip2.TabIndex = 12; this.statusStrip2.Text = "statusStrip2"; @@ -3858,15 +3890,95 @@ // toolStripNumbers // this.toolStripNumbers.Name = "toolStripNumbers"; - this.toolStripNumbers.Size = new System.Drawing.Size(56, 17); + this.toolStripNumbers.Size = new System.Drawing.Size(56, 21); this.toolStripNumbers.Text = "管线类型"; // // toolStripStatusLabel5 // this.toolStripStatusLabel5.Name = "toolStripStatusLabel5"; - this.toolStripStatusLabel5.Size = new System.Drawing.Size(15, 17); + this.toolStripStatusLabel5.Size = new System.Drawing.Size(15, 21); this.toolStripStatusLabel5.Text = " |"; // + // firstpage + // + this.firstpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.firstpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.firstpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.firstpage.Name = "firstpage"; + this.firstpage.Size = new System.Drawing.Size(36, 21); + this.firstpage.Text = "首页"; + // + // toolStripStatusLabel3 + // + this.toolStripStatusLabel3.Name = "toolStripStatusLabel3"; + this.toolStripStatusLabel3.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel3.Text = "|"; + // + // prepage + // + this.prepage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.prepage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.prepage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.prepage.Name = "prepage"; + this.prepage.Size = new System.Drawing.Size(48, 21); + this.prepage.Text = "上一页"; + // + // toolStripStatusLabel7 + // + this.toolStripStatusLabel7.Name = "toolStripStatusLabel7"; + this.toolStripStatusLabel7.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel7.Text = "|"; + // + // nextpage + // + this.nextpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.nextpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.nextpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.nextpage.Name = "nextpage"; + this.nextpage.Size = new System.Drawing.Size(48, 21); + this.nextpage.Text = "下一页"; + // + // toolStripStatusLabel9 + // + this.toolStripStatusLabel9.Name = "toolStripStatusLabel9"; + this.toolStripStatusLabel9.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel9.Text = "|"; + // + // lastpage + // + this.lastpage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); + this.lastpage.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) + | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); + this.lastpage.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter; + this.lastpage.Name = "lastpage"; + this.lastpage.Size = new System.Drawing.Size(36, 21); + this.lastpage.Text = "末页"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel1.Text = "|"; + // + // pageinfo + // + this.pageinfo.Name = "pageinfo"; + this.pageinfo.Size = new System.Drawing.Size(37, 21); + this.pageinfo.Text = "共*页"; + // + // toolStripStatusLabel11 + // + this.toolStripStatusLabel11.Name = "toolStripStatusLabel11"; + this.toolStripStatusLabel11.Size = new System.Drawing.Size(11, 21); + this.toolStripStatusLabel11.Text = "|"; + // // toolStripDropDownButton3 // this.toolStripDropDownButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(246)))), ((int)(((byte)(253))))); @@ -3880,7 +3992,6 @@ this.toolStripDropDownButton3.Name = "toolStripDropDownButton3"; this.toolStripDropDownButton3.Size = new System.Drawing.Size(75, 21); this.toolStripDropDownButton3.Text = "导出xls文件"; - this.toolStripDropDownButton3.Visible = false; this.toolStripDropDownButton3.Click += new System.EventHandler(this.toolStripDropDownButton3_Click); // // expandableSplitter2 @@ -4457,7 +4568,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(34051, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(34645, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4551,7 +4662,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(34050, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(34644, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5737,18 +5848,6 @@ this.pictureBox1.TabStop = false; this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - this.layerTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseClick); - this.layerTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerTree_NodeMouseDoubleClick); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -5791,10 +5890,10 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); @@ -6311,6 +6410,16 @@ private ButtonItem buttonItem12; private ButtonItem buttonItem13; private ButtonItem buttonItem14; + private ToolStripStatusLabel firstpage; + private ToolStripStatusLabel toolStripStatusLabel3; + private ToolStripStatusLabel prepage; + private ToolStripStatusLabel toolStripStatusLabel7; + private ToolStripStatusLabel nextpage; + private ToolStripStatusLabel toolStripStatusLabel9; + private ToolStripStatusLabel lastpage; + private ToolStripStatusLabel toolStripStatusLabel11; + private ToolStripStatusLabel toolStripStatusLabel1; + private ToolStripStatusLabel pageinfo; } } diff --git a/PaginationFeaturesUtil.cs b/PaginationFeaturesUtil.cs new file mode 100644 index 0000000..5ba7831 --- /dev/null +++ b/PaginationFeaturesUtil.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using GeoScene.Data; + +namespace Cyberpipe +{ + class PaginationFeaturesUtil + { + private static int _total = 0; + private static int _beginIndex = 1; + private static int _pagesize = 10; + private static MainFrm.PageControlStuct _pageControl; + private static MainFrm.DataGridViewDelegate _mInitDataGridViewX1; + private static PaginationFeaturesUtil _singlePagination = null; + private static string _queryInfo = ""; + private static string _layerName = ""; + private static GSOFeatures _features; + private static string[] _fields; + public static PaginationFeaturesUtil InitPagination(int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1, string queryInfo, string layerName, GSOFeatures features,string [] fields) + { + if (_singlePagination == null) + { + _singlePagination = new PaginationFeaturesUtil( total, pageControl, mInitDataGridViewX1, queryInfo, layerName, features, fields); + _pageControl.firstpage.Click += _singlePagination.FirstPageButtonClick; + _pageControl.nextpage.Click += _singlePagination.NextPageButtonClick; + _pageControl.prepage.Click += _singlePagination.PrePageButtonClick; + _pageControl.lastpage.Click += _singlePagination.LastPageButtonClick; + return _singlePagination; + } + _queryInfo = queryInfo; + _layerName = layerName; + _features = features; + _fields = fields; + _total = total; + return _singlePagination; + } + + private PaginationFeaturesUtil(int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1, string queryInfo, string layerName, GSOFeatures features, string[] fields) + { + _pageControl = pageControl; + _mInitDataGridViewX1 = mInitDataGridViewX1; + _queryInfo = queryInfo; + _layerName = layerName; + _total = total; + _features = features; + _fields = fields; + } + + /// + /// 执行sql语句,将执行的分页结果加载到指定datatable上 + /// + public void FillDataGridView() + { + DataTable table = ConvertGsoFeatures2DataTable(_features, _fields, _beginIndex, _pagesize); + ComputePageInfo(_beginIndex, _pagesize, _total); + _mInitDataGridViewX1(table, _queryInfo, _layerName, true); + //控制首页、上一页、下一页、末页按钮的显示 + _pageControl.nextpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.lastpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.firstpage.Visible = _beginIndex > 1; + _pageControl.prepage.Visible = _beginIndex > 1; + } + private void ComputePageInfo(int begin, int pagesize, int total) + { + int pageCount = (total - 1) / pagesize + 1; + int curPage = begin / pagesize + 1; + _pageControl.pageinfo.Text = "每页" + pagesize + "条," + curPage + "/" + pageCount + "页"; + } + /// + /// 分页查询 + /// + /// + /// + /// + /// + /// + public static DataTable ConvertGsoFeatures2DataTable(GSOFeatures features, string[] field, int begin, int pagesize) + { + if (features == null || features.Length == 0 || field.Length == 0) return null; + DataTable result = new DataTable(); + foreach (string t in field) + { + result.Columns.Add(t, typeof(String)); + } + int i = 0; + while (i < begin) i++; + for (; i < features.Length && i < begin + pagesize; i++) + { + GSOFeature feature = features[i]; + string[] values = new string[field.Length]; + for (int j = 0; j < field.Length; j++) + { + string value = feature.GetFieldAsString(field[j]); + values[j] = value; + } + result.Rows.Add(values); + } + return result; + } + + /// + /// 重置查询条件 + /// + public static void ResetPagination() + { + _total = 0; + _beginIndex = 1; + + } + + private void FirstPageButtonClick(object sender, EventArgs e) + { + _beginIndex = 1; + FillDataGridView(); + } + private void NextPageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex + _pagesize; + FillDataGridView(); + } + private void PrePageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex - _pagesize; + FillDataGridView(); + } + private void LastPageButtonClick(object sender, EventArgs e) + { + while (_beginIndex < _total - _pagesize + 1) _beginIndex += _pagesize; + FillDataGridView(); + } + + } +} diff --git a/PaginationUtil.cs b/PaginationUtil.cs new file mode 100644 index 0000000..e1a85ed --- /dev/null +++ b/PaginationUtil.cs @@ -0,0 +1,280 @@ +using System; +using System.Collections.Generic; +using System.Data; +using GeoScene.Globe; + +namespace Cyberpipe +{ + class PaginationUtil + { + private static int _total = 0; + private static int _beginIndex = 1; + private static int _pagesize = 10; + private static string _sql = ""; + private static MainFrm.PageControlStuct _pageControl; +// private static DataGridViewX _dataGridView1; + private static MainFrm.DataGridViewDelegate _mInitDataGridViewX1; + private static PaginationUtil _singlePagination = null; + private static string _queryInfo=""; + private static string _layerName=""; + //定义单例模式,防止点击事件被多次绑定 + public static PaginationUtil InitPagination(string sql, int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1,string queryInfo,string layerName) + { + if (_singlePagination == null) + { + _singlePagination = new PaginationUtil(sql, total, pageControl, mInitDataGridViewX1, queryInfo, layerName); + _pageControl.firstpage.Click += _singlePagination.FirstPageButtonClick; + _pageControl.nextpage.Click += _singlePagination.NextPageButtonClick; + _pageControl.prepage.Click += _singlePagination.PrePageButtonClick; + _pageControl.lastpage.Click += _singlePagination.LastPageButtonClick; + return _singlePagination; + } + _queryInfo = queryInfo; + _layerName = layerName; + _sql = sql; + _total = total; + return _singlePagination; + } + + private PaginationUtil(string sql, int total, MainFrm.PageControlStuct pageControl, MainFrm.DataGridViewDelegate mInitDataGridViewX1,string queryInfo,string layerName) + { + _pageControl = pageControl; + _mInitDataGridViewX1 = mInitDataGridViewX1; + _queryInfo = queryInfo; + _layerName = layerName; + _sql = sql; + _total = total; + + } + + /// + /// 执行sql语句,将执行的分页结果加载到指定datatable上 + /// + public void FillDataGridView() + { + string sql = PageQuerySql(_sql, _beginIndex, _pagesize); + ComputePageInfo(_beginIndex,_pagesize,_total); + DataTable table = OledbHelper.QueryTable(sql); +// _dataGridView1.DataSource = table; + _mInitDataGridViewX1(table, _queryInfo, _layerName, true); + //控制首页、上一页、下一页、末页按钮的显示 + _pageControl.nextpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.lastpage.Visible = _beginIndex + _pagesize - 1 < _total; + _pageControl.firstpage.Visible = _beginIndex > 1; + _pageControl.prepage.Visible = _beginIndex > 1; + } + /// + /// 查询总记录数 + /// + /// + /// +// public static int Count(string sql) +// { +// DataTable table = OledbHelper.QueryTable(sql); +// int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); +// return result; +// } + /// + /// 将一般查询语句转换为分页查询语句 + /// + /// 原sql语句 + /// 开始索引 + /// 每页记录数 + /// + private static string PageQuerySql(string sql, int begin, int pageSize) + { + int end = begin + pageSize - 1; + string result = "select * from (select rownum rn,A.* from (" + sql + ") A) B where rn between " + begin + " and " + end; + return result; + + } + /// + /// 查询的分页信息 + /// + /// + /// + /// + private void ComputePageInfo(int begin, int pagesize, int total) + { + int pageCount = (total - 1) / pagesize + 1; + int curPage = begin / pagesize + 1; + _pageControl.pageinfo.Text = "每页" + pagesize + "条," + curPage + "/" + pageCount + "页"; + } + + /// + /// 重置查询条件 + /// + public static void ResetPagination() + { + _total = 0; + _beginIndex = 1; + + } + + private void FirstPageButtonClick(object sender, EventArgs e) + { + _beginIndex = 1; + FillDataGridView(); + } + private void NextPageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex + _pagesize; + FillDataGridView(); + } + private void PrePageButtonClick(object sender, EventArgs e) + { + + _beginIndex = _beginIndex - _pagesize; + FillDataGridView(); + } + private void LastPageButtonClick(object sender, EventArgs e) + { + while (_beginIndex < _total - _pagesize + 1) _beginIndex += _pagesize; + FillDataGridView(); + } + + + + /// + /// 获取原查询的语句 + /// + /// + /// + /// + /// + /// + public static string GetQuerySql(GSOGlobeControl mGlobeControl, string layerName, + string filedObject, string filedValue) + { + string sql = ""; + if (filedObject == "") + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName; + } + else + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + filedObject + " like '%" + + filedValue + "%'"; + } + return sql; + } + + public static string GetQuerySql(GSOGlobeControl mGlobeControl, string layerName, + string filedObject, string mathT, string leftFiledValue, string rightFiledValue) + { + string sql = ""; + if (mathT == "区间") + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + filedObject + ">" + leftFiledValue + + "and " + filedObject + "<" + rightFiledValue; + } + else + { + sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + filedObject + mathT + rightFiledValue; + } + return sql; + } + + public static string GetQuerySql(GSOGlobeControl mGlobeControl, + string layerName, string filedObject, List filedValueList) + { + string sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where 1>2 "; + foreach (string value in filedValueList) + { + if (value == "无") + { + sql += " or " + filedObject + " is null"; + } + else + { + sql += " or " + filedObject + " = '" + value + "'"; + } + } + return sql; + } + + public static string GetQuerySql(GSOGlobeControl mGlobeControl, string layerName, string whereSql) + { + string sql = "select " + GetpipeLineFields.GetFields(layerName, mGlobeControl) + + " from " + layerName + " where " + whereSql; + + return sql; + } + /// + /// 查询记录总数 + /// + /// + /// + /// + /// + public static int CountSql(string layerName, + string filedObject, string filedValue) + { + string sql = ""; + if (filedObject == "") + { + sql = "select count(1) from " + layerName; + } + else + { + sql = "select count(1) from " + layerName + " where " + filedObject + " like '%" + + filedValue + "%'"; + } + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + + public static int CountSql(string layerName, + string filedObject, string mathT, string leftFiledValue, string rightFiledValue) + { + string sql = ""; + if (mathT == "区间") + { + sql = "select count(1) from " + layerName + " where " + filedObject + ">" + leftFiledValue + + "and " + filedObject + "<" + rightFiledValue; + } + else + { + sql = "select count(1) from " + layerName + " where " + filedObject + mathT + rightFiledValue; + } + + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + public static int CountSql(string layerName, string filedObject, List filedValueList) + { + string sql = "select count(1) from " + layerName + " where 1>2 "; + foreach (string value in filedValueList) + { + if (value == "无") + { + sql += " or " + filedObject + " is null"; + } + else + { + sql += " or " + filedObject + " = '" + value + "'"; + } + } + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + + public static int CountSql(string layerName, string whereSql) + { + string sql = "select count(1) from " + layerName + " where " + whereSql; + + DataTable table = OledbHelper.QueryTable(sql); + int result = int.Parse(table.Rows[0].ItemArray[0].ToString()); + return result; + } + } +} diff --git a/bin/x86/Debug/glVersion.txt b/bin/x86/Debug/glVersion.txt index cd82eca..755455e 100644 --- a/bin/x86/Debug/glVersion.txt +++ b/bin/x86/Debug/glVersion.txt Binary files differ diff --git a/bin/x86/Debug/log.txt b/bin/x86/Debug/log.txt index 48a2e64..707d506 100644 --- a/bin/x86/Debug/log.txt +++ b/bin/x86/Debug/log.txt @@ -964,3 +964,147 @@ exception over ------------------------------------------------------------ + + exception begin -----------------2017/3/6 17:07:25--------------------- + + + + e.Message:Object reference not set to an instance of an object. + + e.Source:Cyberpipe + + e.TargetSite:Void pipeDiameterStatis(GeoScene.Data.GSOGeoPolygon3D) + + e.StackTrace: at Cyberpipe.Frmpipediameterstatis.pipeDiameterStatis(GSOGeoPolygon3D polygon) in E:\wxl\work\GHFX_REFACTOR\Frmpipediameterstatis.cs:line 194 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2017/3/6 17:07:37--------------------- + + + + e.Message:Object reference not set to an instance of an object. + + e.Source:Cyberpipe + + e.TargetSite:Void pipeDiameterStatis(GeoScene.Data.GSOGeoPolygon3D) + + e.StackTrace: at Cyberpipe.Frmpipediameterstatis.pipeDiameterStatis(GSOGeoPolygon3D polygon) in E:\wxl\work\GHFX_REFACTOR\Frmpipediameterstatis.cs:line 194 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2017/3/6 17:07:40--------------------- + + + + e.Message:Object reference not set to an instance of an object. + + e.Source:Cyberpipe + + e.TargetSite:Void pipeDiameterStatis(GeoScene.Data.GSOGeoPolygon3D) + + e.StackTrace: at Cyberpipe.Frmpipediameterstatis.pipeDiameterStatis(GSOGeoPolygon3D polygon) in E:\wxl\work\GHFX_REFACTOR\Frmpipediameterstatis.cs:line 194 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2017/3/6 17:07:43--------------------- + + + + e.Message:Object reference not set to an instance of an object. + + e.Source:Cyberpipe + + e.TargetSite:Void pipeDiameterStatis(GeoScene.Data.GSOGeoPolygon3D) + + e.StackTrace: at Cyberpipe.Frmpipediameterstatis.pipeDiameterStatis(GSOGeoPolygon3D polygon) in E:\wxl\work\GHFX_REFACTOR\Frmpipediameterstatis.cs:line 194 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2017/3/6 17:07:43--------------------- + + + + e.Message:Object reference not set to an instance of an object. + + e.Source:Cyberpipe + + e.TargetSite:Void pipeDiameterStatis(GeoScene.Data.GSOGeoPolygon3D) + + e.StackTrace: at Cyberpipe.Frmpipediameterstatis.pipeDiameterStatis(GSOGeoPolygon3D polygon) in E:\wxl\work\GHFX_REFACTOR\Frmpipediameterstatis.cs:line 194 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2017/3/6 17:07:58--------------------- + + + + e.Message:Object reference not set to an instance of an object. + + e.Source:Cyberpipe + + e.TargetSite:Void pipeDiameterStatis(GeoScene.Data.GSOGeoPolygon3D) + + e.StackTrace: at Cyberpipe.Frmpipediameterstatis.pipeDiameterStatis(GSOGeoPolygon3D polygon) in E:\wxl\work\GHFX_REFACTOR\Frmpipediameterstatis.cs:line 194 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2017/3/6 17:07:58--------------------- + + + + e.Message:Object reference not set to an instance of an object. + + e.Source:Cyberpipe + + e.TargetSite:Void pipeDiameterStatis(GeoScene.Data.GSOGeoPolygon3D) + + e.StackTrace: at Cyberpipe.Frmpipediameterstatis.pipeDiameterStatis(GSOGeoPolygon3D polygon) in E:\wxl\work\GHFX_REFACTOR\Frmpipediameterstatis.cs:line 194 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2017/3/6 17:07:59--------------------- + + + + e.Message:Object reference not set to an instance of an object. + + e.Source:Cyberpipe + + e.TargetSite:Void pipeDiameterStatis(GeoScene.Data.GSOGeoPolygon3D) + + e.StackTrace: at Cyberpipe.Frmpipediameterstatis.pipeDiameterStatis(GSOGeoPolygon3D polygon) in E:\wxl\work\GHFX_REFACTOR\Frmpipediameterstatis.cs:line 194 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2017/3/6 17:07:59--------------------- + + + + e.Message:Object reference not set to an instance of an object. + + e.Source:Cyberpipe + + e.TargetSite:Void pipeDiameterStatis(GeoScene.Data.GSOGeoPolygon3D) + + e.StackTrace: at Cyberpipe.Frmpipediameterstatis.pipeDiameterStatis(GSOGeoPolygon3D polygon) in E:\wxl\work\GHFX_REFACTOR\Frmpipediameterstatis.cs:line 194 + + + + exception over ------------------------------------------------------------