diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/FrmQuerySensorAlarm.cs b/FrmQuerySensorAlarm.cs deleted file mode 100644 index 12adaa2..0000000 --- a/FrmQuerySensorAlarm.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQuerySensorAlarm : Office2007Form - { - MainFrm mainFrm; - - static FrmQuerySensorAlarm frm; - public static void ShowForm(MainFrm mF) - { - if (frm == null) - { - frm = new FrmQuerySensorAlarm(mF); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQuerySensorAlarm(MainFrm mF) - { - InitializeComponent(); - - mainFrm = mF; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_Load(object sender, EventArgs e) - { - if (Utility.sensorMarkerLayers != null) - { - dataGridViewXSensorList.Columns.Add("sensorType", "传感器类型"); - dataGridViewXSensorList.Columns.Add("sensorAlarmValue", "在线报警阀值"); - dataGridViewXSensorList.Columns["sensorType"].ReadOnly = true; - - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - - int rowIndex = dataGridViewXSensorList.Rows.Add(); - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorType"].Value = mLayer.layerName; - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorAlarmValue"].Value = mLayer.alarmValue; - } - } - } - - /// - /// 启动按钮事件处理 - /// - /// - /// - private void buttonXStartTimer_Click(object sender, EventArgs e) - { - bool isStartTimer = false; - for (int i = 0; i < dataGridViewXSensorList.Rows.Count; i++) - { - string strAlarmValue = dataGridViewXSensorList.Rows[i].Cells["sensorAlarmValue"].Value.ToString(); - int alarmValue = 0; - if (int.TryParse(strAlarmValue, out alarmValue)) - { - if (alarmValue > 0) - { - isStartTimer = true; - break; - } - } - } - if (isStartTimer) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - mainFrm.timerOfSensor.Start(); - MessageBox.Show("报警启动成功!", "提示"); - Close(); - } - } - else - { - MessageBox.Show("请先设置传感器阀值,并且传感器阀值必须大于0!", "提示"); - } - } - /// - /// 停止按钮事件处理 - /// - /// - /// - private void buttonXStopTimer_Click(object sender, EventArgs e) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - MessageBox.Show("报警已经停止!", "提示"); - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - /// - /// 表格的单元格编辑结束事件处理 - /// - /// - /// - private void dataGridViewXSensorList_CellEndEdit(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex > -1) - { - string strValue = dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Trim(); - int iValue = 0; - if (!int.TryParse(strValue, out iValue)) - { - MessageBox.Show("输入的数值不符合要求!", "提示"); - dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = 0; - } - else - { - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - if (mLayer.layerName == dataGridViewXSensorList.Rows[e.RowIndex].Cells["sensorType"].Value.ToString().Trim()) - { - mLayer.alarmValue = iValue; - } - } - } - } - } - - - } -} diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/FrmQuerySensorAlarm.cs b/FrmQuerySensorAlarm.cs deleted file mode 100644 index 12adaa2..0000000 --- a/FrmQuerySensorAlarm.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQuerySensorAlarm : Office2007Form - { - MainFrm mainFrm; - - static FrmQuerySensorAlarm frm; - public static void ShowForm(MainFrm mF) - { - if (frm == null) - { - frm = new FrmQuerySensorAlarm(mF); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQuerySensorAlarm(MainFrm mF) - { - InitializeComponent(); - - mainFrm = mF; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_Load(object sender, EventArgs e) - { - if (Utility.sensorMarkerLayers != null) - { - dataGridViewXSensorList.Columns.Add("sensorType", "传感器类型"); - dataGridViewXSensorList.Columns.Add("sensorAlarmValue", "在线报警阀值"); - dataGridViewXSensorList.Columns["sensorType"].ReadOnly = true; - - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - - int rowIndex = dataGridViewXSensorList.Rows.Add(); - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorType"].Value = mLayer.layerName; - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorAlarmValue"].Value = mLayer.alarmValue; - } - } - } - - /// - /// 启动按钮事件处理 - /// - /// - /// - private void buttonXStartTimer_Click(object sender, EventArgs e) - { - bool isStartTimer = false; - for (int i = 0; i < dataGridViewXSensorList.Rows.Count; i++) - { - string strAlarmValue = dataGridViewXSensorList.Rows[i].Cells["sensorAlarmValue"].Value.ToString(); - int alarmValue = 0; - if (int.TryParse(strAlarmValue, out alarmValue)) - { - if (alarmValue > 0) - { - isStartTimer = true; - break; - } - } - } - if (isStartTimer) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - mainFrm.timerOfSensor.Start(); - MessageBox.Show("报警启动成功!", "提示"); - Close(); - } - } - else - { - MessageBox.Show("请先设置传感器阀值,并且传感器阀值必须大于0!", "提示"); - } - } - /// - /// 停止按钮事件处理 - /// - /// - /// - private void buttonXStopTimer_Click(object sender, EventArgs e) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - MessageBox.Show("报警已经停止!", "提示"); - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - /// - /// 表格的单元格编辑结束事件处理 - /// - /// - /// - private void dataGridViewXSensorList_CellEndEdit(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex > -1) - { - string strValue = dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Trim(); - int iValue = 0; - if (!int.TryParse(strValue, out iValue)) - { - MessageBox.Show("输入的数值不符合要求!", "提示"); - dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = 0; - } - else - { - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - if (mLayer.layerName == dataGridViewXSensorList.Rows[e.RowIndex].Cells["sensorType"].Value.ToString().Trim()) - { - mLayer.alarmValue = iValue; - } - } - } - } - } - - - } -} diff --git a/FrmQuerySensorAlarm.designer.cs b/FrmQuerySensorAlarm.designer.cs deleted file mode 100644 index da6c671..0000000 --- a/FrmQuerySensorAlarm.designer.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System.ComponentModel; -using DevComponents.DotNetBar; -using DevComponents.DotNetBar.Controls; - -namespace Cyberpipe -{ - partial class FrmQuerySensorAlarm - { - /// - /// 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.buttonXStartTimer = new DevComponents.DotNetBar.ButtonX(); - this.buttonXStopTimer = new DevComponents.DotNetBar.ButtonX(); - this.dataGridViewXSensorList = new DevComponents.DotNetBar.Controls.DataGridViewX(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewXSensorList)).BeginInit(); - this.SuspendLayout(); - // - // buttonXStartTimer - // - this.buttonXStartTimer.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXStartTimer.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXStartTimer.Location = new System.Drawing.Point(50, 214); - this.buttonXStartTimer.Name = "buttonXStartTimer"; - this.buttonXStartTimer.Size = new System.Drawing.Size(75, 23); - this.buttonXStartTimer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXStartTimer.TabIndex = 0; - this.buttonXStartTimer.Text = "启动"; - this.buttonXStartTimer.Click += new System.EventHandler(this.buttonXStartTimer_Click); - // - // buttonXStopTimer - // - this.buttonXStopTimer.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXStopTimer.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXStopTimer.Location = new System.Drawing.Point(144, 214); - this.buttonXStopTimer.Name = "buttonXStopTimer"; - this.buttonXStopTimer.Size = new System.Drawing.Size(75, 23); - this.buttonXStopTimer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXStopTimer.TabIndex = 3; - this.buttonXStopTimer.Text = "停止"; - this.buttonXStopTimer.Click += new System.EventHandler(this.buttonXStopTimer_Click); - // - // dataGridViewXSensorList - // - this.dataGridViewXSensorList.AllowUserToAddRows = false; - this.dataGridViewXSensorList.AllowUserToDeleteRows = false; - this.dataGridViewXSensorList.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.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewXSensorList.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewXSensorList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewXSensorList.Location = new System.Drawing.Point(10, 10); - this.dataGridViewXSensorList.MultiSelect = false; - this.dataGridViewXSensorList.Name = "dataGridViewXSensorList"; - this.dataGridViewXSensorList.RowHeadersVisible = false; - this.dataGridViewXSensorList.RowTemplate.Height = 23; - this.dataGridViewXSensorList.Size = new System.Drawing.Size(240, 193); - this.dataGridViewXSensorList.TabIndex = 4; - this.dataGridViewXSensorList.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewXSensorList_CellEndEdit); - // - // FrmQuerySensorAlarm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(258, 244); - this.Controls.Add(this.dataGridViewXSensorList); - this.Controls.Add(this.buttonXStopTimer); - this.Controls.Add(this.buttonXStartTimer); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQuerySensorAlarm"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器在线报警"; - this.Load += new System.EventHandler(this.FrmQuerySensorAlarm_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQuerySensorAlarm_FormClosing); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewXSensorList)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private ButtonX buttonXStartTimer; - private ButtonX buttonXStopTimer; - private DataGridViewX dataGridViewXSensorList; - } -} \ No newline at end of file diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/FrmQuerySensorAlarm.cs b/FrmQuerySensorAlarm.cs deleted file mode 100644 index 12adaa2..0000000 --- a/FrmQuerySensorAlarm.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQuerySensorAlarm : Office2007Form - { - MainFrm mainFrm; - - static FrmQuerySensorAlarm frm; - public static void ShowForm(MainFrm mF) - { - if (frm == null) - { - frm = new FrmQuerySensorAlarm(mF); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQuerySensorAlarm(MainFrm mF) - { - InitializeComponent(); - - mainFrm = mF; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_Load(object sender, EventArgs e) - { - if (Utility.sensorMarkerLayers != null) - { - dataGridViewXSensorList.Columns.Add("sensorType", "传感器类型"); - dataGridViewXSensorList.Columns.Add("sensorAlarmValue", "在线报警阀值"); - dataGridViewXSensorList.Columns["sensorType"].ReadOnly = true; - - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - - int rowIndex = dataGridViewXSensorList.Rows.Add(); - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorType"].Value = mLayer.layerName; - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorAlarmValue"].Value = mLayer.alarmValue; - } - } - } - - /// - /// 启动按钮事件处理 - /// - /// - /// - private void buttonXStartTimer_Click(object sender, EventArgs e) - { - bool isStartTimer = false; - for (int i = 0; i < dataGridViewXSensorList.Rows.Count; i++) - { - string strAlarmValue = dataGridViewXSensorList.Rows[i].Cells["sensorAlarmValue"].Value.ToString(); - int alarmValue = 0; - if (int.TryParse(strAlarmValue, out alarmValue)) - { - if (alarmValue > 0) - { - isStartTimer = true; - break; - } - } - } - if (isStartTimer) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - mainFrm.timerOfSensor.Start(); - MessageBox.Show("报警启动成功!", "提示"); - Close(); - } - } - else - { - MessageBox.Show("请先设置传感器阀值,并且传感器阀值必须大于0!", "提示"); - } - } - /// - /// 停止按钮事件处理 - /// - /// - /// - private void buttonXStopTimer_Click(object sender, EventArgs e) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - MessageBox.Show("报警已经停止!", "提示"); - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - /// - /// 表格的单元格编辑结束事件处理 - /// - /// - /// - private void dataGridViewXSensorList_CellEndEdit(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex > -1) - { - string strValue = dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Trim(); - int iValue = 0; - if (!int.TryParse(strValue, out iValue)) - { - MessageBox.Show("输入的数值不符合要求!", "提示"); - dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = 0; - } - else - { - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - if (mLayer.layerName == dataGridViewXSensorList.Rows[e.RowIndex].Cells["sensorType"].Value.ToString().Trim()) - { - mLayer.alarmValue = iValue; - } - } - } - } - } - - - } -} diff --git a/FrmQuerySensorAlarm.designer.cs b/FrmQuerySensorAlarm.designer.cs deleted file mode 100644 index da6c671..0000000 --- a/FrmQuerySensorAlarm.designer.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System.ComponentModel; -using DevComponents.DotNetBar; -using DevComponents.DotNetBar.Controls; - -namespace Cyberpipe -{ - partial class FrmQuerySensorAlarm - { - /// - /// 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.buttonXStartTimer = new DevComponents.DotNetBar.ButtonX(); - this.buttonXStopTimer = new DevComponents.DotNetBar.ButtonX(); - this.dataGridViewXSensorList = new DevComponents.DotNetBar.Controls.DataGridViewX(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewXSensorList)).BeginInit(); - this.SuspendLayout(); - // - // buttonXStartTimer - // - this.buttonXStartTimer.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXStartTimer.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXStartTimer.Location = new System.Drawing.Point(50, 214); - this.buttonXStartTimer.Name = "buttonXStartTimer"; - this.buttonXStartTimer.Size = new System.Drawing.Size(75, 23); - this.buttonXStartTimer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXStartTimer.TabIndex = 0; - this.buttonXStartTimer.Text = "启动"; - this.buttonXStartTimer.Click += new System.EventHandler(this.buttonXStartTimer_Click); - // - // buttonXStopTimer - // - this.buttonXStopTimer.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXStopTimer.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXStopTimer.Location = new System.Drawing.Point(144, 214); - this.buttonXStopTimer.Name = "buttonXStopTimer"; - this.buttonXStopTimer.Size = new System.Drawing.Size(75, 23); - this.buttonXStopTimer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXStopTimer.TabIndex = 3; - this.buttonXStopTimer.Text = "停止"; - this.buttonXStopTimer.Click += new System.EventHandler(this.buttonXStopTimer_Click); - // - // dataGridViewXSensorList - // - this.dataGridViewXSensorList.AllowUserToAddRows = false; - this.dataGridViewXSensorList.AllowUserToDeleteRows = false; - this.dataGridViewXSensorList.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.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewXSensorList.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewXSensorList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewXSensorList.Location = new System.Drawing.Point(10, 10); - this.dataGridViewXSensorList.MultiSelect = false; - this.dataGridViewXSensorList.Name = "dataGridViewXSensorList"; - this.dataGridViewXSensorList.RowHeadersVisible = false; - this.dataGridViewXSensorList.RowTemplate.Height = 23; - this.dataGridViewXSensorList.Size = new System.Drawing.Size(240, 193); - this.dataGridViewXSensorList.TabIndex = 4; - this.dataGridViewXSensorList.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewXSensorList_CellEndEdit); - // - // FrmQuerySensorAlarm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(258, 244); - this.Controls.Add(this.dataGridViewXSensorList); - this.Controls.Add(this.buttonXStopTimer); - this.Controls.Add(this.buttonXStartTimer); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQuerySensorAlarm"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器在线报警"; - this.Load += new System.EventHandler(this.FrmQuerySensorAlarm_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQuerySensorAlarm_FormClosing); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewXSensorList)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private ButtonX buttonXStartTimer; - private ButtonX buttonXStopTimer; - private DataGridViewX dataGridViewXSensorList; - } -} \ No newline at end of file diff --git a/FrmQuerySensorAlarm.resx b/FrmQuerySensorAlarm.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQuerySensorAlarm.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/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/FrmQuerySensorAlarm.cs b/FrmQuerySensorAlarm.cs deleted file mode 100644 index 12adaa2..0000000 --- a/FrmQuerySensorAlarm.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQuerySensorAlarm : Office2007Form - { - MainFrm mainFrm; - - static FrmQuerySensorAlarm frm; - public static void ShowForm(MainFrm mF) - { - if (frm == null) - { - frm = new FrmQuerySensorAlarm(mF); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQuerySensorAlarm(MainFrm mF) - { - InitializeComponent(); - - mainFrm = mF; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_Load(object sender, EventArgs e) - { - if (Utility.sensorMarkerLayers != null) - { - dataGridViewXSensorList.Columns.Add("sensorType", "传感器类型"); - dataGridViewXSensorList.Columns.Add("sensorAlarmValue", "在线报警阀值"); - dataGridViewXSensorList.Columns["sensorType"].ReadOnly = true; - - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - - int rowIndex = dataGridViewXSensorList.Rows.Add(); - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorType"].Value = mLayer.layerName; - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorAlarmValue"].Value = mLayer.alarmValue; - } - } - } - - /// - /// 启动按钮事件处理 - /// - /// - /// - private void buttonXStartTimer_Click(object sender, EventArgs e) - { - bool isStartTimer = false; - for (int i = 0; i < dataGridViewXSensorList.Rows.Count; i++) - { - string strAlarmValue = dataGridViewXSensorList.Rows[i].Cells["sensorAlarmValue"].Value.ToString(); - int alarmValue = 0; - if (int.TryParse(strAlarmValue, out alarmValue)) - { - if (alarmValue > 0) - { - isStartTimer = true; - break; - } - } - } - if (isStartTimer) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - mainFrm.timerOfSensor.Start(); - MessageBox.Show("报警启动成功!", "提示"); - Close(); - } - } - else - { - MessageBox.Show("请先设置传感器阀值,并且传感器阀值必须大于0!", "提示"); - } - } - /// - /// 停止按钮事件处理 - /// - /// - /// - private void buttonXStopTimer_Click(object sender, EventArgs e) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - MessageBox.Show("报警已经停止!", "提示"); - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - /// - /// 表格的单元格编辑结束事件处理 - /// - /// - /// - private void dataGridViewXSensorList_CellEndEdit(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex > -1) - { - string strValue = dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Trim(); - int iValue = 0; - if (!int.TryParse(strValue, out iValue)) - { - MessageBox.Show("输入的数值不符合要求!", "提示"); - dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = 0; - } - else - { - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - if (mLayer.layerName == dataGridViewXSensorList.Rows[e.RowIndex].Cells["sensorType"].Value.ToString().Trim()) - { - mLayer.alarmValue = iValue; - } - } - } - } - } - - - } -} diff --git a/FrmQuerySensorAlarm.designer.cs b/FrmQuerySensorAlarm.designer.cs deleted file mode 100644 index da6c671..0000000 --- a/FrmQuerySensorAlarm.designer.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System.ComponentModel; -using DevComponents.DotNetBar; -using DevComponents.DotNetBar.Controls; - -namespace Cyberpipe -{ - partial class FrmQuerySensorAlarm - { - /// - /// 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.buttonXStartTimer = new DevComponents.DotNetBar.ButtonX(); - this.buttonXStopTimer = new DevComponents.DotNetBar.ButtonX(); - this.dataGridViewXSensorList = new DevComponents.DotNetBar.Controls.DataGridViewX(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewXSensorList)).BeginInit(); - this.SuspendLayout(); - // - // buttonXStartTimer - // - this.buttonXStartTimer.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXStartTimer.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXStartTimer.Location = new System.Drawing.Point(50, 214); - this.buttonXStartTimer.Name = "buttonXStartTimer"; - this.buttonXStartTimer.Size = new System.Drawing.Size(75, 23); - this.buttonXStartTimer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXStartTimer.TabIndex = 0; - this.buttonXStartTimer.Text = "启动"; - this.buttonXStartTimer.Click += new System.EventHandler(this.buttonXStartTimer_Click); - // - // buttonXStopTimer - // - this.buttonXStopTimer.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXStopTimer.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXStopTimer.Location = new System.Drawing.Point(144, 214); - this.buttonXStopTimer.Name = "buttonXStopTimer"; - this.buttonXStopTimer.Size = new System.Drawing.Size(75, 23); - this.buttonXStopTimer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXStopTimer.TabIndex = 3; - this.buttonXStopTimer.Text = "停止"; - this.buttonXStopTimer.Click += new System.EventHandler(this.buttonXStopTimer_Click); - // - // dataGridViewXSensorList - // - this.dataGridViewXSensorList.AllowUserToAddRows = false; - this.dataGridViewXSensorList.AllowUserToDeleteRows = false; - this.dataGridViewXSensorList.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.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewXSensorList.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewXSensorList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewXSensorList.Location = new System.Drawing.Point(10, 10); - this.dataGridViewXSensorList.MultiSelect = false; - this.dataGridViewXSensorList.Name = "dataGridViewXSensorList"; - this.dataGridViewXSensorList.RowHeadersVisible = false; - this.dataGridViewXSensorList.RowTemplate.Height = 23; - this.dataGridViewXSensorList.Size = new System.Drawing.Size(240, 193); - this.dataGridViewXSensorList.TabIndex = 4; - this.dataGridViewXSensorList.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewXSensorList_CellEndEdit); - // - // FrmQuerySensorAlarm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(258, 244); - this.Controls.Add(this.dataGridViewXSensorList); - this.Controls.Add(this.buttonXStopTimer); - this.Controls.Add(this.buttonXStartTimer); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQuerySensorAlarm"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器在线报警"; - this.Load += new System.EventHandler(this.FrmQuerySensorAlarm_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQuerySensorAlarm_FormClosing); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewXSensorList)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private ButtonX buttonXStartTimer; - private ButtonX buttonXStopTimer; - private DataGridViewX dataGridViewXSensorList; - } -} \ No newline at end of file diff --git a/FrmQuerySensorAlarm.resx b/FrmQuerySensorAlarm.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQuerySensorAlarm.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 ac37ae5..b3d8fc1 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(); - } /// @@ -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; @@ -1806,10 +1796,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; } @@ -3031,29 +3031,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; - } - } - /// /// 主窗体关闭事件处理 /// /// @@ -5188,8 +5165,7 @@ node.Nodes.Clear(); globeControl1.Refresh(); } - //定时检查传感器的状态 待完善 - public Timer timerOfSensor = null; + /// /// 一键审核---导入数据 /// @@ -5275,11 +5251,12 @@ private void buttonItem128_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, buttonItem128.Text); + /* if (boolfrmShResult) {//关闭等待窗口,否则会一直存在下去 MessageBox.Show("正在审核或关闭上次审核结果才能进行审核"); return; - } + }*/ boolfrmShResult = true; frmSh = new FrmYJSHTC(globeControl1, globeControl2, layerTree);//layerManagerNode if (frmSh.ShowDialog() == DialogResult.OK) @@ -5332,7 +5309,7 @@ { MessageBox.Show("系统运行错误:" + ex, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } -// boolfrmShResult = true; + boolfrmShResult = true; } void returnShTap() @@ -5688,17 +5665,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"); @@ -5706,10 +5672,11 @@ { layerGround.Visible = true; } - globeControl1.Refresh(); - globeControl2.Refresh(); ClearRedlineAnalyseResult(); globeControl1.Globe.Action = EnumAction3D.ActionNull; + + globeControl1.Refresh(); + globeControl2.Refresh(); } /// /// 管线长度全区域统计 @@ -6142,7 +6109,6 @@ trackflag = "digFillAnalysis"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; - ActionToolMenuChecked(); } /// /// 沿线开挖 @@ -6153,28 +6119,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; } /// /// 创建隧道 @@ -6540,6 +6487,8 @@ LogManager.saveLog(Utility.userName, 距离标注ToolStripMenuItem.Text); globeControl1.Globe.Action = EnumAction3D.TrackPolyline; + trackPolylineEndMode = EnumTrackPolylineEndMode.JLBZ_Analysis; + } /// /// 自定义标注 @@ -6949,11 +6898,6 @@ LogManager.saveLog(Utility.userName, buttonItemSJGL2.Text); FrmValiData frm = new FrmValiData(globeControl1); frm.ShowDialog(); - - /* - ValidateInfo validateInfo = ValidateConfig.LoadConfig(); - String ss = ""; - */ } /// /// 数据预处理 @@ -7413,15 +7357,9 @@ GSOFeature f; GSOLayer layer; globeControl1.Globe.GetSelectObject(i, out f, out layer); -// if (f == null) continue; -// f.Delete(); -// if (layer != null) -// globeControl1.Globe.AddToEditHistroy(layer, f, EnumEditType.Delete); FeatureTools.DeleteFeature(f); globeControl1.Refresh(); - - } MessageBox.Show("删除成功!", "提示"); diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/FrmQuerySensorAlarm.cs b/FrmQuerySensorAlarm.cs deleted file mode 100644 index 12adaa2..0000000 --- a/FrmQuerySensorAlarm.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQuerySensorAlarm : Office2007Form - { - MainFrm mainFrm; - - static FrmQuerySensorAlarm frm; - public static void ShowForm(MainFrm mF) - { - if (frm == null) - { - frm = new FrmQuerySensorAlarm(mF); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQuerySensorAlarm(MainFrm mF) - { - InitializeComponent(); - - mainFrm = mF; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_Load(object sender, EventArgs e) - { - if (Utility.sensorMarkerLayers != null) - { - dataGridViewXSensorList.Columns.Add("sensorType", "传感器类型"); - dataGridViewXSensorList.Columns.Add("sensorAlarmValue", "在线报警阀值"); - dataGridViewXSensorList.Columns["sensorType"].ReadOnly = true; - - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - - int rowIndex = dataGridViewXSensorList.Rows.Add(); - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorType"].Value = mLayer.layerName; - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorAlarmValue"].Value = mLayer.alarmValue; - } - } - } - - /// - /// 启动按钮事件处理 - /// - /// - /// - private void buttonXStartTimer_Click(object sender, EventArgs e) - { - bool isStartTimer = false; - for (int i = 0; i < dataGridViewXSensorList.Rows.Count; i++) - { - string strAlarmValue = dataGridViewXSensorList.Rows[i].Cells["sensorAlarmValue"].Value.ToString(); - int alarmValue = 0; - if (int.TryParse(strAlarmValue, out alarmValue)) - { - if (alarmValue > 0) - { - isStartTimer = true; - break; - } - } - } - if (isStartTimer) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - mainFrm.timerOfSensor.Start(); - MessageBox.Show("报警启动成功!", "提示"); - Close(); - } - } - else - { - MessageBox.Show("请先设置传感器阀值,并且传感器阀值必须大于0!", "提示"); - } - } - /// - /// 停止按钮事件处理 - /// - /// - /// - private void buttonXStopTimer_Click(object sender, EventArgs e) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - MessageBox.Show("报警已经停止!", "提示"); - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - /// - /// 表格的单元格编辑结束事件处理 - /// - /// - /// - private void dataGridViewXSensorList_CellEndEdit(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex > -1) - { - string strValue = dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Trim(); - int iValue = 0; - if (!int.TryParse(strValue, out iValue)) - { - MessageBox.Show("输入的数值不符合要求!", "提示"); - dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = 0; - } - else - { - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - if (mLayer.layerName == dataGridViewXSensorList.Rows[e.RowIndex].Cells["sensorType"].Value.ToString().Trim()) - { - mLayer.alarmValue = iValue; - } - } - } - } - } - - - } -} diff --git a/FrmQuerySensorAlarm.designer.cs b/FrmQuerySensorAlarm.designer.cs deleted file mode 100644 index da6c671..0000000 --- a/FrmQuerySensorAlarm.designer.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System.ComponentModel; -using DevComponents.DotNetBar; -using DevComponents.DotNetBar.Controls; - -namespace Cyberpipe -{ - partial class FrmQuerySensorAlarm - { - /// - /// 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.buttonXStartTimer = new DevComponents.DotNetBar.ButtonX(); - this.buttonXStopTimer = new DevComponents.DotNetBar.ButtonX(); - this.dataGridViewXSensorList = new DevComponents.DotNetBar.Controls.DataGridViewX(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewXSensorList)).BeginInit(); - this.SuspendLayout(); - // - // buttonXStartTimer - // - this.buttonXStartTimer.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXStartTimer.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXStartTimer.Location = new System.Drawing.Point(50, 214); - this.buttonXStartTimer.Name = "buttonXStartTimer"; - this.buttonXStartTimer.Size = new System.Drawing.Size(75, 23); - this.buttonXStartTimer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXStartTimer.TabIndex = 0; - this.buttonXStartTimer.Text = "启动"; - this.buttonXStartTimer.Click += new System.EventHandler(this.buttonXStartTimer_Click); - // - // buttonXStopTimer - // - this.buttonXStopTimer.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXStopTimer.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXStopTimer.Location = new System.Drawing.Point(144, 214); - this.buttonXStopTimer.Name = "buttonXStopTimer"; - this.buttonXStopTimer.Size = new System.Drawing.Size(75, 23); - this.buttonXStopTimer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXStopTimer.TabIndex = 3; - this.buttonXStopTimer.Text = "停止"; - this.buttonXStopTimer.Click += new System.EventHandler(this.buttonXStopTimer_Click); - // - // dataGridViewXSensorList - // - this.dataGridViewXSensorList.AllowUserToAddRows = false; - this.dataGridViewXSensorList.AllowUserToDeleteRows = false; - this.dataGridViewXSensorList.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.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewXSensorList.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewXSensorList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewXSensorList.Location = new System.Drawing.Point(10, 10); - this.dataGridViewXSensorList.MultiSelect = false; - this.dataGridViewXSensorList.Name = "dataGridViewXSensorList"; - this.dataGridViewXSensorList.RowHeadersVisible = false; - this.dataGridViewXSensorList.RowTemplate.Height = 23; - this.dataGridViewXSensorList.Size = new System.Drawing.Size(240, 193); - this.dataGridViewXSensorList.TabIndex = 4; - this.dataGridViewXSensorList.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewXSensorList_CellEndEdit); - // - // FrmQuerySensorAlarm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(258, 244); - this.Controls.Add(this.dataGridViewXSensorList); - this.Controls.Add(this.buttonXStopTimer); - this.Controls.Add(this.buttonXStartTimer); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQuerySensorAlarm"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器在线报警"; - this.Load += new System.EventHandler(this.FrmQuerySensorAlarm_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQuerySensorAlarm_FormClosing); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewXSensorList)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private ButtonX buttonXStartTimer; - private ButtonX buttonXStopTimer; - private DataGridViewX dataGridViewXSensorList; - } -} \ No newline at end of file diff --git a/FrmQuerySensorAlarm.resx b/FrmQuerySensorAlarm.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQuerySensorAlarm.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 ac37ae5..b3d8fc1 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(); - } /// @@ -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; @@ -1806,10 +1796,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; } @@ -3031,29 +3031,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; - } - } - /// /// 主窗体关闭事件处理 /// /// @@ -5188,8 +5165,7 @@ node.Nodes.Clear(); globeControl1.Refresh(); } - //定时检查传感器的状态 待完善 - public Timer timerOfSensor = null; + /// /// 一键审核---导入数据 /// @@ -5275,11 +5251,12 @@ private void buttonItem128_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, buttonItem128.Text); + /* if (boolfrmShResult) {//关闭等待窗口,否则会一直存在下去 MessageBox.Show("正在审核或关闭上次审核结果才能进行审核"); return; - } + }*/ boolfrmShResult = true; frmSh = new FrmYJSHTC(globeControl1, globeControl2, layerTree);//layerManagerNode if (frmSh.ShowDialog() == DialogResult.OK) @@ -5332,7 +5309,7 @@ { MessageBox.Show("系统运行错误:" + ex, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } -// boolfrmShResult = true; + boolfrmShResult = true; } void returnShTap() @@ -5688,17 +5665,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"); @@ -5706,10 +5672,11 @@ { layerGround.Visible = true; } - globeControl1.Refresh(); - globeControl2.Refresh(); ClearRedlineAnalyseResult(); globeControl1.Globe.Action = EnumAction3D.ActionNull; + + globeControl1.Refresh(); + globeControl2.Refresh(); } /// /// 管线长度全区域统计 @@ -6142,7 +6109,6 @@ trackflag = "digFillAnalysis"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; - ActionToolMenuChecked(); } /// /// 沿线开挖 @@ -6153,28 +6119,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; } /// /// 创建隧道 @@ -6540,6 +6487,8 @@ LogManager.saveLog(Utility.userName, 距离标注ToolStripMenuItem.Text); globeControl1.Globe.Action = EnumAction3D.TrackPolyline; + trackPolylineEndMode = EnumTrackPolylineEndMode.JLBZ_Analysis; + } /// /// 自定义标注 @@ -6949,11 +6898,6 @@ LogManager.saveLog(Utility.userName, buttonItemSJGL2.Text); FrmValiData frm = new FrmValiData(globeControl1); frm.ShowDialog(); - - /* - ValidateInfo validateInfo = ValidateConfig.LoadConfig(); - String ss = ""; - */ } /// /// 数据预处理 @@ -7413,15 +7357,9 @@ GSOFeature f; GSOLayer layer; globeControl1.Globe.GetSelectObject(i, out f, out layer); -// if (f == null) continue; -// f.Delete(); -// if (layer != null) -// globeControl1.Globe.AddToEditHistroy(layer, f, EnumEditType.Delete); FeatureTools.DeleteFeature(f); globeControl1.Refresh(); - - } MessageBox.Show("删除成功!", "提示"); 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() { diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index 209373c..2348f9d 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -845,24 +845,6 @@ FrmOper.cs - - Form - - - FrmQueryHistory.cs - - - Form - - - FrmQueryMessage.cs - - - Form - - - FrmQuerySensorAlarm.cs - Form @@ -1523,18 +1505,6 @@ FrmOper.cs Designer - - FrmQueryHistory.cs - Designer - - - FrmQueryMessage.cs - Designer - - - FrmQuerySensorAlarm.cs - Designer - FrmRegion.cs Designer diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 3e268fe..c26bade 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ 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/FrmQuerySensorAlarm.cs b/FrmQuerySensorAlarm.cs deleted file mode 100644 index 12adaa2..0000000 --- a/FrmQuerySensorAlarm.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Windows.Forms; -using DevComponents.DotNetBar; - -namespace Cyberpipe -{ - public partial class FrmQuerySensorAlarm : Office2007Form - { - MainFrm mainFrm; - - static FrmQuerySensorAlarm frm; - public static void ShowForm(MainFrm mF) - { - if (frm == null) - { - frm = new FrmQuerySensorAlarm(mF); - frm.Show(mF); - } - else - { - if (frm.WindowState == FormWindowState.Minimized) - { - frm.WindowState = FormWindowState.Normal; - } - } - } - - public FrmQuerySensorAlarm(MainFrm mF) - { - InitializeComponent(); - - mainFrm = mF; - } - /// - /// 窗体初始化事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_Load(object sender, EventArgs e) - { - if (Utility.sensorMarkerLayers != null) - { - dataGridViewXSensorList.Columns.Add("sensorType", "传感器类型"); - dataGridViewXSensorList.Columns.Add("sensorAlarmValue", "在线报警阀值"); - dataGridViewXSensorList.Columns["sensorType"].ReadOnly = true; - - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - - int rowIndex = dataGridViewXSensorList.Rows.Add(); - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorType"].Value = mLayer.layerName; - dataGridViewXSensorList.Rows[rowIndex].Cells["sensorAlarmValue"].Value = mLayer.alarmValue; - } - } - } - - /// - /// 启动按钮事件处理 - /// - /// - /// - private void buttonXStartTimer_Click(object sender, EventArgs e) - { - bool isStartTimer = false; - for (int i = 0; i < dataGridViewXSensorList.Rows.Count; i++) - { - string strAlarmValue = dataGridViewXSensorList.Rows[i].Cells["sensorAlarmValue"].Value.ToString(); - int alarmValue = 0; - if (int.TryParse(strAlarmValue, out alarmValue)) - { - if (alarmValue > 0) - { - isStartTimer = true; - break; - } - } - } - if (isStartTimer) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - mainFrm.timerOfSensor.Start(); - MessageBox.Show("报警启动成功!", "提示"); - Close(); - } - } - else - { - MessageBox.Show("请先设置传感器阀值,并且传感器阀值必须大于0!", "提示"); - } - } - /// - /// 停止按钮事件处理 - /// - /// - /// - private void buttonXStopTimer_Click(object sender, EventArgs e) - { - if (mainFrm != null && mainFrm.timerOfSensor != null) - { - mainFrm.timerOfSensor.Stop(); - MessageBox.Show("报警已经停止!", "提示"); - } - } - /// - /// 窗体关闭事件处理 - /// - /// - /// - private void FrmQuerySensorAlarm_FormClosing(object sender, FormClosingEventArgs e) - { - frm = null; - } - /// - /// 表格的单元格编辑结束事件处理 - /// - /// - /// - private void dataGridViewXSensorList_CellEndEdit(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex > -1) - { - string strValue = dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Trim(); - int iValue = 0; - if (!int.TryParse(strValue, out iValue)) - { - MessageBox.Show("输入的数值不符合要求!", "提示"); - dataGridViewXSensorList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = 0; - } - else - { - for (int i = 0; i < Utility.sensorMarkerLayers.Count; i++) - { - MarkerLayer mLayer = Utility.sensorMarkerLayers[i]; - if (mLayer.layerName == dataGridViewXSensorList.Rows[e.RowIndex].Cells["sensorType"].Value.ToString().Trim()) - { - mLayer.alarmValue = iValue; - } - } - } - } - } - - - } -} diff --git a/FrmQuerySensorAlarm.designer.cs b/FrmQuerySensorAlarm.designer.cs deleted file mode 100644 index da6c671..0000000 --- a/FrmQuerySensorAlarm.designer.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System.ComponentModel; -using DevComponents.DotNetBar; -using DevComponents.DotNetBar.Controls; - -namespace Cyberpipe -{ - partial class FrmQuerySensorAlarm - { - /// - /// 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.buttonXStartTimer = new DevComponents.DotNetBar.ButtonX(); - this.buttonXStopTimer = new DevComponents.DotNetBar.ButtonX(); - this.dataGridViewXSensorList = new DevComponents.DotNetBar.Controls.DataGridViewX(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewXSensorList)).BeginInit(); - this.SuspendLayout(); - // - // buttonXStartTimer - // - this.buttonXStartTimer.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXStartTimer.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXStartTimer.Location = new System.Drawing.Point(50, 214); - this.buttonXStartTimer.Name = "buttonXStartTimer"; - this.buttonXStartTimer.Size = new System.Drawing.Size(75, 23); - this.buttonXStartTimer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXStartTimer.TabIndex = 0; - this.buttonXStartTimer.Text = "启动"; - this.buttonXStartTimer.Click += new System.EventHandler(this.buttonXStartTimer_Click); - // - // buttonXStopTimer - // - this.buttonXStopTimer.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonXStopTimer.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonXStopTimer.Location = new System.Drawing.Point(144, 214); - this.buttonXStopTimer.Name = "buttonXStopTimer"; - this.buttonXStopTimer.Size = new System.Drawing.Size(75, 23); - this.buttonXStopTimer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonXStopTimer.TabIndex = 3; - this.buttonXStopTimer.Text = "停止"; - this.buttonXStopTimer.Click += new System.EventHandler(this.buttonXStopTimer_Click); - // - // dataGridViewXSensorList - // - this.dataGridViewXSensorList.AllowUserToAddRows = false; - this.dataGridViewXSensorList.AllowUserToDeleteRows = false; - this.dataGridViewXSensorList.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.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewXSensorList.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewXSensorList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewXSensorList.Location = new System.Drawing.Point(10, 10); - this.dataGridViewXSensorList.MultiSelect = false; - this.dataGridViewXSensorList.Name = "dataGridViewXSensorList"; - this.dataGridViewXSensorList.RowHeadersVisible = false; - this.dataGridViewXSensorList.RowTemplate.Height = 23; - this.dataGridViewXSensorList.Size = new System.Drawing.Size(240, 193); - this.dataGridViewXSensorList.TabIndex = 4; - this.dataGridViewXSensorList.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewXSensorList_CellEndEdit); - // - // FrmQuerySensorAlarm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(258, 244); - this.Controls.Add(this.dataGridViewXSensorList); - this.Controls.Add(this.buttonXStopTimer); - this.Controls.Add(this.buttonXStartTimer); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.Name = "FrmQuerySensorAlarm"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "传感器在线报警"; - this.Load += new System.EventHandler(this.FrmQuerySensorAlarm_Load); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmQuerySensorAlarm_FormClosing); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewXSensorList)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private ButtonX buttonXStartTimer; - private ButtonX buttonXStopTimer; - private DataGridViewX dataGridViewXSensorList; - } -} \ No newline at end of file diff --git a/FrmQuerySensorAlarm.resx b/FrmQuerySensorAlarm.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/FrmQuerySensorAlarm.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 ac37ae5..b3d8fc1 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(); - } /// @@ -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; @@ -1806,10 +1796,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; } @@ -3031,29 +3031,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; - } - } - /// /// 主窗体关闭事件处理 /// /// @@ -5188,8 +5165,7 @@ node.Nodes.Clear(); globeControl1.Refresh(); } - //定时检查传感器的状态 待完善 - public Timer timerOfSensor = null; + /// /// 一键审核---导入数据 /// @@ -5275,11 +5251,12 @@ private void buttonItem128_Click(object sender, EventArgs e) { LogManager.saveLog(Utility.userName, buttonItem128.Text); + /* if (boolfrmShResult) {//关闭等待窗口,否则会一直存在下去 MessageBox.Show("正在审核或关闭上次审核结果才能进行审核"); return; - } + }*/ boolfrmShResult = true; frmSh = new FrmYJSHTC(globeControl1, globeControl2, layerTree);//layerManagerNode if (frmSh.ShowDialog() == DialogResult.OK) @@ -5332,7 +5309,7 @@ { MessageBox.Show("系统运行错误:" + ex, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } -// boolfrmShResult = true; + boolfrmShResult = true; } void returnShTap() @@ -5688,17 +5665,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"); @@ -5706,10 +5672,11 @@ { layerGround.Visible = true; } - globeControl1.Refresh(); - globeControl2.Refresh(); ClearRedlineAnalyseResult(); globeControl1.Globe.Action = EnumAction3D.ActionNull; + + globeControl1.Refresh(); + globeControl2.Refresh(); } /// /// 管线长度全区域统计 @@ -6142,7 +6109,6 @@ trackflag = "digFillAnalysis"; globeControl1.Globe.Action = EnumAction3D.TrackPolygon; globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack; - ActionToolMenuChecked(); } /// /// 沿线开挖 @@ -6153,28 +6119,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; } /// /// 创建隧道 @@ -6540,6 +6487,8 @@ LogManager.saveLog(Utility.userName, 距离标注ToolStripMenuItem.Text); globeControl1.Globe.Action = EnumAction3D.TrackPolyline; + trackPolylineEndMode = EnumTrackPolylineEndMode.JLBZ_Analysis; + } /// /// 自定义标注 @@ -6949,11 +6898,6 @@ LogManager.saveLog(Utility.userName, buttonItemSJGL2.Text); FrmValiData frm = new FrmValiData(globeControl1); frm.ShowDialog(); - - /* - ValidateInfo validateInfo = ValidateConfig.LoadConfig(); - String ss = ""; - */ } /// /// 数据预处理 @@ -7413,15 +7357,9 @@ GSOFeature f; GSOLayer layer; globeControl1.Globe.GetSelectObject(i, out f, out layer); -// if (f == null) continue; -// f.Delete(); -// if (layer != null) -// globeControl1.Globe.AddToEditHistroy(layer, f, EnumEditType.Delete); FeatureTools.DeleteFeature(f); globeControl1.Refresh(); - - } MessageBox.Show("删除成功!", "提示"); 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() { diff --git a/bin/x86/Debug/Cyberpipe.vshost.exe.manifest b/bin/x86/Debug/Cyberpipe.vshost.exe.manifest deleted file mode 100644 index 061c9ca..0000000 --- a/bin/x86/Debug/Cyberpipe.vshost.exe.manifest +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - -