diff --git a/EnumEventMode.cs b/EnumEventMode.cs index c905a07..0fc543d 100644 --- a/EnumEventMode.cs +++ b/EnumEventMode.cs @@ -10,7 +10,11 @@ Default_Analysis = 0, //无分析 HDM_Analysis = 1, //横断面分析 DLDM_Analysis = 2,//道路断面分析 - JXPM_Analysis = 3 //基线剖面分析 + JXPM_Analysis = 3, //基线剖面分析 + //add bu yanxiaowei + YXKW_Analysis=4,//沿线开挖 + JLBZ_Analysis=5// + } //模拟规划设计模式 diff --git a/EnumEventMode.cs b/EnumEventMode.cs index c905a07..0fc543d 100644 --- a/EnumEventMode.cs +++ b/EnumEventMode.cs @@ -10,7 +10,11 @@ Default_Analysis = 0, //无分析 HDM_Analysis = 1, //横断面分析 DLDM_Analysis = 2,//道路断面分析 - JXPM_Analysis = 3 //基线剖面分析 + JXPM_Analysis = 3, //基线剖面分析 + //add bu yanxiaowei + YXKW_Analysis=4,//沿线开挖 + JLBZ_Analysis=5// + } //模拟规划设计模式 diff --git a/FrmDigPitSetting.cs b/FrmDigPitSetting.cs index 6e77b24..5c4ca66 100644 --- a/FrmDigPitSetting.cs +++ b/FrmDigPitSetting.cs @@ -1,21 +1,24 @@ using System; using System.Windows.Forms; using DevComponents.DotNetBar; +using GeoScene.Globe; +using GeoScene.Data; +using GeoScene.Engine; namespace Cyberpipe { public partial class FrmDigPitSetting : Office2007Form { - public Double m_dDigPitValue = 3; - public Boolean m_bDigPitByDepth = true; - public Double m_dDigPitWidthAlongLine = 6; - public FrmDigPitSetting(Double dDigPitValue, Boolean bDigPitByDepth, Double dDigPitWidthAlongLine) + Double m_dDigPitValue = 3; + Boolean m_bDigPitByDepth = true; + Double m_dDigPitWidthAlongLine = 6; + private GSOGlobeControl globeControl; + private GSOGeoPolyline3D polyLine = null; + public FrmDigPitSetting(GSOGlobeControl _globeControl, GSOGeoPolyline3D _polyLine) { InitializeComponent(); - m_dDigPitValue = dDigPitValue; - m_bDigPitByDepth = bDigPitByDepth; - m_dDigPitWidthAlongLine = dDigPitWidthAlongLine; - + globeControl = _globeControl; + polyLine = _polyLine; } /// /// 窗体初始化事件处理 @@ -40,8 +43,39 @@ MessageBox.Show("请输入完整的参数信息!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); return; } + DigAlongLine(); + globeControl.Refresh(); + this.Close(); + } + + + private void DigAlongLine() + { m_dDigPitValue = Convert.ToDouble(textBoxValue.Text); m_dDigPitWidthAlongLine = Convert.ToDouble(textBoxWidthAlongLine.Text); + + GSOGeoPolygon3D resPolygon = polyLine.CreateBuffer(m_dDigPitWidthAlongLine, false, 0, false, false); + + GSOGeoPit geoPit = new GSOGeoPit(); + geoPit.PitPolygon = resPolygon; + + if (m_bDigPitByDepth) + { + geoPit.PitDepth = m_dDigPitValue; + geoPit.PitDepthUsing = true; + } + else + { + geoPit.PitBottomAlt = m_dDigPitValue; + geoPit.PitDepthUsing = false; + } + + globeControl.Globe.AddPit("", geoPit); + GSOLayer layerGround = globeControl.Globe.Layers.GetLayerByCaption(Utility.roadLayerName); + if (layerGround != null) + layerGround.Visible = false; + // 清除当前TrackPolygonAnalysis的痕迹 + globeControl.Globe.ClearLastTrackPolyline(); } /// /// 取消事件处理 diff --git a/EnumEventMode.cs b/EnumEventMode.cs index c905a07..0fc543d 100644 --- a/EnumEventMode.cs +++ b/EnumEventMode.cs @@ -10,7 +10,11 @@ Default_Analysis = 0, //无分析 HDM_Analysis = 1, //横断面分析 DLDM_Analysis = 2,//道路断面分析 - JXPM_Analysis = 3 //基线剖面分析 + JXPM_Analysis = 3, //基线剖面分析 + //add bu yanxiaowei + YXKW_Analysis=4,//沿线开挖 + JLBZ_Analysis=5// + } //模拟规划设计模式 diff --git a/FrmDigPitSetting.cs b/FrmDigPitSetting.cs index 6e77b24..5c4ca66 100644 --- a/FrmDigPitSetting.cs +++ b/FrmDigPitSetting.cs @@ -1,21 +1,24 @@ using System; using System.Windows.Forms; using DevComponents.DotNetBar; +using GeoScene.Globe; +using GeoScene.Data; +using GeoScene.Engine; namespace Cyberpipe { public partial class FrmDigPitSetting : Office2007Form { - public Double m_dDigPitValue = 3; - public Boolean m_bDigPitByDepth = true; - public Double m_dDigPitWidthAlongLine = 6; - public FrmDigPitSetting(Double dDigPitValue, Boolean bDigPitByDepth, Double dDigPitWidthAlongLine) + Double m_dDigPitValue = 3; + Boolean m_bDigPitByDepth = true; + Double m_dDigPitWidthAlongLine = 6; + private GSOGlobeControl globeControl; + private GSOGeoPolyline3D polyLine = null; + public FrmDigPitSetting(GSOGlobeControl _globeControl, GSOGeoPolyline3D _polyLine) { InitializeComponent(); - m_dDigPitValue = dDigPitValue; - m_bDigPitByDepth = bDigPitByDepth; - m_dDigPitWidthAlongLine = dDigPitWidthAlongLine; - + globeControl = _globeControl; + polyLine = _polyLine; } /// /// 窗体初始化事件处理 @@ -40,8 +43,39 @@ MessageBox.Show("请输入完整的参数信息!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); return; } + DigAlongLine(); + globeControl.Refresh(); + this.Close(); + } + + + private void DigAlongLine() + { m_dDigPitValue = Convert.ToDouble(textBoxValue.Text); m_dDigPitWidthAlongLine = Convert.ToDouble(textBoxWidthAlongLine.Text); + + GSOGeoPolygon3D resPolygon = polyLine.CreateBuffer(m_dDigPitWidthAlongLine, false, 0, false, false); + + GSOGeoPit geoPit = new GSOGeoPit(); + geoPit.PitPolygon = resPolygon; + + if (m_bDigPitByDepth) + { + geoPit.PitDepth = m_dDigPitValue; + geoPit.PitDepthUsing = true; + } + else + { + geoPit.PitBottomAlt = m_dDigPitValue; + geoPit.PitDepthUsing = false; + } + + globeControl.Globe.AddPit("", geoPit); + GSOLayer layerGround = globeControl.Globe.Layers.GetLayerByCaption(Utility.roadLayerName); + if (layerGround != null) + layerGround.Visible = false; + // 清除当前TrackPolygonAnalysis的痕迹 + globeControl.Globe.ClearLastTrackPolyline(); } /// /// 取消事件处理 diff --git a/FrmQueryHistory.cs b/FrmQueryHistory.cs deleted file mode 100644 index 5bd7b98..0000000 --- a/FrmQueryHistory.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections; -using System.Data; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryHistory : Office2007Form - { - - string tableName = ""; - string eqtID = ""; - static FrmQueryHistory frm; - public static void ShowForm(MainFrm mF, string _tableName,string _eqtID) - { - if (frm == null) - { - frm = new FrmQueryHistory(_tableName, _eqtID); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryHistory(string _tableName, string _eqtID) - { - InitializeComponent(); - - tableName = _tableName; - eqtID = _eqtID; - } - - private void Frm_LogManager_Load(object sender, EventArgs e) - { - - } - /// - /// 查询按钮事件处理 - /// - /// - /// - private void btn_Query_Click(object sender, EventArgs e) - { - if (tableName != null) - { - string sql = "select * from " + Utility.sensorDatabase + "." + tableName + " "; - - ArrayList filters = new ArrayList(); - - if (datetimeBeginDate.LockUpdateChecked || datetimeEndDate.LockUpdateChecked) - { - if (datetimeBeginDate.LockUpdateChecked && datetimeEndDate.LockUpdateChecked == false) - { - - string sql2 = " RecordDate >='" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql2); - } - else if (datetimeEndDate.LockUpdateChecked && datetimeBeginDate.LockUpdateChecked == false) - { - string sql3 = " RecordDate <= '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql3); - } - else - { - string sql4 = " RecordDate between '" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "' and '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql4); - } - } - - string[] aa = (string[])(filters.ToArray(typeof(string))); - if (aa.Length > 0) - { - sql += " where " + string.Join(" and ", aa); - } - sql += " and EqtID=" + eqtID + " group by RecordDate,RecordTime order by RecordDate,RecordTime limit 50;"; - try - { - DataTable dt = MySqlHelper.queryDataTable(sql); - if (dt != null && dt.Rows.Count > 0) - { - chartSensorStatus.Series[0].ChartType = SeriesChartType.Line; - chartSensorStatus.ChartAreas[0].AxisX.Interval = 2; - chartSensorStatus.ChartAreas[0].AxisX.Title = "时间"; - chartSensorStatus.ChartAreas[0].AxisY.Title = "测量值"; - chartSensorStatus.Series[0].Points.Clear(); - for (int i = 0; i < dt.Rows.Count; i++) - { - try - { - if (tableName == "Data_3a") - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["InstantValue"].ToString().Trim()); - } - else - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["CollectValue"].ToString().Trim()); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - } - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - MessageBox.Show(ex.Message); - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - /// - /// 关闭按钮事件处理 - /// - /// - /// - private void btn_Cancel_Click(object sender, EventArgs e) - { - Close(); - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryHistory_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} \ No newline at end of file diff --git a/EnumEventMode.cs b/EnumEventMode.cs index c905a07..0fc543d 100644 --- a/EnumEventMode.cs +++ b/EnumEventMode.cs @@ -10,7 +10,11 @@ Default_Analysis = 0, //无分析 HDM_Analysis = 1, //横断面分析 DLDM_Analysis = 2,//道路断面分析 - JXPM_Analysis = 3 //基线剖面分析 + JXPM_Analysis = 3, //基线剖面分析 + //add bu yanxiaowei + YXKW_Analysis=4,//沿线开挖 + JLBZ_Analysis=5// + } //模拟规划设计模式 diff --git a/FrmDigPitSetting.cs b/FrmDigPitSetting.cs index 6e77b24..5c4ca66 100644 --- a/FrmDigPitSetting.cs +++ b/FrmDigPitSetting.cs @@ -1,21 +1,24 @@ using System; using System.Windows.Forms; using DevComponents.DotNetBar; +using GeoScene.Globe; +using GeoScene.Data; +using GeoScene.Engine; namespace Cyberpipe { public partial class FrmDigPitSetting : Office2007Form { - public Double m_dDigPitValue = 3; - public Boolean m_bDigPitByDepth = true; - public Double m_dDigPitWidthAlongLine = 6; - public FrmDigPitSetting(Double dDigPitValue, Boolean bDigPitByDepth, Double dDigPitWidthAlongLine) + Double m_dDigPitValue = 3; + Boolean m_bDigPitByDepth = true; + Double m_dDigPitWidthAlongLine = 6; + private GSOGlobeControl globeControl; + private GSOGeoPolyline3D polyLine = null; + public FrmDigPitSetting(GSOGlobeControl _globeControl, GSOGeoPolyline3D _polyLine) { InitializeComponent(); - m_dDigPitValue = dDigPitValue; - m_bDigPitByDepth = bDigPitByDepth; - m_dDigPitWidthAlongLine = dDigPitWidthAlongLine; - + globeControl = _globeControl; + polyLine = _polyLine; } /// /// 窗体初始化事件处理 @@ -40,8 +43,39 @@ MessageBox.Show("请输入完整的参数信息!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); return; } + DigAlongLine(); + globeControl.Refresh(); + this.Close(); + } + + + private void DigAlongLine() + { m_dDigPitValue = Convert.ToDouble(textBoxValue.Text); m_dDigPitWidthAlongLine = Convert.ToDouble(textBoxWidthAlongLine.Text); + + GSOGeoPolygon3D resPolygon = polyLine.CreateBuffer(m_dDigPitWidthAlongLine, false, 0, false, false); + + GSOGeoPit geoPit = new GSOGeoPit(); + geoPit.PitPolygon = resPolygon; + + if (m_bDigPitByDepth) + { + geoPit.PitDepth = m_dDigPitValue; + geoPit.PitDepthUsing = true; + } + else + { + geoPit.PitBottomAlt = m_dDigPitValue; + geoPit.PitDepthUsing = false; + } + + globeControl.Globe.AddPit("", geoPit); + GSOLayer layerGround = globeControl.Globe.Layers.GetLayerByCaption(Utility.roadLayerName); + if (layerGround != null) + layerGround.Visible = false; + // 清除当前TrackPolygonAnalysis的痕迹 + globeControl.Globe.ClearLastTrackPolyline(); } /// /// 取消事件处理 diff --git a/FrmQueryHistory.cs b/FrmQueryHistory.cs deleted file mode 100644 index 5bd7b98..0000000 --- a/FrmQueryHistory.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections; -using System.Data; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryHistory : Office2007Form - { - - string tableName = ""; - string eqtID = ""; - static FrmQueryHistory frm; - public static void ShowForm(MainFrm mF, string _tableName,string _eqtID) - { - if (frm == null) - { - frm = new FrmQueryHistory(_tableName, _eqtID); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryHistory(string _tableName, string _eqtID) - { - InitializeComponent(); - - tableName = _tableName; - eqtID = _eqtID; - } - - private void Frm_LogManager_Load(object sender, EventArgs e) - { - - } - /// - /// 查询按钮事件处理 - /// - /// - /// - private void btn_Query_Click(object sender, EventArgs e) - { - if (tableName != null) - { - string sql = "select * from " + Utility.sensorDatabase + "." + tableName + " "; - - ArrayList filters = new ArrayList(); - - if (datetimeBeginDate.LockUpdateChecked || datetimeEndDate.LockUpdateChecked) - { - if (datetimeBeginDate.LockUpdateChecked && datetimeEndDate.LockUpdateChecked == false) - { - - string sql2 = " RecordDate >='" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql2); - } - else if (datetimeEndDate.LockUpdateChecked && datetimeBeginDate.LockUpdateChecked == false) - { - string sql3 = " RecordDate <= '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql3); - } - else - { - string sql4 = " RecordDate between '" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "' and '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql4); - } - } - - string[] aa = (string[])(filters.ToArray(typeof(string))); - if (aa.Length > 0) - { - sql += " where " + string.Join(" and ", aa); - } - sql += " and EqtID=" + eqtID + " group by RecordDate,RecordTime order by RecordDate,RecordTime limit 50;"; - try - { - DataTable dt = MySqlHelper.queryDataTable(sql); - if (dt != null && dt.Rows.Count > 0) - { - chartSensorStatus.Series[0].ChartType = SeriesChartType.Line; - chartSensorStatus.ChartAreas[0].AxisX.Interval = 2; - chartSensorStatus.ChartAreas[0].AxisX.Title = "时间"; - chartSensorStatus.ChartAreas[0].AxisY.Title = "测量值"; - chartSensorStatus.Series[0].Points.Clear(); - for (int i = 0; i < dt.Rows.Count; i++) - { - try - { - if (tableName == "Data_3a") - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["InstantValue"].ToString().Trim()); - } - else - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["CollectValue"].ToString().Trim()); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - } - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - MessageBox.Show(ex.Message); - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - /// - /// 关闭按钮事件处理 - /// - /// - /// - private void btn_Cancel_Click(object sender, EventArgs e) - { - Close(); - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryHistory_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} \ No newline at end of file diff --git a/FrmQueryHistory.designer.cs b/FrmQueryHistory.designer.cs deleted file mode 100644 index 47ab342..0000000 --- a/FrmQueryHistory.designer.cs +++ /dev/null @@ -1,293 +0,0 @@ -using System.ComponentModel; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; -using DevComponents.Editors.DateTimeAdv; - -namespace Cyberpipe -{ - partial class FrmQueryHistory - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.chartSensorStatus = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.datetimeEndDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.datetimeBeginDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.buttonXQuery = new DevComponents.DotNetBar.ButtonX(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).BeginInit(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).BeginInit(); - this.SuspendLayout(); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.chartSensorStatus); - this.groupBox1.Controls.Add(this.groupBox2); - this.groupBox1.Location = new System.Drawing.Point(12, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(564, 367); - this.groupBox1.TabIndex = 6; - this.groupBox1.TabStop = false; - // - // chartSensorStatus - // - this.chartSensorStatus.BackColor = System.Drawing.Color.Transparent; - chartArea1.AxisX.MajorGrid.Enabled = false; - chartArea1.BackColor = System.Drawing.Color.Transparent; - chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom; - chartArea1.BackHatchStyle = System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle.DashedHorizontal; - chartArea1.Name = "ChartArea1"; - this.chartSensorStatus.ChartAreas.Add(chartArea1); - legend1.BackColor = System.Drawing.Color.Transparent; - legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; - legend1.Name = "Legend1"; - this.chartSensorStatus.Legends.Add(legend1); - this.chartSensorStatus.Location = new System.Drawing.Point(6, 87); - this.chartSensorStatus.Name = "chartSensorStatus"; - series1.BorderColor = System.Drawing.Color.Transparent; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series1.Color = System.Drawing.Color.Red; - series1.Legend = "Legend1"; - series1.Name = "测量值"; - this.chartSensorStatus.Series.Add(series1); - this.chartSensorStatus.Size = new System.Drawing.Size(552, 262); - this.chartSensorStatus.TabIndex = 8; - this.chartSensorStatus.Text = "chart1"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.datetimeEndDate); - this.groupBox2.Controls.Add(this.datetimeBeginDate); - this.groupBox2.Controls.Add(this.buttonXQuery); - this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Controls.Add(this.label1); - this.groupBox2.Location = new System.Drawing.Point(6, 18); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(552, 58); - this.groupBox2.TabIndex = 7; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "查询条件"; - // - // datetimeEndDate - // - // - // - // - this.datetimeEndDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeEndDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeEndDate.ButtonDropDown.Visible = true; - this.datetimeEndDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeEndDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeEndDate.Location = new System.Drawing.Point(307, 23); - // - // - // - this.datetimeEndDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeEndDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeEndDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeEndDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeEndDate.Name = "datetimeEndDate"; - this.datetimeEndDate.ShowCheckBox = true; - this.datetimeEndDate.Size = new System.Drawing.Size(132, 21); - this.datetimeEndDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeEndDate.TabIndex = 14; - this.datetimeEndDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // datetimeBeginDate - // - // - // - // - this.datetimeBeginDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeBeginDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeBeginDate.ButtonDropDown.Visible = true; - this.datetimeBeginDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeBeginDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeBeginDate.Location = new System.Drawing.Point(87, 23); - // - // - // - this.datetimeBeginDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeBeginDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeBeginDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeBeginDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeBeginDate.Name = "datetimeBeginDate"; - this.datetimeBeginDate.ShowCheckBox = true; - this.datetimeBeginDate.Size = new System.Drawing.Size(148, 21); - this.datetimeBeginDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeBeginDate.TabIndex = 13; - this.datetimeBeginDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // buttonXQuery - // - this.buttonXQuery.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXQuery.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXQuery.Location = new System.Drawing.Point(463, 21); - this.buttonXQuery.Name = "buttonXQuery"; - this.buttonXQuery.Size = new System.Drawing.Size(53, 23); - this.buttonXQuery.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXQuery.TabIndex = 10; - this.buttonXQuery.Text = "查询"; - this.buttonXQuery.Click += new System.EventHandler(this.btn_Query_Click); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(241, 27); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(65, 12); - this.label2.TabIndex = 9; - this.label2.Text = "截止时间:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(16, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(65, 12); - this.label1.TabIndex = 9; - this.label1.Text = "起始时间:"; - // - // buttonX1 - // - this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonX1.Location = new System.Drawing.Point(485, 398); - this.buttonX1.Name = "buttonX1"; - this.buttonX1.Size = new System.Drawing.Size(53, 23); - this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonX1.TabIndex = 15; - this.buttonX1.Text = "关闭"; - this.buttonX1.Click += new System.EventHandler(this.btn_Cancel_Click); - // - // FrmQueryHistory - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(588, 433); - this.Controls.Add(this.buttonX1); - this.Controls.Add(this.groupBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryHistory"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器历史状态查询"; - this.Load += new System.EventHandler(this.Frm_LogManager_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryHistory_FormClosing); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).EndInit(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private GroupBox groupBox1; - private GroupBox groupBox2; - private Label label1; - private Chart chartSensorStatus; - private ButtonX buttonXQuery; - private DateTimeInput datetimeBeginDate; - private DateTimeInput datetimeEndDate; - private ButtonX buttonX1; - private Label label2; - } -} \ No newline at end of file diff --git a/EnumEventMode.cs b/EnumEventMode.cs index c905a07..0fc543d 100644 --- a/EnumEventMode.cs +++ b/EnumEventMode.cs @@ -10,7 +10,11 @@ Default_Analysis = 0, //无分析 HDM_Analysis = 1, //横断面分析 DLDM_Analysis = 2,//道路断面分析 - JXPM_Analysis = 3 //基线剖面分析 + JXPM_Analysis = 3, //基线剖面分析 + //add bu yanxiaowei + YXKW_Analysis=4,//沿线开挖 + JLBZ_Analysis=5// + } //模拟规划设计模式 diff --git a/FrmDigPitSetting.cs b/FrmDigPitSetting.cs index 6e77b24..5c4ca66 100644 --- a/FrmDigPitSetting.cs +++ b/FrmDigPitSetting.cs @@ -1,21 +1,24 @@ using System; using System.Windows.Forms; using DevComponents.DotNetBar; +using GeoScene.Globe; +using GeoScene.Data; +using GeoScene.Engine; namespace Cyberpipe { public partial class FrmDigPitSetting : Office2007Form { - public Double m_dDigPitValue = 3; - public Boolean m_bDigPitByDepth = true; - public Double m_dDigPitWidthAlongLine = 6; - public FrmDigPitSetting(Double dDigPitValue, Boolean bDigPitByDepth, Double dDigPitWidthAlongLine) + Double m_dDigPitValue = 3; + Boolean m_bDigPitByDepth = true; + Double m_dDigPitWidthAlongLine = 6; + private GSOGlobeControl globeControl; + private GSOGeoPolyline3D polyLine = null; + public FrmDigPitSetting(GSOGlobeControl _globeControl, GSOGeoPolyline3D _polyLine) { InitializeComponent(); - m_dDigPitValue = dDigPitValue; - m_bDigPitByDepth = bDigPitByDepth; - m_dDigPitWidthAlongLine = dDigPitWidthAlongLine; - + globeControl = _globeControl; + polyLine = _polyLine; } /// /// 窗体初始化事件处理 @@ -40,8 +43,39 @@ MessageBox.Show("请输入完整的参数信息!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); return; } + DigAlongLine(); + globeControl.Refresh(); + this.Close(); + } + + + private void DigAlongLine() + { m_dDigPitValue = Convert.ToDouble(textBoxValue.Text); m_dDigPitWidthAlongLine = Convert.ToDouble(textBoxWidthAlongLine.Text); + + GSOGeoPolygon3D resPolygon = polyLine.CreateBuffer(m_dDigPitWidthAlongLine, false, 0, false, false); + + GSOGeoPit geoPit = new GSOGeoPit(); + geoPit.PitPolygon = resPolygon; + + if (m_bDigPitByDepth) + { + geoPit.PitDepth = m_dDigPitValue; + geoPit.PitDepthUsing = true; + } + else + { + geoPit.PitBottomAlt = m_dDigPitValue; + geoPit.PitDepthUsing = false; + } + + globeControl.Globe.AddPit("", geoPit); + GSOLayer layerGround = globeControl.Globe.Layers.GetLayerByCaption(Utility.roadLayerName); + if (layerGround != null) + layerGround.Visible = false; + // 清除当前TrackPolygonAnalysis的痕迹 + globeControl.Globe.ClearLastTrackPolyline(); } /// /// 取消事件处理 diff --git a/FrmQueryHistory.cs b/FrmQueryHistory.cs deleted file mode 100644 index 5bd7b98..0000000 --- a/FrmQueryHistory.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections; -using System.Data; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryHistory : Office2007Form - { - - string tableName = ""; - string eqtID = ""; - static FrmQueryHistory frm; - public static void ShowForm(MainFrm mF, string _tableName,string _eqtID) - { - if (frm == null) - { - frm = new FrmQueryHistory(_tableName, _eqtID); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryHistory(string _tableName, string _eqtID) - { - InitializeComponent(); - - tableName = _tableName; - eqtID = _eqtID; - } - - private void Frm_LogManager_Load(object sender, EventArgs e) - { - - } - /// - /// 查询按钮事件处理 - /// - /// - /// - private void btn_Query_Click(object sender, EventArgs e) - { - if (tableName != null) - { - string sql = "select * from " + Utility.sensorDatabase + "." + tableName + " "; - - ArrayList filters = new ArrayList(); - - if (datetimeBeginDate.LockUpdateChecked || datetimeEndDate.LockUpdateChecked) - { - if (datetimeBeginDate.LockUpdateChecked && datetimeEndDate.LockUpdateChecked == false) - { - - string sql2 = " RecordDate >='" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql2); - } - else if (datetimeEndDate.LockUpdateChecked && datetimeBeginDate.LockUpdateChecked == false) - { - string sql3 = " RecordDate <= '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql3); - } - else - { - string sql4 = " RecordDate between '" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "' and '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql4); - } - } - - string[] aa = (string[])(filters.ToArray(typeof(string))); - if (aa.Length > 0) - { - sql += " where " + string.Join(" and ", aa); - } - sql += " and EqtID=" + eqtID + " group by RecordDate,RecordTime order by RecordDate,RecordTime limit 50;"; - try - { - DataTable dt = MySqlHelper.queryDataTable(sql); - if (dt != null && dt.Rows.Count > 0) - { - chartSensorStatus.Series[0].ChartType = SeriesChartType.Line; - chartSensorStatus.ChartAreas[0].AxisX.Interval = 2; - chartSensorStatus.ChartAreas[0].AxisX.Title = "时间"; - chartSensorStatus.ChartAreas[0].AxisY.Title = "测量值"; - chartSensorStatus.Series[0].Points.Clear(); - for (int i = 0; i < dt.Rows.Count; i++) - { - try - { - if (tableName == "Data_3a") - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["InstantValue"].ToString().Trim()); - } - else - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["CollectValue"].ToString().Trim()); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - } - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - MessageBox.Show(ex.Message); - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - /// - /// 关闭按钮事件处理 - /// - /// - /// - private void btn_Cancel_Click(object sender, EventArgs e) - { - Close(); - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryHistory_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} \ No newline at end of file diff --git a/FrmQueryHistory.designer.cs b/FrmQueryHistory.designer.cs deleted file mode 100644 index 47ab342..0000000 --- a/FrmQueryHistory.designer.cs +++ /dev/null @@ -1,293 +0,0 @@ -using System.ComponentModel; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; -using DevComponents.Editors.DateTimeAdv; - -namespace Cyberpipe -{ - partial class FrmQueryHistory - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.chartSensorStatus = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.datetimeEndDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.datetimeBeginDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.buttonXQuery = new DevComponents.DotNetBar.ButtonX(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).BeginInit(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).BeginInit(); - this.SuspendLayout(); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.chartSensorStatus); - this.groupBox1.Controls.Add(this.groupBox2); - this.groupBox1.Location = new System.Drawing.Point(12, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(564, 367); - this.groupBox1.TabIndex = 6; - this.groupBox1.TabStop = false; - // - // chartSensorStatus - // - this.chartSensorStatus.BackColor = System.Drawing.Color.Transparent; - chartArea1.AxisX.MajorGrid.Enabled = false; - chartArea1.BackColor = System.Drawing.Color.Transparent; - chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom; - chartArea1.BackHatchStyle = System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle.DashedHorizontal; - chartArea1.Name = "ChartArea1"; - this.chartSensorStatus.ChartAreas.Add(chartArea1); - legend1.BackColor = System.Drawing.Color.Transparent; - legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; - legend1.Name = "Legend1"; - this.chartSensorStatus.Legends.Add(legend1); - this.chartSensorStatus.Location = new System.Drawing.Point(6, 87); - this.chartSensorStatus.Name = "chartSensorStatus"; - series1.BorderColor = System.Drawing.Color.Transparent; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series1.Color = System.Drawing.Color.Red; - series1.Legend = "Legend1"; - series1.Name = "测量值"; - this.chartSensorStatus.Series.Add(series1); - this.chartSensorStatus.Size = new System.Drawing.Size(552, 262); - this.chartSensorStatus.TabIndex = 8; - this.chartSensorStatus.Text = "chart1"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.datetimeEndDate); - this.groupBox2.Controls.Add(this.datetimeBeginDate); - this.groupBox2.Controls.Add(this.buttonXQuery); - this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Controls.Add(this.label1); - this.groupBox2.Location = new System.Drawing.Point(6, 18); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(552, 58); - this.groupBox2.TabIndex = 7; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "查询条件"; - // - // datetimeEndDate - // - // - // - // - this.datetimeEndDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeEndDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeEndDate.ButtonDropDown.Visible = true; - this.datetimeEndDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeEndDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeEndDate.Location = new System.Drawing.Point(307, 23); - // - // - // - this.datetimeEndDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeEndDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeEndDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeEndDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeEndDate.Name = "datetimeEndDate"; - this.datetimeEndDate.ShowCheckBox = true; - this.datetimeEndDate.Size = new System.Drawing.Size(132, 21); - this.datetimeEndDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeEndDate.TabIndex = 14; - this.datetimeEndDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // datetimeBeginDate - // - // - // - // - this.datetimeBeginDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeBeginDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeBeginDate.ButtonDropDown.Visible = true; - this.datetimeBeginDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeBeginDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeBeginDate.Location = new System.Drawing.Point(87, 23); - // - // - // - this.datetimeBeginDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeBeginDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeBeginDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeBeginDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeBeginDate.Name = "datetimeBeginDate"; - this.datetimeBeginDate.ShowCheckBox = true; - this.datetimeBeginDate.Size = new System.Drawing.Size(148, 21); - this.datetimeBeginDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeBeginDate.TabIndex = 13; - this.datetimeBeginDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // buttonXQuery - // - this.buttonXQuery.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXQuery.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXQuery.Location = new System.Drawing.Point(463, 21); - this.buttonXQuery.Name = "buttonXQuery"; - this.buttonXQuery.Size = new System.Drawing.Size(53, 23); - this.buttonXQuery.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXQuery.TabIndex = 10; - this.buttonXQuery.Text = "查询"; - this.buttonXQuery.Click += new System.EventHandler(this.btn_Query_Click); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(241, 27); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(65, 12); - this.label2.TabIndex = 9; - this.label2.Text = "截止时间:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(16, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(65, 12); - this.label1.TabIndex = 9; - this.label1.Text = "起始时间:"; - // - // buttonX1 - // - this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonX1.Location = new System.Drawing.Point(485, 398); - this.buttonX1.Name = "buttonX1"; - this.buttonX1.Size = new System.Drawing.Size(53, 23); - this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonX1.TabIndex = 15; - this.buttonX1.Text = "关闭"; - this.buttonX1.Click += new System.EventHandler(this.btn_Cancel_Click); - // - // FrmQueryHistory - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(588, 433); - this.Controls.Add(this.buttonX1); - this.Controls.Add(this.groupBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryHistory"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器历史状态查询"; - this.Load += new System.EventHandler(this.Frm_LogManager_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryHistory_FormClosing); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).EndInit(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private GroupBox groupBox1; - private GroupBox groupBox2; - private Label label1; - private Chart chartSensorStatus; - private ButtonX buttonXQuery; - private DateTimeInput datetimeBeginDate; - private DateTimeInput datetimeEndDate; - private ButtonX buttonX1; - private Label label2; - } -} \ No newline at end of file diff --git a/FrmQueryHistory.resx b/FrmQueryHistory.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQueryHistory.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/EnumEventMode.cs b/EnumEventMode.cs index c905a07..0fc543d 100644 --- a/EnumEventMode.cs +++ b/EnumEventMode.cs @@ -10,7 +10,11 @@ Default_Analysis = 0, //无分析 HDM_Analysis = 1, //横断面分析 DLDM_Analysis = 2,//道路断面分析 - JXPM_Analysis = 3 //基线剖面分析 + JXPM_Analysis = 3, //基线剖面分析 + //add bu yanxiaowei + YXKW_Analysis=4,//沿线开挖 + JLBZ_Analysis=5// + } //模拟规划设计模式 diff --git a/FrmDigPitSetting.cs b/FrmDigPitSetting.cs index 6e77b24..5c4ca66 100644 --- a/FrmDigPitSetting.cs +++ b/FrmDigPitSetting.cs @@ -1,21 +1,24 @@ using System; using System.Windows.Forms; using DevComponents.DotNetBar; +using GeoScene.Globe; +using GeoScene.Data; +using GeoScene.Engine; namespace Cyberpipe { public partial class FrmDigPitSetting : Office2007Form { - public Double m_dDigPitValue = 3; - public Boolean m_bDigPitByDepth = true; - public Double m_dDigPitWidthAlongLine = 6; - public FrmDigPitSetting(Double dDigPitValue, Boolean bDigPitByDepth, Double dDigPitWidthAlongLine) + Double m_dDigPitValue = 3; + Boolean m_bDigPitByDepth = true; + Double m_dDigPitWidthAlongLine = 6; + private GSOGlobeControl globeControl; + private GSOGeoPolyline3D polyLine = null; + public FrmDigPitSetting(GSOGlobeControl _globeControl, GSOGeoPolyline3D _polyLine) { InitializeComponent(); - m_dDigPitValue = dDigPitValue; - m_bDigPitByDepth = bDigPitByDepth; - m_dDigPitWidthAlongLine = dDigPitWidthAlongLine; - + globeControl = _globeControl; + polyLine = _polyLine; } /// /// 窗体初始化事件处理 @@ -40,8 +43,39 @@ MessageBox.Show("请输入完整的参数信息!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); return; } + DigAlongLine(); + globeControl.Refresh(); + this.Close(); + } + + + private void DigAlongLine() + { m_dDigPitValue = Convert.ToDouble(textBoxValue.Text); m_dDigPitWidthAlongLine = Convert.ToDouble(textBoxWidthAlongLine.Text); + + GSOGeoPolygon3D resPolygon = polyLine.CreateBuffer(m_dDigPitWidthAlongLine, false, 0, false, false); + + GSOGeoPit geoPit = new GSOGeoPit(); + geoPit.PitPolygon = resPolygon; + + if (m_bDigPitByDepth) + { + geoPit.PitDepth = m_dDigPitValue; + geoPit.PitDepthUsing = true; + } + else + { + geoPit.PitBottomAlt = m_dDigPitValue; + geoPit.PitDepthUsing = false; + } + + globeControl.Globe.AddPit("", geoPit); + GSOLayer layerGround = globeControl.Globe.Layers.GetLayerByCaption(Utility.roadLayerName); + if (layerGround != null) + layerGround.Visible = false; + // 清除当前TrackPolygonAnalysis的痕迹 + globeControl.Globe.ClearLastTrackPolyline(); } /// /// 取消事件处理 diff --git a/FrmQueryHistory.cs b/FrmQueryHistory.cs deleted file mode 100644 index 5bd7b98..0000000 --- a/FrmQueryHistory.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections; -using System.Data; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryHistory : Office2007Form - { - - string tableName = ""; - string eqtID = ""; - static FrmQueryHistory frm; - public static void ShowForm(MainFrm mF, string _tableName,string _eqtID) - { - if (frm == null) - { - frm = new FrmQueryHistory(_tableName, _eqtID); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryHistory(string _tableName, string _eqtID) - { - InitializeComponent(); - - tableName = _tableName; - eqtID = _eqtID; - } - - private void Frm_LogManager_Load(object sender, EventArgs e) - { - - } - /// - /// 查询按钮事件处理 - /// - /// - /// - private void btn_Query_Click(object sender, EventArgs e) - { - if (tableName != null) - { - string sql = "select * from " + Utility.sensorDatabase + "." + tableName + " "; - - ArrayList filters = new ArrayList(); - - if (datetimeBeginDate.LockUpdateChecked || datetimeEndDate.LockUpdateChecked) - { - if (datetimeBeginDate.LockUpdateChecked && datetimeEndDate.LockUpdateChecked == false) - { - - string sql2 = " RecordDate >='" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql2); - } - else if (datetimeEndDate.LockUpdateChecked && datetimeBeginDate.LockUpdateChecked == false) - { - string sql3 = " RecordDate <= '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql3); - } - else - { - string sql4 = " RecordDate between '" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "' and '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql4); - } - } - - string[] aa = (string[])(filters.ToArray(typeof(string))); - if (aa.Length > 0) - { - sql += " where " + string.Join(" and ", aa); - } - sql += " and EqtID=" + eqtID + " group by RecordDate,RecordTime order by RecordDate,RecordTime limit 50;"; - try - { - DataTable dt = MySqlHelper.queryDataTable(sql); - if (dt != null && dt.Rows.Count > 0) - { - chartSensorStatus.Series[0].ChartType = SeriesChartType.Line; - chartSensorStatus.ChartAreas[0].AxisX.Interval = 2; - chartSensorStatus.ChartAreas[0].AxisX.Title = "时间"; - chartSensorStatus.ChartAreas[0].AxisY.Title = "测量值"; - chartSensorStatus.Series[0].Points.Clear(); - for (int i = 0; i < dt.Rows.Count; i++) - { - try - { - if (tableName == "Data_3a") - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["InstantValue"].ToString().Trim()); - } - else - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["CollectValue"].ToString().Trim()); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - } - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - MessageBox.Show(ex.Message); - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - /// - /// 关闭按钮事件处理 - /// - /// - /// - private void btn_Cancel_Click(object sender, EventArgs e) - { - Close(); - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryHistory_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} \ No newline at end of file diff --git a/FrmQueryHistory.designer.cs b/FrmQueryHistory.designer.cs deleted file mode 100644 index 47ab342..0000000 --- a/FrmQueryHistory.designer.cs +++ /dev/null @@ -1,293 +0,0 @@ -using System.ComponentModel; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; -using DevComponents.Editors.DateTimeAdv; - -namespace Cyberpipe -{ - partial class FrmQueryHistory - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.chartSensorStatus = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.datetimeEndDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.datetimeBeginDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.buttonXQuery = new DevComponents.DotNetBar.ButtonX(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).BeginInit(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).BeginInit(); - this.SuspendLayout(); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.chartSensorStatus); - this.groupBox1.Controls.Add(this.groupBox2); - this.groupBox1.Location = new System.Drawing.Point(12, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(564, 367); - this.groupBox1.TabIndex = 6; - this.groupBox1.TabStop = false; - // - // chartSensorStatus - // - this.chartSensorStatus.BackColor = System.Drawing.Color.Transparent; - chartArea1.AxisX.MajorGrid.Enabled = false; - chartArea1.BackColor = System.Drawing.Color.Transparent; - chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom; - chartArea1.BackHatchStyle = System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle.DashedHorizontal; - chartArea1.Name = "ChartArea1"; - this.chartSensorStatus.ChartAreas.Add(chartArea1); - legend1.BackColor = System.Drawing.Color.Transparent; - legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; - legend1.Name = "Legend1"; - this.chartSensorStatus.Legends.Add(legend1); - this.chartSensorStatus.Location = new System.Drawing.Point(6, 87); - this.chartSensorStatus.Name = "chartSensorStatus"; - series1.BorderColor = System.Drawing.Color.Transparent; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series1.Color = System.Drawing.Color.Red; - series1.Legend = "Legend1"; - series1.Name = "测量值"; - this.chartSensorStatus.Series.Add(series1); - this.chartSensorStatus.Size = new System.Drawing.Size(552, 262); - this.chartSensorStatus.TabIndex = 8; - this.chartSensorStatus.Text = "chart1"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.datetimeEndDate); - this.groupBox2.Controls.Add(this.datetimeBeginDate); - this.groupBox2.Controls.Add(this.buttonXQuery); - this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Controls.Add(this.label1); - this.groupBox2.Location = new System.Drawing.Point(6, 18); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(552, 58); - this.groupBox2.TabIndex = 7; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "查询条件"; - // - // datetimeEndDate - // - // - // - // - this.datetimeEndDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeEndDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeEndDate.ButtonDropDown.Visible = true; - this.datetimeEndDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeEndDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeEndDate.Location = new System.Drawing.Point(307, 23); - // - // - // - this.datetimeEndDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeEndDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeEndDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeEndDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeEndDate.Name = "datetimeEndDate"; - this.datetimeEndDate.ShowCheckBox = true; - this.datetimeEndDate.Size = new System.Drawing.Size(132, 21); - this.datetimeEndDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeEndDate.TabIndex = 14; - this.datetimeEndDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // datetimeBeginDate - // - // - // - // - this.datetimeBeginDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeBeginDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeBeginDate.ButtonDropDown.Visible = true; - this.datetimeBeginDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeBeginDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeBeginDate.Location = new System.Drawing.Point(87, 23); - // - // - // - this.datetimeBeginDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeBeginDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeBeginDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeBeginDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeBeginDate.Name = "datetimeBeginDate"; - this.datetimeBeginDate.ShowCheckBox = true; - this.datetimeBeginDate.Size = new System.Drawing.Size(148, 21); - this.datetimeBeginDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeBeginDate.TabIndex = 13; - this.datetimeBeginDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // buttonXQuery - // - this.buttonXQuery.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXQuery.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXQuery.Location = new System.Drawing.Point(463, 21); - this.buttonXQuery.Name = "buttonXQuery"; - this.buttonXQuery.Size = new System.Drawing.Size(53, 23); - this.buttonXQuery.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXQuery.TabIndex = 10; - this.buttonXQuery.Text = "查询"; - this.buttonXQuery.Click += new System.EventHandler(this.btn_Query_Click); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(241, 27); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(65, 12); - this.label2.TabIndex = 9; - this.label2.Text = "截止时间:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(16, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(65, 12); - this.label1.TabIndex = 9; - this.label1.Text = "起始时间:"; - // - // buttonX1 - // - this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonX1.Location = new System.Drawing.Point(485, 398); - this.buttonX1.Name = "buttonX1"; - this.buttonX1.Size = new System.Drawing.Size(53, 23); - this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonX1.TabIndex = 15; - this.buttonX1.Text = "关闭"; - this.buttonX1.Click += new System.EventHandler(this.btn_Cancel_Click); - // - // FrmQueryHistory - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(588, 433); - this.Controls.Add(this.buttonX1); - this.Controls.Add(this.groupBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryHistory"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器历史状态查询"; - this.Load += new System.EventHandler(this.Frm_LogManager_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryHistory_FormClosing); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).EndInit(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private GroupBox groupBox1; - private GroupBox groupBox2; - private Label label1; - private Chart chartSensorStatus; - private ButtonX buttonXQuery; - private DateTimeInput datetimeBeginDate; - private DateTimeInput datetimeEndDate; - private ButtonX buttonX1; - private Label label2; - } -} \ No newline at end of file diff --git a/FrmQueryHistory.resx b/FrmQueryHistory.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQueryHistory.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/FrmQueryMessage.cs b/FrmQueryMessage.cs deleted file mode 100644 index 42de5a2..0000000 --- a/FrmQueryMessage.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Data; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryMessage : Office2007Form - { - DataTable dt; - string sensorName = ""; - - static FrmQueryMessage frm; - public static void ShowForm(MainFrm mF,DataTable _dt, string _sensorName) - { - if (frm == null) - { - frm = new FrmQueryMessage(_dt, _sensorName); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryMessage(DataTable _dt,string _sensorName) - { - InitializeComponent(); - dt = _dt; - sensorName = _sensorName; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQueryMessage_Load(object sender, EventArgs e) - { - if (dt != null && dt.Rows.Count > 0) - { - Text += "-" + sensorName; - - DataTable dtNew = new DataTable(); - dtNew.Columns.Add("字段名"); - dtNew.Columns.Add("字段值"); - for (int i = 0; i < dt.Rows.Count; i++) - { - for (int j = 0; j < dt.Columns.Count; j++) - { - string[] row = { dt.Columns[j].ColumnName.Trim(), dt.Rows[i][j].ToString().Trim() }; - dtNew.Rows.Add(row); - } - } - dataGridViewX1.DataSource = dtNew; - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryMessage_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} diff --git a/EnumEventMode.cs b/EnumEventMode.cs index c905a07..0fc543d 100644 --- a/EnumEventMode.cs +++ b/EnumEventMode.cs @@ -10,7 +10,11 @@ Default_Analysis = 0, //无分析 HDM_Analysis = 1, //横断面分析 DLDM_Analysis = 2,//道路断面分析 - JXPM_Analysis = 3 //基线剖面分析 + JXPM_Analysis = 3, //基线剖面分析 + //add bu yanxiaowei + YXKW_Analysis=4,//沿线开挖 + JLBZ_Analysis=5// + } //模拟规划设计模式 diff --git a/FrmDigPitSetting.cs b/FrmDigPitSetting.cs index 6e77b24..5c4ca66 100644 --- a/FrmDigPitSetting.cs +++ b/FrmDigPitSetting.cs @@ -1,21 +1,24 @@ using System; using System.Windows.Forms; using DevComponents.DotNetBar; +using GeoScene.Globe; +using GeoScene.Data; +using GeoScene.Engine; namespace Cyberpipe { public partial class FrmDigPitSetting : Office2007Form { - public Double m_dDigPitValue = 3; - public Boolean m_bDigPitByDepth = true; - public Double m_dDigPitWidthAlongLine = 6; - public FrmDigPitSetting(Double dDigPitValue, Boolean bDigPitByDepth, Double dDigPitWidthAlongLine) + Double m_dDigPitValue = 3; + Boolean m_bDigPitByDepth = true; + Double m_dDigPitWidthAlongLine = 6; + private GSOGlobeControl globeControl; + private GSOGeoPolyline3D polyLine = null; + public FrmDigPitSetting(GSOGlobeControl _globeControl, GSOGeoPolyline3D _polyLine) { InitializeComponent(); - m_dDigPitValue = dDigPitValue; - m_bDigPitByDepth = bDigPitByDepth; - m_dDigPitWidthAlongLine = dDigPitWidthAlongLine; - + globeControl = _globeControl; + polyLine = _polyLine; } /// /// 窗体初始化事件处理 @@ -40,8 +43,39 @@ MessageBox.Show("请输入完整的参数信息!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); return; } + DigAlongLine(); + globeControl.Refresh(); + this.Close(); + } + + + private void DigAlongLine() + { m_dDigPitValue = Convert.ToDouble(textBoxValue.Text); m_dDigPitWidthAlongLine = Convert.ToDouble(textBoxWidthAlongLine.Text); + + GSOGeoPolygon3D resPolygon = polyLine.CreateBuffer(m_dDigPitWidthAlongLine, false, 0, false, false); + + GSOGeoPit geoPit = new GSOGeoPit(); + geoPit.PitPolygon = resPolygon; + + if (m_bDigPitByDepth) + { + geoPit.PitDepth = m_dDigPitValue; + geoPit.PitDepthUsing = true; + } + else + { + geoPit.PitBottomAlt = m_dDigPitValue; + geoPit.PitDepthUsing = false; + } + + globeControl.Globe.AddPit("", geoPit); + GSOLayer layerGround = globeControl.Globe.Layers.GetLayerByCaption(Utility.roadLayerName); + if (layerGround != null) + layerGround.Visible = false; + // 清除当前TrackPolygonAnalysis的痕迹 + globeControl.Globe.ClearLastTrackPolyline(); } /// /// 取消事件处理 diff --git a/FrmQueryHistory.cs b/FrmQueryHistory.cs deleted file mode 100644 index 5bd7b98..0000000 --- a/FrmQueryHistory.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections; -using System.Data; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryHistory : Office2007Form - { - - string tableName = ""; - string eqtID = ""; - static FrmQueryHistory frm; - public static void ShowForm(MainFrm mF, string _tableName,string _eqtID) - { - if (frm == null) - { - frm = new FrmQueryHistory(_tableName, _eqtID); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryHistory(string _tableName, string _eqtID) - { - InitializeComponent(); - - tableName = _tableName; - eqtID = _eqtID; - } - - private void Frm_LogManager_Load(object sender, EventArgs e) - { - - } - /// - /// 查询按钮事件处理 - /// - /// - /// - private void btn_Query_Click(object sender, EventArgs e) - { - if (tableName != null) - { - string sql = "select * from " + Utility.sensorDatabase + "." + tableName + " "; - - ArrayList filters = new ArrayList(); - - if (datetimeBeginDate.LockUpdateChecked || datetimeEndDate.LockUpdateChecked) - { - if (datetimeBeginDate.LockUpdateChecked && datetimeEndDate.LockUpdateChecked == false) - { - - string sql2 = " RecordDate >='" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql2); - } - else if (datetimeEndDate.LockUpdateChecked && datetimeBeginDate.LockUpdateChecked == false) - { - string sql3 = " RecordDate <= '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql3); - } - else - { - string sql4 = " RecordDate between '" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "' and '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql4); - } - } - - string[] aa = (string[])(filters.ToArray(typeof(string))); - if (aa.Length > 0) - { - sql += " where " + string.Join(" and ", aa); - } - sql += " and EqtID=" + eqtID + " group by RecordDate,RecordTime order by RecordDate,RecordTime limit 50;"; - try - { - DataTable dt = MySqlHelper.queryDataTable(sql); - if (dt != null && dt.Rows.Count > 0) - { - chartSensorStatus.Series[0].ChartType = SeriesChartType.Line; - chartSensorStatus.ChartAreas[0].AxisX.Interval = 2; - chartSensorStatus.ChartAreas[0].AxisX.Title = "时间"; - chartSensorStatus.ChartAreas[0].AxisY.Title = "测量值"; - chartSensorStatus.Series[0].Points.Clear(); - for (int i = 0; i < dt.Rows.Count; i++) - { - try - { - if (tableName == "Data_3a") - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["InstantValue"].ToString().Trim()); - } - else - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["CollectValue"].ToString().Trim()); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - } - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - MessageBox.Show(ex.Message); - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - /// - /// 关闭按钮事件处理 - /// - /// - /// - private void btn_Cancel_Click(object sender, EventArgs e) - { - Close(); - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryHistory_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} \ No newline at end of file diff --git a/FrmQueryHistory.designer.cs b/FrmQueryHistory.designer.cs deleted file mode 100644 index 47ab342..0000000 --- a/FrmQueryHistory.designer.cs +++ /dev/null @@ -1,293 +0,0 @@ -using System.ComponentModel; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; -using DevComponents.Editors.DateTimeAdv; - -namespace Cyberpipe -{ - partial class FrmQueryHistory - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.chartSensorStatus = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.datetimeEndDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.datetimeBeginDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.buttonXQuery = new DevComponents.DotNetBar.ButtonX(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).BeginInit(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).BeginInit(); - this.SuspendLayout(); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.chartSensorStatus); - this.groupBox1.Controls.Add(this.groupBox2); - this.groupBox1.Location = new System.Drawing.Point(12, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(564, 367); - this.groupBox1.TabIndex = 6; - this.groupBox1.TabStop = false; - // - // chartSensorStatus - // - this.chartSensorStatus.BackColor = System.Drawing.Color.Transparent; - chartArea1.AxisX.MajorGrid.Enabled = false; - chartArea1.BackColor = System.Drawing.Color.Transparent; - chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom; - chartArea1.BackHatchStyle = System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle.DashedHorizontal; - chartArea1.Name = "ChartArea1"; - this.chartSensorStatus.ChartAreas.Add(chartArea1); - legend1.BackColor = System.Drawing.Color.Transparent; - legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; - legend1.Name = "Legend1"; - this.chartSensorStatus.Legends.Add(legend1); - this.chartSensorStatus.Location = new System.Drawing.Point(6, 87); - this.chartSensorStatus.Name = "chartSensorStatus"; - series1.BorderColor = System.Drawing.Color.Transparent; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series1.Color = System.Drawing.Color.Red; - series1.Legend = "Legend1"; - series1.Name = "测量值"; - this.chartSensorStatus.Series.Add(series1); - this.chartSensorStatus.Size = new System.Drawing.Size(552, 262); - this.chartSensorStatus.TabIndex = 8; - this.chartSensorStatus.Text = "chart1"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.datetimeEndDate); - this.groupBox2.Controls.Add(this.datetimeBeginDate); - this.groupBox2.Controls.Add(this.buttonXQuery); - this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Controls.Add(this.label1); - this.groupBox2.Location = new System.Drawing.Point(6, 18); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(552, 58); - this.groupBox2.TabIndex = 7; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "查询条件"; - // - // datetimeEndDate - // - // - // - // - this.datetimeEndDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeEndDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeEndDate.ButtonDropDown.Visible = true; - this.datetimeEndDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeEndDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeEndDate.Location = new System.Drawing.Point(307, 23); - // - // - // - this.datetimeEndDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeEndDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeEndDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeEndDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeEndDate.Name = "datetimeEndDate"; - this.datetimeEndDate.ShowCheckBox = true; - this.datetimeEndDate.Size = new System.Drawing.Size(132, 21); - this.datetimeEndDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeEndDate.TabIndex = 14; - this.datetimeEndDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // datetimeBeginDate - // - // - // - // - this.datetimeBeginDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeBeginDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeBeginDate.ButtonDropDown.Visible = true; - this.datetimeBeginDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeBeginDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeBeginDate.Location = new System.Drawing.Point(87, 23); - // - // - // - this.datetimeBeginDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeBeginDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeBeginDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeBeginDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeBeginDate.Name = "datetimeBeginDate"; - this.datetimeBeginDate.ShowCheckBox = true; - this.datetimeBeginDate.Size = new System.Drawing.Size(148, 21); - this.datetimeBeginDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeBeginDate.TabIndex = 13; - this.datetimeBeginDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // buttonXQuery - // - this.buttonXQuery.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXQuery.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXQuery.Location = new System.Drawing.Point(463, 21); - this.buttonXQuery.Name = "buttonXQuery"; - this.buttonXQuery.Size = new System.Drawing.Size(53, 23); - this.buttonXQuery.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXQuery.TabIndex = 10; - this.buttonXQuery.Text = "查询"; - this.buttonXQuery.Click += new System.EventHandler(this.btn_Query_Click); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(241, 27); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(65, 12); - this.label2.TabIndex = 9; - this.label2.Text = "截止时间:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(16, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(65, 12); - this.label1.TabIndex = 9; - this.label1.Text = "起始时间:"; - // - // buttonX1 - // - this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonX1.Location = new System.Drawing.Point(485, 398); - this.buttonX1.Name = "buttonX1"; - this.buttonX1.Size = new System.Drawing.Size(53, 23); - this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonX1.TabIndex = 15; - this.buttonX1.Text = "关闭"; - this.buttonX1.Click += new System.EventHandler(this.btn_Cancel_Click); - // - // FrmQueryHistory - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(588, 433); - this.Controls.Add(this.buttonX1); - this.Controls.Add(this.groupBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryHistory"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器历史状态查询"; - this.Load += new System.EventHandler(this.Frm_LogManager_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryHistory_FormClosing); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).EndInit(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private GroupBox groupBox1; - private GroupBox groupBox2; - private Label label1; - private Chart chartSensorStatus; - private ButtonX buttonXQuery; - private DateTimeInput datetimeBeginDate; - private DateTimeInput datetimeEndDate; - private ButtonX buttonX1; - private Label label2; - } -} \ No newline at end of file diff --git a/FrmQueryHistory.resx b/FrmQueryHistory.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQueryHistory.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/FrmQueryMessage.cs b/FrmQueryMessage.cs deleted file mode 100644 index 42de5a2..0000000 --- a/FrmQueryMessage.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Data; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryMessage : Office2007Form - { - DataTable dt; - string sensorName = ""; - - static FrmQueryMessage frm; - public static void ShowForm(MainFrm mF,DataTable _dt, string _sensorName) - { - if (frm == null) - { - frm = new FrmQueryMessage(_dt, _sensorName); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryMessage(DataTable _dt,string _sensorName) - { - InitializeComponent(); - dt = _dt; - sensorName = _sensorName; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQueryMessage_Load(object sender, EventArgs e) - { - if (dt != null && dt.Rows.Count > 0) - { - Text += "-" + sensorName; - - DataTable dtNew = new DataTable(); - dtNew.Columns.Add("字段名"); - dtNew.Columns.Add("字段值"); - for (int i = 0; i < dt.Rows.Count; i++) - { - for (int j = 0; j < dt.Columns.Count; j++) - { - string[] row = { dt.Columns[j].ColumnName.Trim(), dt.Rows[i][j].ToString().Trim() }; - dtNew.Rows.Add(row); - } - } - dataGridViewX1.DataSource = dtNew; - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryMessage_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} diff --git a/FrmQueryMessage.designer.cs b/FrmQueryMessage.designer.cs deleted file mode 100644 index c59101d..0000000 --- a/FrmQueryMessage.designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System.ComponentModel; -using DevComponents.DotNetBar.Controls; - -namespace Cyberpipe -{ - partial class FrmQueryMessage - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX1 = new DevComponents.DotNetBar.Controls.DataGridViewX(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).BeginInit(); - this.SuspendLayout(); - // - // dataGridViewX1 - // - this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX1.Location = new System.Drawing.Point(0, 0); - this.dataGridViewX1.Name = "dataGridViewX1"; - this.dataGridViewX1.ReadOnly = true; - this.dataGridViewX1.RowHeadersVisible = false; - this.dataGridViewX1.RowTemplate.Height = 23; - this.dataGridViewX1.Size = new System.Drawing.Size(293, 317); - this.dataGridViewX1.TabIndex = 0; - // - // FrmQueryMessage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(293, 317); - this.Controls.Add(this.dataGridViewX1); - this.EnableGlass = false; - this.ForeColor = System.Drawing.Color.Black; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryMessage"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "信息查询"; - this.Load += new System.EventHandler(this.FrmQueryMessage_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryMessage_FormClosing); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private DataGridViewX dataGridViewX1; - } -} \ No newline at end of file diff --git a/EnumEventMode.cs b/EnumEventMode.cs index c905a07..0fc543d 100644 --- a/EnumEventMode.cs +++ b/EnumEventMode.cs @@ -10,7 +10,11 @@ Default_Analysis = 0, //无分析 HDM_Analysis = 1, //横断面分析 DLDM_Analysis = 2,//道路断面分析 - JXPM_Analysis = 3 //基线剖面分析 + JXPM_Analysis = 3, //基线剖面分析 + //add bu yanxiaowei + YXKW_Analysis=4,//沿线开挖 + JLBZ_Analysis=5// + } //模拟规划设计模式 diff --git a/FrmDigPitSetting.cs b/FrmDigPitSetting.cs index 6e77b24..5c4ca66 100644 --- a/FrmDigPitSetting.cs +++ b/FrmDigPitSetting.cs @@ -1,21 +1,24 @@ using System; using System.Windows.Forms; using DevComponents.DotNetBar; +using GeoScene.Globe; +using GeoScene.Data; +using GeoScene.Engine; namespace Cyberpipe { public partial class FrmDigPitSetting : Office2007Form { - public Double m_dDigPitValue = 3; - public Boolean m_bDigPitByDepth = true; - public Double m_dDigPitWidthAlongLine = 6; - public FrmDigPitSetting(Double dDigPitValue, Boolean bDigPitByDepth, Double dDigPitWidthAlongLine) + Double m_dDigPitValue = 3; + Boolean m_bDigPitByDepth = true; + Double m_dDigPitWidthAlongLine = 6; + private GSOGlobeControl globeControl; + private GSOGeoPolyline3D polyLine = null; + public FrmDigPitSetting(GSOGlobeControl _globeControl, GSOGeoPolyline3D _polyLine) { InitializeComponent(); - m_dDigPitValue = dDigPitValue; - m_bDigPitByDepth = bDigPitByDepth; - m_dDigPitWidthAlongLine = dDigPitWidthAlongLine; - + globeControl = _globeControl; + polyLine = _polyLine; } /// /// 窗体初始化事件处理 @@ -40,8 +43,39 @@ MessageBox.Show("请输入完整的参数信息!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); return; } + DigAlongLine(); + globeControl.Refresh(); + this.Close(); + } + + + private void DigAlongLine() + { m_dDigPitValue = Convert.ToDouble(textBoxValue.Text); m_dDigPitWidthAlongLine = Convert.ToDouble(textBoxWidthAlongLine.Text); + + GSOGeoPolygon3D resPolygon = polyLine.CreateBuffer(m_dDigPitWidthAlongLine, false, 0, false, false); + + GSOGeoPit geoPit = new GSOGeoPit(); + geoPit.PitPolygon = resPolygon; + + if (m_bDigPitByDepth) + { + geoPit.PitDepth = m_dDigPitValue; + geoPit.PitDepthUsing = true; + } + else + { + geoPit.PitBottomAlt = m_dDigPitValue; + geoPit.PitDepthUsing = false; + } + + globeControl.Globe.AddPit("", geoPit); + GSOLayer layerGround = globeControl.Globe.Layers.GetLayerByCaption(Utility.roadLayerName); + if (layerGround != null) + layerGround.Visible = false; + // 清除当前TrackPolygonAnalysis的痕迹 + globeControl.Globe.ClearLastTrackPolyline(); } /// /// 取消事件处理 diff --git a/FrmQueryHistory.cs b/FrmQueryHistory.cs deleted file mode 100644 index 5bd7b98..0000000 --- a/FrmQueryHistory.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections; -using System.Data; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryHistory : Office2007Form - { - - string tableName = ""; - string eqtID = ""; - static FrmQueryHistory frm; - public static void ShowForm(MainFrm mF, string _tableName,string _eqtID) - { - if (frm == null) - { - frm = new FrmQueryHistory(_tableName, _eqtID); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryHistory(string _tableName, string _eqtID) - { - InitializeComponent(); - - tableName = _tableName; - eqtID = _eqtID; - } - - private void Frm_LogManager_Load(object sender, EventArgs e) - { - - } - /// - /// 查询按钮事件处理 - /// - /// - /// - private void btn_Query_Click(object sender, EventArgs e) - { - if (tableName != null) - { - string sql = "select * from " + Utility.sensorDatabase + "." + tableName + " "; - - ArrayList filters = new ArrayList(); - - if (datetimeBeginDate.LockUpdateChecked || datetimeEndDate.LockUpdateChecked) - { - if (datetimeBeginDate.LockUpdateChecked && datetimeEndDate.LockUpdateChecked == false) - { - - string sql2 = " RecordDate >='" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql2); - } - else if (datetimeEndDate.LockUpdateChecked && datetimeBeginDate.LockUpdateChecked == false) - { - string sql3 = " RecordDate <= '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql3); - } - else - { - string sql4 = " RecordDate between '" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "' and '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql4); - } - } - - string[] aa = (string[])(filters.ToArray(typeof(string))); - if (aa.Length > 0) - { - sql += " where " + string.Join(" and ", aa); - } - sql += " and EqtID=" + eqtID + " group by RecordDate,RecordTime order by RecordDate,RecordTime limit 50;"; - try - { - DataTable dt = MySqlHelper.queryDataTable(sql); - if (dt != null && dt.Rows.Count > 0) - { - chartSensorStatus.Series[0].ChartType = SeriesChartType.Line; - chartSensorStatus.ChartAreas[0].AxisX.Interval = 2; - chartSensorStatus.ChartAreas[0].AxisX.Title = "时间"; - chartSensorStatus.ChartAreas[0].AxisY.Title = "测量值"; - chartSensorStatus.Series[0].Points.Clear(); - for (int i = 0; i < dt.Rows.Count; i++) - { - try - { - if (tableName == "Data_3a") - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["InstantValue"].ToString().Trim()); - } - else - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["CollectValue"].ToString().Trim()); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - } - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - MessageBox.Show(ex.Message); - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - /// - /// 关闭按钮事件处理 - /// - /// - /// - private void btn_Cancel_Click(object sender, EventArgs e) - { - Close(); - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryHistory_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} \ No newline at end of file diff --git a/FrmQueryHistory.designer.cs b/FrmQueryHistory.designer.cs deleted file mode 100644 index 47ab342..0000000 --- a/FrmQueryHistory.designer.cs +++ /dev/null @@ -1,293 +0,0 @@ -using System.ComponentModel; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; -using DevComponents.Editors.DateTimeAdv; - -namespace Cyberpipe -{ - partial class FrmQueryHistory - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.chartSensorStatus = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.datetimeEndDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.datetimeBeginDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.buttonXQuery = new DevComponents.DotNetBar.ButtonX(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).BeginInit(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).BeginInit(); - this.SuspendLayout(); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.chartSensorStatus); - this.groupBox1.Controls.Add(this.groupBox2); - this.groupBox1.Location = new System.Drawing.Point(12, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(564, 367); - this.groupBox1.TabIndex = 6; - this.groupBox1.TabStop = false; - // - // chartSensorStatus - // - this.chartSensorStatus.BackColor = System.Drawing.Color.Transparent; - chartArea1.AxisX.MajorGrid.Enabled = false; - chartArea1.BackColor = System.Drawing.Color.Transparent; - chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom; - chartArea1.BackHatchStyle = System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle.DashedHorizontal; - chartArea1.Name = "ChartArea1"; - this.chartSensorStatus.ChartAreas.Add(chartArea1); - legend1.BackColor = System.Drawing.Color.Transparent; - legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; - legend1.Name = "Legend1"; - this.chartSensorStatus.Legends.Add(legend1); - this.chartSensorStatus.Location = new System.Drawing.Point(6, 87); - this.chartSensorStatus.Name = "chartSensorStatus"; - series1.BorderColor = System.Drawing.Color.Transparent; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series1.Color = System.Drawing.Color.Red; - series1.Legend = "Legend1"; - series1.Name = "测量值"; - this.chartSensorStatus.Series.Add(series1); - this.chartSensorStatus.Size = new System.Drawing.Size(552, 262); - this.chartSensorStatus.TabIndex = 8; - this.chartSensorStatus.Text = "chart1"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.datetimeEndDate); - this.groupBox2.Controls.Add(this.datetimeBeginDate); - this.groupBox2.Controls.Add(this.buttonXQuery); - this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Controls.Add(this.label1); - this.groupBox2.Location = new System.Drawing.Point(6, 18); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(552, 58); - this.groupBox2.TabIndex = 7; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "查询条件"; - // - // datetimeEndDate - // - // - // - // - this.datetimeEndDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeEndDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeEndDate.ButtonDropDown.Visible = true; - this.datetimeEndDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeEndDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeEndDate.Location = new System.Drawing.Point(307, 23); - // - // - // - this.datetimeEndDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeEndDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeEndDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeEndDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeEndDate.Name = "datetimeEndDate"; - this.datetimeEndDate.ShowCheckBox = true; - this.datetimeEndDate.Size = new System.Drawing.Size(132, 21); - this.datetimeEndDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeEndDate.TabIndex = 14; - this.datetimeEndDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // datetimeBeginDate - // - // - // - // - this.datetimeBeginDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeBeginDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeBeginDate.ButtonDropDown.Visible = true; - this.datetimeBeginDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeBeginDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeBeginDate.Location = new System.Drawing.Point(87, 23); - // - // - // - this.datetimeBeginDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeBeginDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeBeginDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeBeginDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeBeginDate.Name = "datetimeBeginDate"; - this.datetimeBeginDate.ShowCheckBox = true; - this.datetimeBeginDate.Size = new System.Drawing.Size(148, 21); - this.datetimeBeginDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeBeginDate.TabIndex = 13; - this.datetimeBeginDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // buttonXQuery - // - this.buttonXQuery.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXQuery.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXQuery.Location = new System.Drawing.Point(463, 21); - this.buttonXQuery.Name = "buttonXQuery"; - this.buttonXQuery.Size = new System.Drawing.Size(53, 23); - this.buttonXQuery.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXQuery.TabIndex = 10; - this.buttonXQuery.Text = "查询"; - this.buttonXQuery.Click += new System.EventHandler(this.btn_Query_Click); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(241, 27); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(65, 12); - this.label2.TabIndex = 9; - this.label2.Text = "截止时间:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(16, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(65, 12); - this.label1.TabIndex = 9; - this.label1.Text = "起始时间:"; - // - // buttonX1 - // - this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonX1.Location = new System.Drawing.Point(485, 398); - this.buttonX1.Name = "buttonX1"; - this.buttonX1.Size = new System.Drawing.Size(53, 23); - this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonX1.TabIndex = 15; - this.buttonX1.Text = "关闭"; - this.buttonX1.Click += new System.EventHandler(this.btn_Cancel_Click); - // - // FrmQueryHistory - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(588, 433); - this.Controls.Add(this.buttonX1); - this.Controls.Add(this.groupBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryHistory"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器历史状态查询"; - this.Load += new System.EventHandler(this.Frm_LogManager_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryHistory_FormClosing); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).EndInit(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private GroupBox groupBox1; - private GroupBox groupBox2; - private Label label1; - private Chart chartSensorStatus; - private ButtonX buttonXQuery; - private DateTimeInput datetimeBeginDate; - private DateTimeInput datetimeEndDate; - private ButtonX buttonX1; - private Label label2; - } -} \ No newline at end of file diff --git a/FrmQueryHistory.resx b/FrmQueryHistory.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQueryHistory.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/FrmQueryMessage.cs b/FrmQueryMessage.cs deleted file mode 100644 index 42de5a2..0000000 --- a/FrmQueryMessage.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Data; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryMessage : Office2007Form - { - DataTable dt; - string sensorName = ""; - - static FrmQueryMessage frm; - public static void ShowForm(MainFrm mF,DataTable _dt, string _sensorName) - { - if (frm == null) - { - frm = new FrmQueryMessage(_dt, _sensorName); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryMessage(DataTable _dt,string _sensorName) - { - InitializeComponent(); - dt = _dt; - sensorName = _sensorName; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQueryMessage_Load(object sender, EventArgs e) - { - if (dt != null && dt.Rows.Count > 0) - { - Text += "-" + sensorName; - - DataTable dtNew = new DataTable(); - dtNew.Columns.Add("字段名"); - dtNew.Columns.Add("字段值"); - for (int i = 0; i < dt.Rows.Count; i++) - { - for (int j = 0; j < dt.Columns.Count; j++) - { - string[] row = { dt.Columns[j].ColumnName.Trim(), dt.Rows[i][j].ToString().Trim() }; - dtNew.Rows.Add(row); - } - } - dataGridViewX1.DataSource = dtNew; - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryMessage_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} diff --git a/FrmQueryMessage.designer.cs b/FrmQueryMessage.designer.cs deleted file mode 100644 index c59101d..0000000 --- a/FrmQueryMessage.designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System.ComponentModel; -using DevComponents.DotNetBar.Controls; - -namespace Cyberpipe -{ - partial class FrmQueryMessage - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX1 = new DevComponents.DotNetBar.Controls.DataGridViewX(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).BeginInit(); - this.SuspendLayout(); - // - // dataGridViewX1 - // - this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX1.Location = new System.Drawing.Point(0, 0); - this.dataGridViewX1.Name = "dataGridViewX1"; - this.dataGridViewX1.ReadOnly = true; - this.dataGridViewX1.RowHeadersVisible = false; - this.dataGridViewX1.RowTemplate.Height = 23; - this.dataGridViewX1.Size = new System.Drawing.Size(293, 317); - this.dataGridViewX1.TabIndex = 0; - // - // FrmQueryMessage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(293, 317); - this.Controls.Add(this.dataGridViewX1); - this.EnableGlass = false; - this.ForeColor = System.Drawing.Color.Black; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryMessage"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "信息查询"; - this.Load += new System.EventHandler(this.FrmQueryMessage_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryMessage_FormClosing); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private DataGridViewX dataGridViewX1; - } -} \ No newline at end of file diff --git a/FrmQueryMessage.resx b/FrmQueryMessage.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQueryMessage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/EnumEventMode.cs b/EnumEventMode.cs index c905a07..0fc543d 100644 --- a/EnumEventMode.cs +++ b/EnumEventMode.cs @@ -10,7 +10,11 @@ Default_Analysis = 0, //无分析 HDM_Analysis = 1, //横断面分析 DLDM_Analysis = 2,//道路断面分析 - JXPM_Analysis = 3 //基线剖面分析 + JXPM_Analysis = 3, //基线剖面分析 + //add bu yanxiaowei + YXKW_Analysis=4,//沿线开挖 + JLBZ_Analysis=5// + } //模拟规划设计模式 diff --git a/FrmDigPitSetting.cs b/FrmDigPitSetting.cs index 6e77b24..5c4ca66 100644 --- a/FrmDigPitSetting.cs +++ b/FrmDigPitSetting.cs @@ -1,21 +1,24 @@ using System; using System.Windows.Forms; using DevComponents.DotNetBar; +using GeoScene.Globe; +using GeoScene.Data; +using GeoScene.Engine; namespace Cyberpipe { public partial class FrmDigPitSetting : Office2007Form { - public Double m_dDigPitValue = 3; - public Boolean m_bDigPitByDepth = true; - public Double m_dDigPitWidthAlongLine = 6; - public FrmDigPitSetting(Double dDigPitValue, Boolean bDigPitByDepth, Double dDigPitWidthAlongLine) + Double m_dDigPitValue = 3; + Boolean m_bDigPitByDepth = true; + Double m_dDigPitWidthAlongLine = 6; + private GSOGlobeControl globeControl; + private GSOGeoPolyline3D polyLine = null; + public FrmDigPitSetting(GSOGlobeControl _globeControl, GSOGeoPolyline3D _polyLine) { InitializeComponent(); - m_dDigPitValue = dDigPitValue; - m_bDigPitByDepth = bDigPitByDepth; - m_dDigPitWidthAlongLine = dDigPitWidthAlongLine; - + globeControl = _globeControl; + polyLine = _polyLine; } /// /// 窗体初始化事件处理 @@ -40,8 +43,39 @@ MessageBox.Show("请输入完整的参数信息!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); return; } + DigAlongLine(); + globeControl.Refresh(); + this.Close(); + } + + + private void DigAlongLine() + { m_dDigPitValue = Convert.ToDouble(textBoxValue.Text); m_dDigPitWidthAlongLine = Convert.ToDouble(textBoxWidthAlongLine.Text); + + GSOGeoPolygon3D resPolygon = polyLine.CreateBuffer(m_dDigPitWidthAlongLine, false, 0, false, false); + + GSOGeoPit geoPit = new GSOGeoPit(); + geoPit.PitPolygon = resPolygon; + + if (m_bDigPitByDepth) + { + geoPit.PitDepth = m_dDigPitValue; + geoPit.PitDepthUsing = true; + } + else + { + geoPit.PitBottomAlt = m_dDigPitValue; + geoPit.PitDepthUsing = false; + } + + globeControl.Globe.AddPit("", geoPit); + GSOLayer layerGround = globeControl.Globe.Layers.GetLayerByCaption(Utility.roadLayerName); + if (layerGround != null) + layerGround.Visible = false; + // 清除当前TrackPolygonAnalysis的痕迹 + globeControl.Globe.ClearLastTrackPolyline(); } /// /// 取消事件处理 diff --git a/FrmQueryHistory.cs b/FrmQueryHistory.cs deleted file mode 100644 index 5bd7b98..0000000 --- a/FrmQueryHistory.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections; -using System.Data; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryHistory : Office2007Form - { - - string tableName = ""; - string eqtID = ""; - static FrmQueryHistory frm; - public static void ShowForm(MainFrm mF, string _tableName,string _eqtID) - { - if (frm == null) - { - frm = new FrmQueryHistory(_tableName, _eqtID); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryHistory(string _tableName, string _eqtID) - { - InitializeComponent(); - - tableName = _tableName; - eqtID = _eqtID; - } - - private void Frm_LogManager_Load(object sender, EventArgs e) - { - - } - /// - /// 查询按钮事件处理 - /// - /// - /// - private void btn_Query_Click(object sender, EventArgs e) - { - if (tableName != null) - { - string sql = "select * from " + Utility.sensorDatabase + "." + tableName + " "; - - ArrayList filters = new ArrayList(); - - if (datetimeBeginDate.LockUpdateChecked || datetimeEndDate.LockUpdateChecked) - { - if (datetimeBeginDate.LockUpdateChecked && datetimeEndDate.LockUpdateChecked == false) - { - - string sql2 = " RecordDate >='" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql2); - } - else if (datetimeEndDate.LockUpdateChecked && datetimeBeginDate.LockUpdateChecked == false) - { - string sql3 = " RecordDate <= '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql3); - } - else - { - string sql4 = " RecordDate between '" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "' and '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql4); - } - } - - string[] aa = (string[])(filters.ToArray(typeof(string))); - if (aa.Length > 0) - { - sql += " where " + string.Join(" and ", aa); - } - sql += " and EqtID=" + eqtID + " group by RecordDate,RecordTime order by RecordDate,RecordTime limit 50;"; - try - { - DataTable dt = MySqlHelper.queryDataTable(sql); - if (dt != null && dt.Rows.Count > 0) - { - chartSensorStatus.Series[0].ChartType = SeriesChartType.Line; - chartSensorStatus.ChartAreas[0].AxisX.Interval = 2; - chartSensorStatus.ChartAreas[0].AxisX.Title = "时间"; - chartSensorStatus.ChartAreas[0].AxisY.Title = "测量值"; - chartSensorStatus.Series[0].Points.Clear(); - for (int i = 0; i < dt.Rows.Count; i++) - { - try - { - if (tableName == "Data_3a") - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["InstantValue"].ToString().Trim()); - } - else - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["CollectValue"].ToString().Trim()); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - } - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - MessageBox.Show(ex.Message); - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - /// - /// 关闭按钮事件处理 - /// - /// - /// - private void btn_Cancel_Click(object sender, EventArgs e) - { - Close(); - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryHistory_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} \ No newline at end of file diff --git a/FrmQueryHistory.designer.cs b/FrmQueryHistory.designer.cs deleted file mode 100644 index 47ab342..0000000 --- a/FrmQueryHistory.designer.cs +++ /dev/null @@ -1,293 +0,0 @@ -using System.ComponentModel; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; -using DevComponents.Editors.DateTimeAdv; - -namespace Cyberpipe -{ - partial class FrmQueryHistory - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.chartSensorStatus = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.datetimeEndDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.datetimeBeginDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.buttonXQuery = new DevComponents.DotNetBar.ButtonX(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).BeginInit(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).BeginInit(); - this.SuspendLayout(); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.chartSensorStatus); - this.groupBox1.Controls.Add(this.groupBox2); - this.groupBox1.Location = new System.Drawing.Point(12, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(564, 367); - this.groupBox1.TabIndex = 6; - this.groupBox1.TabStop = false; - // - // chartSensorStatus - // - this.chartSensorStatus.BackColor = System.Drawing.Color.Transparent; - chartArea1.AxisX.MajorGrid.Enabled = false; - chartArea1.BackColor = System.Drawing.Color.Transparent; - chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom; - chartArea1.BackHatchStyle = System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle.DashedHorizontal; - chartArea1.Name = "ChartArea1"; - this.chartSensorStatus.ChartAreas.Add(chartArea1); - legend1.BackColor = System.Drawing.Color.Transparent; - legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; - legend1.Name = "Legend1"; - this.chartSensorStatus.Legends.Add(legend1); - this.chartSensorStatus.Location = new System.Drawing.Point(6, 87); - this.chartSensorStatus.Name = "chartSensorStatus"; - series1.BorderColor = System.Drawing.Color.Transparent; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series1.Color = System.Drawing.Color.Red; - series1.Legend = "Legend1"; - series1.Name = "测量值"; - this.chartSensorStatus.Series.Add(series1); - this.chartSensorStatus.Size = new System.Drawing.Size(552, 262); - this.chartSensorStatus.TabIndex = 8; - this.chartSensorStatus.Text = "chart1"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.datetimeEndDate); - this.groupBox2.Controls.Add(this.datetimeBeginDate); - this.groupBox2.Controls.Add(this.buttonXQuery); - this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Controls.Add(this.label1); - this.groupBox2.Location = new System.Drawing.Point(6, 18); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(552, 58); - this.groupBox2.TabIndex = 7; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "查询条件"; - // - // datetimeEndDate - // - // - // - // - this.datetimeEndDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeEndDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeEndDate.ButtonDropDown.Visible = true; - this.datetimeEndDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeEndDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeEndDate.Location = new System.Drawing.Point(307, 23); - // - // - // - this.datetimeEndDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeEndDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeEndDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeEndDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeEndDate.Name = "datetimeEndDate"; - this.datetimeEndDate.ShowCheckBox = true; - this.datetimeEndDate.Size = new System.Drawing.Size(132, 21); - this.datetimeEndDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeEndDate.TabIndex = 14; - this.datetimeEndDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // datetimeBeginDate - // - // - // - // - this.datetimeBeginDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeBeginDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeBeginDate.ButtonDropDown.Visible = true; - this.datetimeBeginDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeBeginDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeBeginDate.Location = new System.Drawing.Point(87, 23); - // - // - // - this.datetimeBeginDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeBeginDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeBeginDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeBeginDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeBeginDate.Name = "datetimeBeginDate"; - this.datetimeBeginDate.ShowCheckBox = true; - this.datetimeBeginDate.Size = new System.Drawing.Size(148, 21); - this.datetimeBeginDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeBeginDate.TabIndex = 13; - this.datetimeBeginDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // buttonXQuery - // - this.buttonXQuery.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXQuery.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXQuery.Location = new System.Drawing.Point(463, 21); - this.buttonXQuery.Name = "buttonXQuery"; - this.buttonXQuery.Size = new System.Drawing.Size(53, 23); - this.buttonXQuery.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXQuery.TabIndex = 10; - this.buttonXQuery.Text = "查询"; - this.buttonXQuery.Click += new System.EventHandler(this.btn_Query_Click); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(241, 27); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(65, 12); - this.label2.TabIndex = 9; - this.label2.Text = "截止时间:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(16, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(65, 12); - this.label1.TabIndex = 9; - this.label1.Text = "起始时间:"; - // - // buttonX1 - // - this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonX1.Location = new System.Drawing.Point(485, 398); - this.buttonX1.Name = "buttonX1"; - this.buttonX1.Size = new System.Drawing.Size(53, 23); - this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonX1.TabIndex = 15; - this.buttonX1.Text = "关闭"; - this.buttonX1.Click += new System.EventHandler(this.btn_Cancel_Click); - // - // FrmQueryHistory - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(588, 433); - this.Controls.Add(this.buttonX1); - this.Controls.Add(this.groupBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryHistory"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器历史状态查询"; - this.Load += new System.EventHandler(this.Frm_LogManager_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryHistory_FormClosing); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).EndInit(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private GroupBox groupBox1; - private GroupBox groupBox2; - private Label label1; - private Chart chartSensorStatus; - private ButtonX buttonXQuery; - private DateTimeInput datetimeBeginDate; - private DateTimeInput datetimeEndDate; - private ButtonX buttonX1; - private Label label2; - } -} \ No newline at end of file diff --git a/FrmQueryHistory.resx b/FrmQueryHistory.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQueryHistory.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/FrmQueryMessage.cs b/FrmQueryMessage.cs deleted file mode 100644 index 42de5a2..0000000 --- a/FrmQueryMessage.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Data; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryMessage : Office2007Form - { - DataTable dt; - string sensorName = ""; - - static FrmQueryMessage frm; - public static void ShowForm(MainFrm mF,DataTable _dt, string _sensorName) - { - if (frm == null) - { - frm = new FrmQueryMessage(_dt, _sensorName); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryMessage(DataTable _dt,string _sensorName) - { - InitializeComponent(); - dt = _dt; - sensorName = _sensorName; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQueryMessage_Load(object sender, EventArgs e) - { - if (dt != null && dt.Rows.Count > 0) - { - Text += "-" + sensorName; - - DataTable dtNew = new DataTable(); - dtNew.Columns.Add("字段名"); - dtNew.Columns.Add("字段值"); - for (int i = 0; i < dt.Rows.Count; i++) - { - for (int j = 0; j < dt.Columns.Count; j++) - { - string[] row = { dt.Columns[j].ColumnName.Trim(), dt.Rows[i][j].ToString().Trim() }; - dtNew.Rows.Add(row); - } - } - dataGridViewX1.DataSource = dtNew; - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryMessage_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} diff --git a/FrmQueryMessage.designer.cs b/FrmQueryMessage.designer.cs deleted file mode 100644 index c59101d..0000000 --- a/FrmQueryMessage.designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System.ComponentModel; -using DevComponents.DotNetBar.Controls; - -namespace Cyberpipe -{ - partial class FrmQueryMessage - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX1 = new DevComponents.DotNetBar.Controls.DataGridViewX(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).BeginInit(); - this.SuspendLayout(); - // - // dataGridViewX1 - // - this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX1.Location = new System.Drawing.Point(0, 0); - this.dataGridViewX1.Name = "dataGridViewX1"; - this.dataGridViewX1.ReadOnly = true; - this.dataGridViewX1.RowHeadersVisible = false; - this.dataGridViewX1.RowTemplate.Height = 23; - this.dataGridViewX1.Size = new System.Drawing.Size(293, 317); - this.dataGridViewX1.TabIndex = 0; - // - // FrmQueryMessage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(293, 317); - this.Controls.Add(this.dataGridViewX1); - this.EnableGlass = false; - this.ForeColor = System.Drawing.Color.Black; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryMessage"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "信息查询"; - this.Load += new System.EventHandler(this.FrmQueryMessage_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryMessage_FormClosing); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private DataGridViewX dataGridViewX1; - } -} \ No newline at end of file diff --git a/FrmQueryMessage.resx b/FrmQueryMessage.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQueryMessage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/MainFrm.cs b/MainFrm.cs index e097e98..a99f2e1 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -41,7 +41,6 @@ GSOBalloonEx balloonEx2; GSOLayer layerTemp;//wxl注释,Globe1的临时图层 - GSOLayer layerTemp2;//wxl注释,Globe2的临时图层 FrmRedlineResult frmredResult = null; FrmMnModify frmModify; public bool frmRedlineResult = false; @@ -60,10 +59,6 @@ double m_dFlyAboveLine = 1; double m_dFlyAlongLineSpeed = 50; double m_dFlyAlongLineRotateSpeed = 50; - // 挖坑设置 - Double m_dDigPitValue = 3; - Double m_dDigPitWidthAlongLine = 6; - Boolean m_bDigPitByDepth = true; //选择管线 int selectState; //wxl 注释,表示是否已经计算过净距等了,1已计算,0未计算 //private OracleConnection connBackup = null; @@ -157,13 +152,9 @@ featureTooltip2 = new GSOBalloon(globeControl2.Handle); balloonEx2 = new GSOBalloonEx(globeControl2.Handle); Utility.SetBallons(featureTooltip, balloonEx); - panelOfTable.Height = 200; - RigthMenuSet(); - MenuSet(); - } /// @@ -886,37 +877,37 @@ double dsw = SW; if (SW > 1440) { - double myScreen = dsw/1440; - buttonX1.Width = (int) (buttonX1.Width*myScreen); - buttonX2.Width = (int) (buttonX2.Width*myScreen); - buttonX4.Width = (int) (buttonX4.Width*myScreen); - buttonX5.Width = (int) (buttonX5.Width*myScreen); - buttonX6.Width = (int) (buttonX6.Width*myScreen); - buttonX7.Width = (int) (buttonX8.Width*myScreen); - buttonX8.Width = (int) (buttonX8.Width*myScreen); - buttonX9.Width = (int) (buttonX9.Width*myScreen); - buttonX12.Width = (int) (buttonX12.Width*myScreen); - buttonX14.Width = (int) (buttonX14.Width*myScreen); - buttonX15.Width = (int) (buttonX15.Width*myScreen); - buttonX16.Width = (int) (buttonX16.Width*myScreen); - buttonX17.Width = (int) (buttonX17.Width*myScreen); + double myScreen = dsw / 1440; + buttonX1.Width = (int)(buttonX1.Width * myScreen); + buttonX2.Width = (int)(buttonX2.Width * myScreen); + buttonX4.Width = (int)(buttonX4.Width * myScreen); + buttonX5.Width = (int)(buttonX5.Width * myScreen); + buttonX6.Width = (int)(buttonX6.Width * myScreen); + buttonX7.Width = (int)(buttonX8.Width * myScreen); + buttonX8.Width = (int)(buttonX8.Width * myScreen); + buttonX9.Width = (int)(buttonX9.Width * myScreen); + buttonX12.Width = (int)(buttonX12.Width * myScreen); + buttonX14.Width = (int)(buttonX14.Width * myScreen); + buttonX15.Width = (int)(buttonX15.Width * myScreen); + buttonX16.Width = (int)(buttonX16.Width * myScreen); + buttonX17.Width = (int)(buttonX17.Width * myScreen); - labelX1.Width = (int) (labelX1.Width*myScreen); - labelX2.Width = (int) (labelX2.Width*myScreen); - labelX3.Width = (int) (labelX3.Width*myScreen); - labelX6.Width = (int) (labelX6.Width*myScreen); - labelX8.Width = (int) (labelX8.Width*myScreen); - labelX9.Width = (int) (labelX9.Width*myScreen); - labelX12.Width = (int) (labelX12.Width*myScreen); - labelX13.Width = (int) (labelX13.Width*myScreen); - labelX14.Width = (int) (labelX14.Width*myScreen); - labelX16.Width = (int) (labelX16.Width*myScreen); - labelX17.Width = (int) (labelX17.Width*myScreen); - labelX11.Width = (int) (labelX11.Width*myScreen); - labelX19.Width = (int) (labelX19.Width*myScreen); - labelX21.Width = (int) (labelX21.Width*myScreen); - labelX22.Width = (int) (labelX22.Width*myScreen); - labelX24.Width = (int) (labelX24.Width*myScreen); + labelX1.Width = (int)(labelX1.Width * myScreen); + labelX2.Width = (int)(labelX2.Width * myScreen); + labelX3.Width = (int)(labelX3.Width * myScreen); + labelX6.Width = (int)(labelX6.Width * myScreen); + labelX8.Width = (int)(labelX8.Width * myScreen); + labelX9.Width = (int)(labelX9.Width * myScreen); + labelX12.Width = (int)(labelX12.Width * myScreen); + labelX13.Width = (int)(labelX13.Width * myScreen); + labelX14.Width = (int)(labelX14.Width * myScreen); + labelX16.Width = (int)(labelX16.Width * myScreen); + labelX17.Width = (int)(labelX17.Width * myScreen); + labelX11.Width = (int)(labelX11.Width * myScreen); + labelX19.Width = (int)(labelX19.Width * myScreen); + labelX21.Width = (int)(labelX21.Width * myScreen); + labelX22.Width = (int)(labelX22.Width * myScreen); + labelX24.Width = (int)(labelX24.Width * myScreen); } sideBar1.Visible = false; sideBar1.ExpandedPanel = sideBarPanelItem3; @@ -1040,7 +1031,7 @@ globeControl1.Globe.UserBackgroundColor = Color.White; globeControl1.Globe.FlyAlongLineSpeed = m_dFlyAlongLineSpeed; globeControl1.Globe.FlyAlongLineRotateSpeed = m_dFlyAlongLineRotateSpeed; - globeControl1.Globe.FlyToPointSpeed = globeControl1.Globe.FlyToPointSpeed*3; + globeControl1.Globe.FlyToPointSpeed = globeControl1.Globe.FlyToPointSpeed * 3; globeControl1.Globe.EditSnapObject = true; globeControl1.Globe.IsReleaseMemOutOfView = true; globeControl1.Globe.ControlPanel.Visible = true; @@ -1059,7 +1050,7 @@ globeControl2.Globe.UserBackgroundColor = Color.White; globeControl2.Globe.FlyAlongLineSpeed = m_dFlyAlongLineSpeed; globeControl2.Globe.FlyAlongLineRotateSpeed = m_dFlyAlongLineRotateSpeed; - globeControl2.Globe.FlyToPointSpeed = globeControl2.Globe.FlyToPointSpeed*3; + globeControl2.Globe.FlyToPointSpeed = globeControl2.Globe.FlyToPointSpeed * 3; globeControl2.Globe.EditSnapObject = true; globeControl2.Globe.IsReleaseMemOutOfView = true; globeControl2.Globe.ControlPanel.Visible = false; @@ -1086,7 +1077,6 @@ //添加临时图层 layerTemp = globeControl1.Globe.Layers.Add(Application.StartupPath + "\\tempLgdData.lgd"); - layerTemp2 = globeControl2.Globe.Layers.Add(Application.StartupPath + "\\tempLgdData2.lgd"); if (layerTemp != null) { layerTemp.MaxVisibleAltitude = 1000; @@ -1158,11 +1148,11 @@ private void connectServer() { - globeControl1.Globe.ConnectServer(Utility.serverip, Utility.serverport, "", ""); //加载locaServer中的数据 -// globeControl2.Globe.ConnectServer(Utility.serverip, Utility.serverport, "", ""); //加载locaServer中的数据 + globeControl1.Globe.ConnectServer(Utility.serverip, Utility.serverport, "", ""); //加载locaServer中的数据 + globeControl2.Globe.ConnectServer(Utility.serverip, Utility.serverport, "", ""); //加载locaServer中的数据 //初始化TreeView - initLayerTree(); + initLayerTree(); } /// /// 加载地球1、2的图层 @@ -1232,7 +1222,9 @@ } } } - this.Invoke((EventHandler) delegate + + + this.Invoke((EventHandler)delegate { connectServer(); }); @@ -1298,11 +1290,11 @@ private void MainFrm_Load(object sender, EventArgs e) { - + layerTree.Nodes.Add("正在加载,请稍后……");//树状图加载在图层加载之后,故增加提示 initGlobalControl(); //initGlobalMap(); -// initLayerTree(); + // initLayerTree(); initMarkerTree(); initLayout(); loadData(); @@ -1370,12 +1362,12 @@ tempnode.Checked = node.Checked && feature.Visible; tempnode.Tag = feature; node.Nodes.Add(tempnode); - GSOFeatureFolder featureFolder = (GSOFeatureFolder) feature; + GSOFeatureFolder featureFolder = (GSOFeatureFolder)feature; VisitFeature3Ds(featureFolder.Features, tempnode); } else { - TreeNode tempnode = new TreeNode {Text = feature.Name}; + TreeNode tempnode = new TreeNode { Text = feature.Name }; if (feature.Geometry != null) { switch (feature.Geometry.Type) @@ -1596,7 +1588,7 @@ LayerSelectableMenuItem.Checked = gsoLayer.Selectable; LayerEditableMenuItem.Checked = gsoLayer.Editable; } - + } //wxl Tag更正 /// @@ -1615,7 +1607,8 @@ globeControl1.Globe.Layers.Remove(layer); globeControl1.Globe.Refresh(); node.Remove(); - }else if (node.Parent.Text.Trim() == "我的地标") + } + else if (node.Parent.Text.Trim() == "我的地标") { if (!(node.Tag is GSOFeature)) return; GSOFeature f = node.Tag as GSOFeature; @@ -1623,13 +1616,13 @@ globeControl1.Globe.Refresh(); node.Remove(); } - + } //wxl Tag更正 private void 可编辑ToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode node = layerTree.SelectedNode; - if (node == null || + if (node == null || node.Parent == null || node.Parent.Text.Trim() != "临时图层" || !(node.Tag is GSOLayer)) return; GSOLayer layer = node.Tag as GSOLayer; @@ -1640,7 +1633,7 @@ private void 保存ToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode node = layerTree.SelectedNode; - if (node == null||node.Tag==null) return; + if (node == null || node.Tag == null) return; GSOLayer layer = node.Tag as GSOLayer; if (layer == null) return; layer.Dataset.Save(); @@ -1649,13 +1642,13 @@ private void 定位ToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode node = layerTree.SelectedNode; - if (node == null||node.Parent==null) return; + if (node == null || node.Parent == null) return; if (node.Parent.Text.Trim() == "临时图层") { GSOLayer lsLayer = node.Tag as GSOLayer; if (lsLayer == null) { - LogHelper.WriteLog(typeof(MainFrm),"要定位的临时图层不存在:"+node.Text); + LogHelper.WriteLog(typeof(MainFrm), "要定位的临时图层不存在:" + node.Text); return; } double x = lsLayer.LatLonBounds.Center.X; @@ -1802,10 +1795,20 @@ FrmBaseLineProfillAnalysis dlg = new FrmBaseLineProfillAnalysis(globeControl1.Globe, e.Polyline); dlg.Show(this); globeControl1.Globe.ClearLastTrackPolyline(); - /* - FrmRoadHDM f = new FrmRoadHDM(); - f.Show() - * **/ + } + //沿线开挖 + else if (trackPolylineEndMode == EnumTrackPolylineEndMode.YXKW_Analysis) + { + FrmDigPitSetting dlg = new FrmDigPitSetting(globeControl1, e.Polyline); + dlg.Show(); + } + else if (trackPolylineEndMode == EnumTrackPolylineEndMode.JLBZ_Analysis) + { + GSOFeature feature = new GSOFeature(); + feature.Geometry = e.Polyline; + + MarkTools.getInstance().showMarker(feature, + globeControl1, EnumMarkLayer.Mark_Distance, ""); } trackPolylineEndMode = EnumTrackPolylineEndMode.Default_Analysis; } @@ -1919,7 +1922,7 @@ LogError.PublishError(ex); } } - + /// /// 添加管线、隧道、城市七线绘制完成事件 /// @@ -1929,7 +1932,7 @@ { if (e.Button != MouseButtons.Left) return; - if (enumDesignMode==EnumDesignMode.AddPipe + if (enumDesignMode == EnumDesignMode.AddPipe && globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//添加管线 { GSOLayer layerDest = globeControl1.Globe.DestLayerFeatureAdd; @@ -1945,7 +1948,7 @@ } } } - if (enumDesignMode==EnumDesignMode.AddTunnel + if (enumDesignMode == EnumDesignMode.AddTunnel && globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//创建隧道 { GSOLayer tunnel = globeControl1.Globe.Layers.GetLayerByCaption("隧道"); @@ -1958,9 +1961,9 @@ //tunnel.Save(); } } - + } - if (enumDesignMode==EnumDesignMode.AddCitySevenLine + if (enumDesignMode == EnumDesignMode.AddCitySevenLine && globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//绘制城市七线 { CitySevenLine citySevenLine = globeControl1.Tag as CitySevenLine; @@ -1983,7 +1986,7 @@ globeControl1.Globe.DestLayerFeatureAdd = null; } globeControl1.Refresh(); - enumDesignMode=EnumDesignMode.Null; + enumDesignMode = EnumDesignMode.Null; globeControl1.Globe.Action = EnumAction3D.ActionNull; } @@ -2902,29 +2905,6 @@ clearFeatureHighLight(); } /// - /// 设置菜单的选中状态 - /// - private void ActionToolMenuChecked() - { - if (globeControl1.Globe.Action != EnumAction3D.TrackPolyline) - { - 横断面分析ToolStripMenuItem.Checked = false; - 道路断面分析ToolStripMenuItem.Checked = false; - 基线剖面分析ToolStripMenuItem.Checked = false; - 沿线开挖ToolStripMenuItem.Checked = false; - } - if (globeControl1.Globe.Action != EnumAction3D.NormalHit) - { - 关阀分析ToolStripMenuItem.Checked = false; - 连通分析ToolStripMenuItem.Checked = false; - } - if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon) - { - 多边形开挖ToolStripMenuItem.Checked = false; - 挖方量分析ToolStripMenuItem.Checked = false; - } - } - /// /// 主窗体关闭事件处理 /// /// @@ -3186,7 +3166,7 @@ { return new GSOPoint3d(); } - + GSOGeoPolyline3D disline = new GSOGeoPolyline3D(); GSOPoint3ds point3Ds = new GSOPoint3ds(); point3Ds.Add(pntIntersect1); @@ -3244,17 +3224,17 @@ /// /// private void CollisionAnalysis(GSOFeature selectedFeature, List pipelineLayerNames) - { - List result = DoublePanelAnalysis.CollisionAnalysis(globeControl1, selectedFeature, pipelineLayerNames); + { + List result = DoublePanelAnalysis.CollisionAnalysis(globeControl1, selectedFeature, pipelineLayerNames); if (result == null) { selectState = 0; MessageBox.Show("请选择一条管线!"); return; } - - string caption = selectedFeature.Dataset.Caption; - foreach (FeatureAnalysisInfo featureAnalysisInfo in result) + + string caption = selectedFeature.Dataset.Caption; + foreach (FeatureAnalysisInfo featureAnalysisInfo in result) { string feat2Caption = featureAnalysisInfo.feature.Dataset.Caption; featureAnalysisInfo.feature.HighLight = true; @@ -3349,7 +3329,7 @@ } #endregion - + /// /// 垂直净距分析中 表格行的 双击定位 功能。 与覆土分析的实现方法不同,主要原因是需要标注垂距 /// @@ -5500,7 +5480,7 @@ private void 关联查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "关联查询"); - + if (globeControl1.Globe.SelObjectCount != 1) { MessageBox.Show("请选中一个对象!", "提示"); @@ -5530,7 +5510,7 @@ private void buttonItemClear_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "清除分析"); - + globeControl1.Globe.ClearMeasure(); layerTemp.RemoveAllFeature(); 高度量算ToolStripMenuItem1.Checked = false; @@ -5556,17 +5536,6 @@ // ClearUpDownTraceAnalysis(); //清除上下游分析 globeControl1.Globe.RemoveAllPits();//清除所有坑 MarkTools.removeAllMarker(globeControl1);//清除所有标注 - #region wxl 这段不清楚什么用处,注释掉,对系统没有影响 - - // if (layerMarkerTree != null && layerMarkerTree.Nodes.Count > 0) - // { - // for (int i = 0; i < layerMarkerTree.Nodes[0].Nodes.Count; i++) - // { - // layerMarkerTree.Nodes[0].Nodes[i].Nodes.Clear(); - // } - // } - #endregion - clearFeatureHighLight();//取消管线高亮 GSOLayer layerGround = globeControl1.Globe.Layers.GetLayerByCaption(Utility.roadLayerName);//("180fd"); @@ -5574,10 +5543,11 @@ { layerGround.Visible = true; } - globeControl1.Refresh(); - globeControl2.Refresh(); ClearRedlineAnalyseResult(); globeControl1.Globe.Action = EnumAction3D.ActionNull; + + globeControl1.Refresh(); + globeControl2.Refresh(); } /// /// 管线长度全区域统计 @@ -5622,7 +5592,7 @@ /// /// private void 阀门数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) - { + { LogManager.saveLog(Utility.userName, "阀门数量统计"); trackflag = "valvequery"; @@ -6010,7 +5980,6 @@ trackflag = "digFillAnalysis"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; - ActionToolMenuChecked(); } /// /// 沿线开挖 @@ -6021,28 +5990,9 @@ { LogManager.saveLog(Utility.userName, "沿线开挖"); - if (!沿线开挖ToolStripMenuItem.Checked) - { - FrmDigPitSetting dlg = new FrmDigPitSetting(m_dDigPitValue, m_bDigPitByDepth, m_dDigPitWidthAlongLine); - if (dlg.ShowDialog() == DialogResult.OK) - { - m_dDigPitValue = dlg.m_dDigPitValue; - m_bDigPitByDepth = dlg.m_bDigPitByDepth; - m_dDigPitWidthAlongLine = dlg.m_dDigPitWidthAlongLine; - trackflag = "LineDigPit"; - globeControl1.Globe.Action = EnumAction3D.TrackPolyline; - globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true; - globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack; - 沿线开挖ToolStripMenuItem.Checked = true; - } - } - else - { - globeControl1.Globe.Action = EnumAction3D.ActionNull; - 沿线开挖ToolStripMenuItem.Checked = false; - globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = false; - } - ActionToolMenuChecked(); + globeControl1.Globe.Action = EnumAction3D.TrackPolyline; + globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack; + trackPolylineEndMode = EnumTrackPolylineEndMode.YXKW_Analysis; } /// /// 创建隧道 @@ -6368,7 +6318,7 @@ return; } GSOGeoPolyline3D selLine = resFeature.Geometry as GSOGeoPolyline3D; - if (selLine == null||selLine[0].Count <= 1) + if (selLine == null || selLine[0].Count <= 1) { return; } @@ -6401,13 +6351,15 @@ /// /// 距离标注 /// -// bool distanceMarker; + // bool distanceMarker; private void 距离标注ToolStripMenuItem_Click(object sender, EventArgs e) { //日志记录 LogManager.saveLog(Utility.userName, 距离标注ToolStripMenuItem.Text); globeControl1.Globe.Action = EnumAction3D.TrackPolyline; + trackPolylineEndMode = EnumTrackPolylineEndMode.JLBZ_Analysis; + } /// /// 自定义标注 @@ -6817,11 +6769,6 @@ LogManager.saveLog(Utility.userName, buttonItemSJGL2.Text); FrmValiData frm = new FrmValiData(globeControl1); frm.ShowDialog(); - - /* - ValidateInfo validateInfo = ValidateConfig.LoadConfig(); - String ss = ""; - */ } /// /// 数据预处理 @@ -7045,7 +6992,7 @@ /// /// /// - + private void buttonItemBJ4_Click(object sender, EventArgs e) { //日志记录 @@ -7056,7 +7003,7 @@ { globeControl1.Globe.Action = EnumAction3D.DrawPolyline; enumDesignMode = EnumDesignMode.AddCitySevenLine; - + CitySevenLine citySevenLine = new CitySevenLine(frm.citySevenLineName, frm.citySevenLineType); globeControl1.Tag = citySevenLine; @@ -7294,7 +7241,7 @@ MessageBox.Show("成功删除"+delSuccessCount+"个模型!", "提示"); globeControl1.Globe.Action = EnumAction3D.ActionNull; } - + /// 红线审核 /// /// @@ -7334,7 +7281,7 @@ } void addRedLineDataToDataGridView(List dt, DataGridView dataGridView) { - DataTable table=new DataTable(); + DataTable table = new DataTable(); table.Columns.Add("红线编号"); table.Columns.Add("管线类型"); table.Columns.Add("侵占面积/m³"); diff --git a/EnumEventMode.cs b/EnumEventMode.cs index c905a07..0fc543d 100644 --- a/EnumEventMode.cs +++ b/EnumEventMode.cs @@ -10,7 +10,11 @@ Default_Analysis = 0, //无分析 HDM_Analysis = 1, //横断面分析 DLDM_Analysis = 2,//道路断面分析 - JXPM_Analysis = 3 //基线剖面分析 + JXPM_Analysis = 3, //基线剖面分析 + //add bu yanxiaowei + YXKW_Analysis=4,//沿线开挖 + JLBZ_Analysis=5// + } //模拟规划设计模式 diff --git a/FrmDigPitSetting.cs b/FrmDigPitSetting.cs index 6e77b24..5c4ca66 100644 --- a/FrmDigPitSetting.cs +++ b/FrmDigPitSetting.cs @@ -1,21 +1,24 @@ using System; using System.Windows.Forms; using DevComponents.DotNetBar; +using GeoScene.Globe; +using GeoScene.Data; +using GeoScene.Engine; namespace Cyberpipe { public partial class FrmDigPitSetting : Office2007Form { - public Double m_dDigPitValue = 3; - public Boolean m_bDigPitByDepth = true; - public Double m_dDigPitWidthAlongLine = 6; - public FrmDigPitSetting(Double dDigPitValue, Boolean bDigPitByDepth, Double dDigPitWidthAlongLine) + Double m_dDigPitValue = 3; + Boolean m_bDigPitByDepth = true; + Double m_dDigPitWidthAlongLine = 6; + private GSOGlobeControl globeControl; + private GSOGeoPolyline3D polyLine = null; + public FrmDigPitSetting(GSOGlobeControl _globeControl, GSOGeoPolyline3D _polyLine) { InitializeComponent(); - m_dDigPitValue = dDigPitValue; - m_bDigPitByDepth = bDigPitByDepth; - m_dDigPitWidthAlongLine = dDigPitWidthAlongLine; - + globeControl = _globeControl; + polyLine = _polyLine; } /// /// 窗体初始化事件处理 @@ -40,8 +43,39 @@ MessageBox.Show("请输入完整的参数信息!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); return; } + DigAlongLine(); + globeControl.Refresh(); + this.Close(); + } + + + private void DigAlongLine() + { m_dDigPitValue = Convert.ToDouble(textBoxValue.Text); m_dDigPitWidthAlongLine = Convert.ToDouble(textBoxWidthAlongLine.Text); + + GSOGeoPolygon3D resPolygon = polyLine.CreateBuffer(m_dDigPitWidthAlongLine, false, 0, false, false); + + GSOGeoPit geoPit = new GSOGeoPit(); + geoPit.PitPolygon = resPolygon; + + if (m_bDigPitByDepth) + { + geoPit.PitDepth = m_dDigPitValue; + geoPit.PitDepthUsing = true; + } + else + { + geoPit.PitBottomAlt = m_dDigPitValue; + geoPit.PitDepthUsing = false; + } + + globeControl.Globe.AddPit("", geoPit); + GSOLayer layerGround = globeControl.Globe.Layers.GetLayerByCaption(Utility.roadLayerName); + if (layerGround != null) + layerGround.Visible = false; + // 清除当前TrackPolygonAnalysis的痕迹 + globeControl.Globe.ClearLastTrackPolyline(); } /// /// 取消事件处理 diff --git a/FrmQueryHistory.cs b/FrmQueryHistory.cs deleted file mode 100644 index 5bd7b98..0000000 --- a/FrmQueryHistory.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections; -using System.Data; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryHistory : Office2007Form - { - - string tableName = ""; - string eqtID = ""; - static FrmQueryHistory frm; - public static void ShowForm(MainFrm mF, string _tableName,string _eqtID) - { - if (frm == null) - { - frm = new FrmQueryHistory(_tableName, _eqtID); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryHistory(string _tableName, string _eqtID) - { - InitializeComponent(); - - tableName = _tableName; - eqtID = _eqtID; - } - - private void Frm_LogManager_Load(object sender, EventArgs e) - { - - } - /// - /// 查询按钮事件处理 - /// - /// - /// - private void btn_Query_Click(object sender, EventArgs e) - { - if (tableName != null) - { - string sql = "select * from " + Utility.sensorDatabase + "." + tableName + " "; - - ArrayList filters = new ArrayList(); - - if (datetimeBeginDate.LockUpdateChecked || datetimeEndDate.LockUpdateChecked) - { - if (datetimeBeginDate.LockUpdateChecked && datetimeEndDate.LockUpdateChecked == false) - { - - string sql2 = " RecordDate >='" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql2); - } - else if (datetimeEndDate.LockUpdateChecked && datetimeBeginDate.LockUpdateChecked == false) - { - string sql3 = " RecordDate <= '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql3); - } - else - { - string sql4 = " RecordDate between '" + datetimeBeginDate.Value.ToString("yyyy-MM-dd") + "' and '" + datetimeEndDate.Value.ToString("yyyy-MM-dd") + "'"; - filters.Add(sql4); - } - } - - string[] aa = (string[])(filters.ToArray(typeof(string))); - if (aa.Length > 0) - { - sql += " where " + string.Join(" and ", aa); - } - sql += " and EqtID=" + eqtID + " group by RecordDate,RecordTime order by RecordDate,RecordTime limit 50;"; - try - { - DataTable dt = MySqlHelper.queryDataTable(sql); - if (dt != null && dt.Rows.Count > 0) - { - chartSensorStatus.Series[0].ChartType = SeriesChartType.Line; - chartSensorStatus.ChartAreas[0].AxisX.Interval = 2; - chartSensorStatus.ChartAreas[0].AxisX.Title = "时间"; - chartSensorStatus.ChartAreas[0].AxisY.Title = "测量值"; - chartSensorStatus.Series[0].Points.Clear(); - for (int i = 0; i < dt.Rows.Count; i++) - { - try - { - if (tableName == "Data_3a") - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["InstantValue"].ToString().Trim()); - } - else - { - chartSensorStatus.Series[0].Points.AddXY(((DateTime)dt.Rows[i]["RecordDate"]).ToString("yyyy-MM-dd").Trim() + " " + dt.Rows[i]["RecordTime"].ToString().Trim(), dt.Rows[i]["CollectValue"].ToString().Trim()); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - } - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - catch (Exception ex) - { - LogError.PublishError(ex); - MessageBox.Show(ex.Message); - } - } - else - { - MessageBox.Show("没有找到任何数据!", "提示"); - } - } - /// - /// 关闭按钮事件处理 - /// - /// - /// - private void btn_Cancel_Click(object sender, EventArgs e) - { - Close(); - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryHistory_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} \ No newline at end of file diff --git a/FrmQueryHistory.designer.cs b/FrmQueryHistory.designer.cs deleted file mode 100644 index 47ab342..0000000 --- a/FrmQueryHistory.designer.cs +++ /dev/null @@ -1,293 +0,0 @@ -using System.ComponentModel; -using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; -using DevComponents.DotNetBar; -using DevComponents.Editors.DateTimeAdv; - -namespace Cyberpipe -{ - partial class FrmQueryHistory - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.chartSensorStatus = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.datetimeEndDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.datetimeBeginDate = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.buttonXQuery = new DevComponents.DotNetBar.ButtonX(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).BeginInit(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).BeginInit(); - this.SuspendLayout(); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.chartSensorStatus); - this.groupBox1.Controls.Add(this.groupBox2); - this.groupBox1.Location = new System.Drawing.Point(12, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(564, 367); - this.groupBox1.TabIndex = 6; - this.groupBox1.TabStop = false; - // - // chartSensorStatus - // - this.chartSensorStatus.BackColor = System.Drawing.Color.Transparent; - chartArea1.AxisX.MajorGrid.Enabled = false; - chartArea1.BackColor = System.Drawing.Color.Transparent; - chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom; - chartArea1.BackHatchStyle = System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle.DashedHorizontal; - chartArea1.Name = "ChartArea1"; - this.chartSensorStatus.ChartAreas.Add(chartArea1); - legend1.BackColor = System.Drawing.Color.Transparent; - legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; - legend1.Name = "Legend1"; - this.chartSensorStatus.Legends.Add(legend1); - this.chartSensorStatus.Location = new System.Drawing.Point(6, 87); - this.chartSensorStatus.Name = "chartSensorStatus"; - series1.BorderColor = System.Drawing.Color.Transparent; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series1.Color = System.Drawing.Color.Red; - series1.Legend = "Legend1"; - series1.Name = "测量值"; - this.chartSensorStatus.Series.Add(series1); - this.chartSensorStatus.Size = new System.Drawing.Size(552, 262); - this.chartSensorStatus.TabIndex = 8; - this.chartSensorStatus.Text = "chart1"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.datetimeEndDate); - this.groupBox2.Controls.Add(this.datetimeBeginDate); - this.groupBox2.Controls.Add(this.buttonXQuery); - this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Controls.Add(this.label1); - this.groupBox2.Location = new System.Drawing.Point(6, 18); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(552, 58); - this.groupBox2.TabIndex = 7; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "查询条件"; - // - // datetimeEndDate - // - // - // - // - this.datetimeEndDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeEndDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeEndDate.ButtonDropDown.Visible = true; - this.datetimeEndDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeEndDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeEndDate.Location = new System.Drawing.Point(307, 23); - // - // - // - this.datetimeEndDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeEndDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeEndDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeEndDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeEndDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeEndDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeEndDate.Name = "datetimeEndDate"; - this.datetimeEndDate.ShowCheckBox = true; - this.datetimeEndDate.Size = new System.Drawing.Size(132, 21); - this.datetimeEndDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeEndDate.TabIndex = 14; - this.datetimeEndDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // datetimeBeginDate - // - // - // - // - this.datetimeBeginDate.BackgroundStyle.Class = "DateTimeInputBackground"; - this.datetimeBeginDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.datetimeBeginDate.ButtonDropDown.Visible = true; - this.datetimeBeginDate.CustomFormat = "yyyy-MM-dd"; - this.datetimeBeginDate.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.datetimeBeginDate.Location = new System.Drawing.Point(87, 23); - // - // - // - this.datetimeBeginDate.MonthCalendar.AnnuallyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.BackColor = System.Drawing.SystemColors.Window; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.ClearButtonVisible = true; - // - // - // - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.DisplayMonth = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - this.datetimeBeginDate.MonthCalendar.MarkedDates = new System.DateTime[0]; - this.datetimeBeginDate.MonthCalendar.MonthlyMarkedDates = new System.DateTime[0]; - // - // - // - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.Class = ""; - this.datetimeBeginDate.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.datetimeBeginDate.MonthCalendar.TodayButtonVisible = true; - this.datetimeBeginDate.MonthCalendar.WeeklyMarkedDays = new System.DayOfWeek[0]; - this.datetimeBeginDate.Name = "datetimeBeginDate"; - this.datetimeBeginDate.ShowCheckBox = true; - this.datetimeBeginDate.Size = new System.Drawing.Size(148, 21); - this.datetimeBeginDate.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.datetimeBeginDate.TabIndex = 13; - this.datetimeBeginDate.Value = new System.DateTime(2014, 4, 1, 0, 0, 0, 0); - // - // buttonXQuery - // - this.buttonXQuery.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXQuery.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXQuery.Location = new System.Drawing.Point(463, 21); - this.buttonXQuery.Name = "buttonXQuery"; - this.buttonXQuery.Size = new System.Drawing.Size(53, 23); - this.buttonXQuery.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXQuery.TabIndex = 10; - this.buttonXQuery.Text = "查询"; - this.buttonXQuery.Click += new System.EventHandler(this.btn_Query_Click); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(241, 27); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(65, 12); - this.label2.TabIndex = 9; - this.label2.Text = "截止时间:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(16, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(65, 12); - this.label1.TabIndex = 9; - this.label1.Text = "起始时间:"; - // - // buttonX1 - // - this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonX1.Location = new System.Drawing.Point(485, 398); - this.buttonX1.Name = "buttonX1"; - this.buttonX1.Size = new System.Drawing.Size(53, 23); - this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonX1.TabIndex = 15; - this.buttonX1.Text = "关闭"; - this.buttonX1.Click += new System.EventHandler(this.btn_Cancel_Click); - // - // FrmQueryHistory - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(588, 433); - this.Controls.Add(this.buttonX1); - this.Controls.Add(this.groupBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryHistory"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器历史状态查询"; - this.Load += new System.EventHandler(this.Frm_LogManager_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryHistory_FormClosing); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.chartSensorStatus)).EndInit(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeEndDate)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.datetimeBeginDate)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private GroupBox groupBox1; - private GroupBox groupBox2; - private Label label1; - private Chart chartSensorStatus; - private ButtonX buttonXQuery; - private DateTimeInput datetimeBeginDate; - private DateTimeInput datetimeEndDate; - private ButtonX buttonX1; - private Label label2; - } -} \ No newline at end of file diff --git a/FrmQueryHistory.resx b/FrmQueryHistory.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQueryHistory.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/FrmQueryMessage.cs b/FrmQueryMessage.cs deleted file mode 100644 index 42de5a2..0000000 --- a/FrmQueryMessage.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Data; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQueryMessage : Office2007Form - { - DataTable dt; - string sensorName = ""; - - static FrmQueryMessage frm; - public static void ShowForm(MainFrm mF,DataTable _dt, string _sensorName) - { - if (frm == null) - { - frm = new FrmQueryMessage(_dt, _sensorName); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQueryMessage(DataTable _dt,string _sensorName) - { - InitializeComponent(); - dt = _dt; - sensorName = _sensorName; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQueryMessage_Load(object sender, EventArgs e) - { - if (dt != null && dt.Rows.Count > 0) - { - Text += "-" + sensorName; - - DataTable dtNew = new DataTable(); - dtNew.Columns.Add("字段名"); - dtNew.Columns.Add("字段值"); - for (int i = 0; i < dt.Rows.Count; i++) - { - for (int j = 0; j < dt.Columns.Count; j++) - { - string[] row = { dt.Columns[j].ColumnName.Trim(), dt.Rows[i][j].ToString().Trim() }; - dtNew.Rows.Add(row); - } - } - dataGridViewX1.DataSource = dtNew; - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQueryMessage_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - } -} diff --git a/FrmQueryMessage.designer.cs b/FrmQueryMessage.designer.cs deleted file mode 100644 index c59101d..0000000 --- a/FrmQueryMessage.designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System.ComponentModel; -using DevComponents.DotNetBar.Controls; - -namespace Cyberpipe -{ - partial class FrmQueryMessage - { - /// - /// Required designer variable. - /// - private IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX1 = new DevComponents.DotNetBar.Controls.DataGridViewX(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).BeginInit(); - this.SuspendLayout(); - // - // dataGridViewX1 - // - this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX1.Location = new System.Drawing.Point(0, 0); - this.dataGridViewX1.Name = "dataGridViewX1"; - this.dataGridViewX1.ReadOnly = true; - this.dataGridViewX1.RowHeadersVisible = false; - this.dataGridViewX1.RowTemplate.Height = 23; - this.dataGridViewX1.Size = new System.Drawing.Size(293, 317); - this.dataGridViewX1.TabIndex = 0; - // - // FrmQueryMessage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(293, 317); - this.Controls.Add(this.dataGridViewX1); - this.EnableGlass = false; - this.ForeColor = System.Drawing.Color.Black; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQueryMessage"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "信息查询"; - this.Load += new System.EventHandler(this.FrmQueryMessage_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQueryMessage_FormClosing); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private DataGridViewX dataGridViewX1; - } -} \ No newline at end of file diff --git a/FrmQueryMessage.resx b/FrmQueryMessage.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQueryMessage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/MainFrm.cs b/MainFrm.cs index e097e98..a99f2e1 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -41,7 +41,6 @@ GSOBalloonEx balloonEx2; GSOLayer layerTemp;//wxl注释,Globe1的临时图层 - GSOLayer layerTemp2;//wxl注释,Globe2的临时图层 FrmRedlineResult frmredResult = null; FrmMnModify frmModify; public bool frmRedlineResult = false; @@ -60,10 +59,6 @@ double m_dFlyAboveLine = 1; double m_dFlyAlongLineSpeed = 50; double m_dFlyAlongLineRotateSpeed = 50; - // 挖坑设置 - Double m_dDigPitValue = 3; - Double m_dDigPitWidthAlongLine = 6; - Boolean m_bDigPitByDepth = true; //选择管线 int selectState; //wxl 注释,表示是否已经计算过净距等了,1已计算,0未计算 //private OracleConnection connBackup = null; @@ -157,13 +152,9 @@ featureTooltip2 = new GSOBalloon(globeControl2.Handle); balloonEx2 = new GSOBalloonEx(globeControl2.Handle); Utility.SetBallons(featureTooltip, balloonEx); - panelOfTable.Height = 200; - RigthMenuSet(); - MenuSet(); - } /// @@ -886,37 +877,37 @@ double dsw = SW; if (SW > 1440) { - double myScreen = dsw/1440; - buttonX1.Width = (int) (buttonX1.Width*myScreen); - buttonX2.Width = (int) (buttonX2.Width*myScreen); - buttonX4.Width = (int) (buttonX4.Width*myScreen); - buttonX5.Width = (int) (buttonX5.Width*myScreen); - buttonX6.Width = (int) (buttonX6.Width*myScreen); - buttonX7.Width = (int) (buttonX8.Width*myScreen); - buttonX8.Width = (int) (buttonX8.Width*myScreen); - buttonX9.Width = (int) (buttonX9.Width*myScreen); - buttonX12.Width = (int) (buttonX12.Width*myScreen); - buttonX14.Width = (int) (buttonX14.Width*myScreen); - buttonX15.Width = (int) (buttonX15.Width*myScreen); - buttonX16.Width = (int) (buttonX16.Width*myScreen); - buttonX17.Width = (int) (buttonX17.Width*myScreen); + double myScreen = dsw / 1440; + buttonX1.Width = (int)(buttonX1.Width * myScreen); + buttonX2.Width = (int)(buttonX2.Width * myScreen); + buttonX4.Width = (int)(buttonX4.Width * myScreen); + buttonX5.Width = (int)(buttonX5.Width * myScreen); + buttonX6.Width = (int)(buttonX6.Width * myScreen); + buttonX7.Width = (int)(buttonX8.Width * myScreen); + buttonX8.Width = (int)(buttonX8.Width * myScreen); + buttonX9.Width = (int)(buttonX9.Width * myScreen); + buttonX12.Width = (int)(buttonX12.Width * myScreen); + buttonX14.Width = (int)(buttonX14.Width * myScreen); + buttonX15.Width = (int)(buttonX15.Width * myScreen); + buttonX16.Width = (int)(buttonX16.Width * myScreen); + buttonX17.Width = (int)(buttonX17.Width * myScreen); - labelX1.Width = (int) (labelX1.Width*myScreen); - labelX2.Width = (int) (labelX2.Width*myScreen); - labelX3.Width = (int) (labelX3.Width*myScreen); - labelX6.Width = (int) (labelX6.Width*myScreen); - labelX8.Width = (int) (labelX8.Width*myScreen); - labelX9.Width = (int) (labelX9.Width*myScreen); - labelX12.Width = (int) (labelX12.Width*myScreen); - labelX13.Width = (int) (labelX13.Width*myScreen); - labelX14.Width = (int) (labelX14.Width*myScreen); - labelX16.Width = (int) (labelX16.Width*myScreen); - labelX17.Width = (int) (labelX17.Width*myScreen); - labelX11.Width = (int) (labelX11.Width*myScreen); - labelX19.Width = (int) (labelX19.Width*myScreen); - labelX21.Width = (int) (labelX21.Width*myScreen); - labelX22.Width = (int) (labelX22.Width*myScreen); - labelX24.Width = (int) (labelX24.Width*myScreen); + labelX1.Width = (int)(labelX1.Width * myScreen); + labelX2.Width = (int)(labelX2.Width * myScreen); + labelX3.Width = (int)(labelX3.Width * myScreen); + labelX6.Width = (int)(labelX6.Width * myScreen); + labelX8.Width = (int)(labelX8.Width * myScreen); + labelX9.Width = (int)(labelX9.Width * myScreen); + labelX12.Width = (int)(labelX12.Width * myScreen); + labelX13.Width = (int)(labelX13.Width * myScreen); + labelX14.Width = (int)(labelX14.Width * myScreen); + labelX16.Width = (int)(labelX16.Width * myScreen); + labelX17.Width = (int)(labelX17.Width * myScreen); + labelX11.Width = (int)(labelX11.Width * myScreen); + labelX19.Width = (int)(labelX19.Width * myScreen); + labelX21.Width = (int)(labelX21.Width * myScreen); + labelX22.Width = (int)(labelX22.Width * myScreen); + labelX24.Width = (int)(labelX24.Width * myScreen); } sideBar1.Visible = false; sideBar1.ExpandedPanel = sideBarPanelItem3; @@ -1040,7 +1031,7 @@ globeControl1.Globe.UserBackgroundColor = Color.White; globeControl1.Globe.FlyAlongLineSpeed = m_dFlyAlongLineSpeed; globeControl1.Globe.FlyAlongLineRotateSpeed = m_dFlyAlongLineRotateSpeed; - globeControl1.Globe.FlyToPointSpeed = globeControl1.Globe.FlyToPointSpeed*3; + globeControl1.Globe.FlyToPointSpeed = globeControl1.Globe.FlyToPointSpeed * 3; globeControl1.Globe.EditSnapObject = true; globeControl1.Globe.IsReleaseMemOutOfView = true; globeControl1.Globe.ControlPanel.Visible = true; @@ -1059,7 +1050,7 @@ globeControl2.Globe.UserBackgroundColor = Color.White; globeControl2.Globe.FlyAlongLineSpeed = m_dFlyAlongLineSpeed; globeControl2.Globe.FlyAlongLineRotateSpeed = m_dFlyAlongLineRotateSpeed; - globeControl2.Globe.FlyToPointSpeed = globeControl2.Globe.FlyToPointSpeed*3; + globeControl2.Globe.FlyToPointSpeed = globeControl2.Globe.FlyToPointSpeed * 3; globeControl2.Globe.EditSnapObject = true; globeControl2.Globe.IsReleaseMemOutOfView = true; globeControl2.Globe.ControlPanel.Visible = false; @@ -1086,7 +1077,6 @@ //添加临时图层 layerTemp = globeControl1.Globe.Layers.Add(Application.StartupPath + "\\tempLgdData.lgd"); - layerTemp2 = globeControl2.Globe.Layers.Add(Application.StartupPath + "\\tempLgdData2.lgd"); if (layerTemp != null) { layerTemp.MaxVisibleAltitude = 1000; @@ -1158,11 +1148,11 @@ private void connectServer() { - globeControl1.Globe.ConnectServer(Utility.serverip, Utility.serverport, "", ""); //加载locaServer中的数据 -// globeControl2.Globe.ConnectServer(Utility.serverip, Utility.serverport, "", ""); //加载locaServer中的数据 + globeControl1.Globe.ConnectServer(Utility.serverip, Utility.serverport, "", ""); //加载locaServer中的数据 + globeControl2.Globe.ConnectServer(Utility.serverip, Utility.serverport, "", ""); //加载locaServer中的数据 //初始化TreeView - initLayerTree(); + initLayerTree(); } /// /// 加载地球1、2的图层 @@ -1232,7 +1222,9 @@ } } } - this.Invoke((EventHandler) delegate + + + this.Invoke((EventHandler)delegate { connectServer(); }); @@ -1298,11 +1290,11 @@ private void MainFrm_Load(object sender, EventArgs e) { - + layerTree.Nodes.Add("正在加载,请稍后……");//树状图加载在图层加载之后,故增加提示 initGlobalControl(); //initGlobalMap(); -// initLayerTree(); + // initLayerTree(); initMarkerTree(); initLayout(); loadData(); @@ -1370,12 +1362,12 @@ tempnode.Checked = node.Checked && feature.Visible; tempnode.Tag = feature; node.Nodes.Add(tempnode); - GSOFeatureFolder featureFolder = (GSOFeatureFolder) feature; + GSOFeatureFolder featureFolder = (GSOFeatureFolder)feature; VisitFeature3Ds(featureFolder.Features, tempnode); } else { - TreeNode tempnode = new TreeNode {Text = feature.Name}; + TreeNode tempnode = new TreeNode { Text = feature.Name }; if (feature.Geometry != null) { switch (feature.Geometry.Type) @@ -1596,7 +1588,7 @@ LayerSelectableMenuItem.Checked = gsoLayer.Selectable; LayerEditableMenuItem.Checked = gsoLayer.Editable; } - + } //wxl Tag更正 /// @@ -1615,7 +1607,8 @@ globeControl1.Globe.Layers.Remove(layer); globeControl1.Globe.Refresh(); node.Remove(); - }else if (node.Parent.Text.Trim() == "我的地标") + } + else if (node.Parent.Text.Trim() == "我的地标") { if (!(node.Tag is GSOFeature)) return; GSOFeature f = node.Tag as GSOFeature; @@ -1623,13 +1616,13 @@ globeControl1.Globe.Refresh(); node.Remove(); } - + } //wxl Tag更正 private void 可编辑ToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode node = layerTree.SelectedNode; - if (node == null || + if (node == null || node.Parent == null || node.Parent.Text.Trim() != "临时图层" || !(node.Tag is GSOLayer)) return; GSOLayer layer = node.Tag as GSOLayer; @@ -1640,7 +1633,7 @@ private void 保存ToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode node = layerTree.SelectedNode; - if (node == null||node.Tag==null) return; + if (node == null || node.Tag == null) return; GSOLayer layer = node.Tag as GSOLayer; if (layer == null) return; layer.Dataset.Save(); @@ -1649,13 +1642,13 @@ private void 定位ToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode node = layerTree.SelectedNode; - if (node == null||node.Parent==null) return; + if (node == null || node.Parent == null) return; if (node.Parent.Text.Trim() == "临时图层") { GSOLayer lsLayer = node.Tag as GSOLayer; if (lsLayer == null) { - LogHelper.WriteLog(typeof(MainFrm),"要定位的临时图层不存在:"+node.Text); + LogHelper.WriteLog(typeof(MainFrm), "要定位的临时图层不存在:" + node.Text); return; } double x = lsLayer.LatLonBounds.Center.X; @@ -1802,10 +1795,20 @@ FrmBaseLineProfillAnalysis dlg = new FrmBaseLineProfillAnalysis(globeControl1.Globe, e.Polyline); dlg.Show(this); globeControl1.Globe.ClearLastTrackPolyline(); - /* - FrmRoadHDM f = new FrmRoadHDM(); - f.Show() - * **/ + } + //沿线开挖 + else if (trackPolylineEndMode == EnumTrackPolylineEndMode.YXKW_Analysis) + { + FrmDigPitSetting dlg = new FrmDigPitSetting(globeControl1, e.Polyline); + dlg.Show(); + } + else if (trackPolylineEndMode == EnumTrackPolylineEndMode.JLBZ_Analysis) + { + GSOFeature feature = new GSOFeature(); + feature.Geometry = e.Polyline; + + MarkTools.getInstance().showMarker(feature, + globeControl1, EnumMarkLayer.Mark_Distance, ""); } trackPolylineEndMode = EnumTrackPolylineEndMode.Default_Analysis; } @@ -1919,7 +1922,7 @@ LogError.PublishError(ex); } } - + /// /// 添加管线、隧道、城市七线绘制完成事件 /// @@ -1929,7 +1932,7 @@ { if (e.Button != MouseButtons.Left) return; - if (enumDesignMode==EnumDesignMode.AddPipe + if (enumDesignMode == EnumDesignMode.AddPipe && globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//添加管线 { GSOLayer layerDest = globeControl1.Globe.DestLayerFeatureAdd; @@ -1945,7 +1948,7 @@ } } } - if (enumDesignMode==EnumDesignMode.AddTunnel + if (enumDesignMode == EnumDesignMode.AddTunnel && globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//创建隧道 { GSOLayer tunnel = globeControl1.Globe.Layers.GetLayerByCaption("隧道"); @@ -1958,9 +1961,9 @@ //tunnel.Save(); } } - + } - if (enumDesignMode==EnumDesignMode.AddCitySevenLine + if (enumDesignMode == EnumDesignMode.AddCitySevenLine && globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//绘制城市七线 { CitySevenLine citySevenLine = globeControl1.Tag as CitySevenLine; @@ -1983,7 +1986,7 @@ globeControl1.Globe.DestLayerFeatureAdd = null; } globeControl1.Refresh(); - enumDesignMode=EnumDesignMode.Null; + enumDesignMode = EnumDesignMode.Null; globeControl1.Globe.Action = EnumAction3D.ActionNull; } @@ -2902,29 +2905,6 @@ clearFeatureHighLight(); } /// - /// 设置菜单的选中状态 - /// - private void ActionToolMenuChecked() - { - if (globeControl1.Globe.Action != EnumAction3D.TrackPolyline) - { - 横断面分析ToolStripMenuItem.Checked = false; - 道路断面分析ToolStripMenuItem.Checked = false; - 基线剖面分析ToolStripMenuItem.Checked = false; - 沿线开挖ToolStripMenuItem.Checked = false; - } - if (globeControl1.Globe.Action != EnumAction3D.NormalHit) - { - 关阀分析ToolStripMenuItem.Checked = false; - 连通分析ToolStripMenuItem.Checked = false; - } - if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon) - { - 多边形开挖ToolStripMenuItem.Checked = false; - 挖方量分析ToolStripMenuItem.Checked = false; - } - } - /// /// 主窗体关闭事件处理 /// /// @@ -3186,7 +3166,7 @@ { return new GSOPoint3d(); } - + GSOGeoPolyline3D disline = new GSOGeoPolyline3D(); GSOPoint3ds point3Ds = new GSOPoint3ds(); point3Ds.Add(pntIntersect1); @@ -3244,17 +3224,17 @@ /// /// private void CollisionAnalysis(GSOFeature selectedFeature, List pipelineLayerNames) - { - List result = DoublePanelAnalysis.CollisionAnalysis(globeControl1, selectedFeature, pipelineLayerNames); + { + List result = DoublePanelAnalysis.CollisionAnalysis(globeControl1, selectedFeature, pipelineLayerNames); if (result == null) { selectState = 0; MessageBox.Show("请选择一条管线!"); return; } - - string caption = selectedFeature.Dataset.Caption; - foreach (FeatureAnalysisInfo featureAnalysisInfo in result) + + string caption = selectedFeature.Dataset.Caption; + foreach (FeatureAnalysisInfo featureAnalysisInfo in result) { string feat2Caption = featureAnalysisInfo.feature.Dataset.Caption; featureAnalysisInfo.feature.HighLight = true; @@ -3349,7 +3329,7 @@ } #endregion - + /// /// 垂直净距分析中 表格行的 双击定位 功能。 与覆土分析的实现方法不同,主要原因是需要标注垂距 /// @@ -5500,7 +5480,7 @@ private void 关联查询ToolStripMenuItem_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "关联查询"); - + if (globeControl1.Globe.SelObjectCount != 1) { MessageBox.Show("请选中一个对象!", "提示"); @@ -5530,7 +5510,7 @@ private void buttonItemClear_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, "清除分析"); - + globeControl1.Globe.ClearMeasure(); layerTemp.RemoveAllFeature(); 高度量算ToolStripMenuItem1.Checked = false; @@ -5556,17 +5536,6 @@ // ClearUpDownTraceAnalysis(); //清除上下游分析 globeControl1.Globe.RemoveAllPits();//清除所有坑 MarkTools.removeAllMarker(globeControl1);//清除所有标注 - #region wxl 这段不清楚什么用处,注释掉,对系统没有影响 - - // if (layerMarkerTree != null && layerMarkerTree.Nodes.Count > 0) - // { - // for (int i = 0; i < layerMarkerTree.Nodes[0].Nodes.Count; i++) - // { - // layerMarkerTree.Nodes[0].Nodes[i].Nodes.Clear(); - // } - // } - #endregion - clearFeatureHighLight();//取消管线高亮 GSOLayer layerGround = globeControl1.Globe.Layers.GetLayerByCaption(Utility.roadLayerName);//("180fd"); @@ -5574,10 +5543,11 @@ { layerGround.Visible = true; } - globeControl1.Refresh(); - globeControl2.Refresh(); ClearRedlineAnalyseResult(); globeControl1.Globe.Action = EnumAction3D.ActionNull; + + globeControl1.Refresh(); + globeControl2.Refresh(); } /// /// 管线长度全区域统计 @@ -5622,7 +5592,7 @@ /// /// private void 阀门数量统计ToolStripMenuItem1_Click(object sender, EventArgs e) - { + { LogManager.saveLog(Utility.userName, "阀门数量统计"); trackflag = "valvequery"; @@ -6010,7 +5980,6 @@ trackflag = "digFillAnalysis"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; - ActionToolMenuChecked(); } /// /// 沿线开挖 @@ -6021,28 +5990,9 @@ { LogManager.saveLog(Utility.userName, "沿线开挖"); - if (!沿线开挖ToolStripMenuItem.Checked) - { - FrmDigPitSetting dlg = new FrmDigPitSetting(m_dDigPitValue, m_bDigPitByDepth, m_dDigPitWidthAlongLine); - if (dlg.ShowDialog() == DialogResult.OK) - { - m_dDigPitValue = dlg.m_dDigPitValue; - m_bDigPitByDepth = dlg.m_bDigPitByDepth; - m_dDigPitWidthAlongLine = dlg.m_dDigPitWidthAlongLine; - trackflag = "LineDigPit"; - globeControl1.Globe.Action = EnumAction3D.TrackPolyline; - globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true; - globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack; - 沿线开挖ToolStripMenuItem.Checked = true; - } - } - else - { - globeControl1.Globe.Action = EnumAction3D.ActionNull; - 沿线开挖ToolStripMenuItem.Checked = false; - globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = false; - } - ActionToolMenuChecked(); + globeControl1.Globe.Action = EnumAction3D.TrackPolyline; + globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack; + trackPolylineEndMode = EnumTrackPolylineEndMode.YXKW_Analysis; } /// /// 创建隧道 @@ -6368,7 +6318,7 @@ return; } GSOGeoPolyline3D selLine = resFeature.Geometry as GSOGeoPolyline3D; - if (selLine == null||selLine[0].Count <= 1) + if (selLine == null || selLine[0].Count <= 1) { return; } @@ -6401,13 +6351,15 @@ /// /// 距离标注 /// -// bool distanceMarker; + // bool distanceMarker; private void 距离标注ToolStripMenuItem_Click(object sender, EventArgs e) { //日志记录 LogManager.saveLog(Utility.userName, 距离标注ToolStripMenuItem.Text); globeControl1.Globe.Action = EnumAction3D.TrackPolyline; + trackPolylineEndMode = EnumTrackPolylineEndMode.JLBZ_Analysis; + } /// /// 自定义标注 @@ -6817,11 +6769,6 @@ LogManager.saveLog(Utility.userName, buttonItemSJGL2.Text); FrmValiData frm = new FrmValiData(globeControl1); frm.ShowDialog(); - - /* - ValidateInfo validateInfo = ValidateConfig.LoadConfig(); - String ss = ""; - */ } /// /// 数据预处理 @@ -7045,7 +6992,7 @@ /// /// /// - + private void buttonItemBJ4_Click(object sender, EventArgs e) { //日志记录 @@ -7056,7 +7003,7 @@ { globeControl1.Globe.Action = EnumAction3D.DrawPolyline; enumDesignMode = EnumDesignMode.AddCitySevenLine; - + CitySevenLine citySevenLine = new CitySevenLine(frm.citySevenLineName, frm.citySevenLineType); globeControl1.Tag = citySevenLine; @@ -7294,7 +7241,7 @@ MessageBox.Show("成功删除"+delSuccessCount+"个模型!", "提示"); globeControl1.Globe.Action = EnumAction3D.ActionNull; } - + /// 红线审核 /// /// @@ -7334,7 +7281,7 @@ } void addRedLineDataToDataGridView(List dt, DataGridView dataGridView) { - DataTable table=new DataTable(); + DataTable table = new DataTable(); table.Columns.Add("红线编号"); table.Columns.Add("管线类型"); table.Columns.Add("侵占面积/m³"); diff --git a/MarkInfo.cs b/MarkInfo.cs index 322cdaa..c762669 100644 --- a/MarkInfo.cs +++ b/MarkInfo.cs @@ -167,6 +167,7 @@ break; case EnumMarkLayer.Mark_Distance: markerLayerName = "距离标注"; + marks = createDistanceMarks(feature); break; case EnumMarkLayer.Mark_Redline: markerLayerName = "红线工具"; @@ -358,6 +359,27 @@ return marks; } + //创建距离标注 + private List createDistanceMarks(GSOFeature resFeature) + { + GSOGeoPolyline3D selLine = resFeature.Geometry as GSOGeoPolyline3D; + GSOGeoPoint3D centerPoint = new GSOGeoPoint3D(); + GSOPoint3d point3d = selLine.GeoCenterPoint; + centerPoint.X = point3d.X; + centerPoint.Y = point3d.Y; + centerPoint.Z = point3d.Z; + + String desc0 = "距离:" + selLine.GetSpaceLength(false, 6378137); + + MarkInfo markInfo0 = new MarkInfo(); + markInfo0.Desc = desc0; + markInfo0.Point = centerPoint; + + List marks = new List(); + marks.Add(markInfo0); + return marks; + } + // private List getFeaturesAtSamePos(MarkInfo mark, GSOLayer markLayer) { @@ -409,7 +431,6 @@ } - private MarkTools() {