diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs
index dd63f62..5b05926 100644
--- a/FrmBSQStatis.cs
+++ b/FrmBSQStatis.cs
@@ -23,10 +23,8 @@
bsq = getBSQNameAndNumMap(polygon);
}
-
private void FrmBSQStatis_Load(object sender, EventArgs e)
{
-
try
{
chartStatis.Series.Add("标识器");
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs
index dd63f62..5b05926 100644
--- a/FrmBSQStatis.cs
+++ b/FrmBSQStatis.cs
@@ -23,10 +23,8 @@
bsq = getBSQNameAndNumMap(polygon);
}
-
private void FrmBSQStatis_Load(object sender, EventArgs e)
{
-
try
{
chartStatis.Series.Add("标识器");
diff --git a/FrmFlagDatabase.Designer.cs b/FrmFlagDatabase.Designer.cs
new file mode 100644
index 0000000..cc7aca8
--- /dev/null
+++ b/FrmFlagDatabase.Designer.cs
@@ -0,0 +1,265 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDatabase
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.txt_ip = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_db = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_user = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.chk = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.txt_pwd = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(3, 3);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(50, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "服务器";
+ this.labelX1.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(3, 47);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 23);
+ this.labelX2.TabIndex = 1;
+ this.labelX2.Text = "数据库";
+ this.labelX2.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(3, 98);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 23);
+ this.labelX3.TabIndex = 2;
+ this.labelX3.Text = "账号";
+ this.labelX3.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(3, 148);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 23);
+ this.labelX4.TabIndex = 3;
+ this.labelX4.Text = "密码";
+ this.labelX4.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // txt_ip
+ //
+ //
+ //
+ //
+ this.txt_ip.Border.Class = "TextBoxBorder";
+ this.txt_ip.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_ip.Location = new System.Drawing.Point(69, 2);
+ this.txt_ip.Name = "txt_ip";
+ this.txt_ip.Size = new System.Drawing.Size(167, 21);
+ this.txt_ip.TabIndex = 4;
+ //
+ // txt_db
+ //
+ //
+ //
+ //
+ this.txt_db.Border.Class = "TextBoxBorder";
+ this.txt_db.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_db.Location = new System.Drawing.Point(69, 47);
+ this.txt_db.Name = "txt_db";
+ this.txt_db.Size = new System.Drawing.Size(167, 21);
+ this.txt_db.TabIndex = 4;
+ //
+ // txt_user
+ //
+ //
+ //
+ //
+ this.txt_user.Border.Class = "TextBoxBorder";
+ this.txt_user.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_user.Location = new System.Drawing.Point(69, 98);
+ this.txt_user.Name = "txt_user";
+ this.txt_user.Size = new System.Drawing.Size(167, 21);
+ this.txt_user.TabIndex = 4;
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(197, 249);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 5;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.txt_pwd);
+ this.groupPanel1.Controls.Add(this.chk);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.txt_user);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_db);
+ this.groupPanel1.Controls.Add(this.txt_ip);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 6);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(260, 229);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 6;
+ this.groupPanel1.Text = "数据库信息";
+ //
+ // chk
+ //
+ this.chk.AutoSize = true;
+ //
+ //
+ //
+ this.chk.BackgroundStyle.Class = "";
+ this.chk.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.chk.Location = new System.Drawing.Point(166, 180);
+ this.chk.Name = "chk";
+ this.chk.Size = new System.Drawing.Size(70, 16);
+ this.chk.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.chk.TabIndex = 5;
+ this.chk.Text = "记住配置";
+ //
+ // txt_pwd
+ //
+ //
+ //
+ //
+ this.txt_pwd.Border.Class = "TextBoxBorder";
+ this.txt_pwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_pwd.Location = new System.Drawing.Point(69, 149);
+ this.txt_pwd.Name = "txt_pwd";
+ this.txt_pwd.PasswordChar = '*';
+ this.txt_pwd.Size = new System.Drawing.Size(167, 21);
+ this.txt_pwd.TabIndex = 6;
+ //
+ // FrmFlagDatabase
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 284);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btn_ok);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagDatabase";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器数据库连接";
+ this.Load += new System.EventHandler(this.FrmFlagDatabase_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_ip;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_db;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_user;
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.CheckBoxX chk;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_pwd;
+ }
+}
\ No newline at end of file
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs
index dd63f62..5b05926 100644
--- a/FrmBSQStatis.cs
+++ b/FrmBSQStatis.cs
@@ -23,10 +23,8 @@
bsq = getBSQNameAndNumMap(polygon);
}
-
private void FrmBSQStatis_Load(object sender, EventArgs e)
{
-
try
{
chartStatis.Series.Add("标识器");
diff --git a/FrmFlagDatabase.Designer.cs b/FrmFlagDatabase.Designer.cs
new file mode 100644
index 0000000..cc7aca8
--- /dev/null
+++ b/FrmFlagDatabase.Designer.cs
@@ -0,0 +1,265 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDatabase
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.txt_ip = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_db = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_user = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.chk = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.txt_pwd = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(3, 3);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(50, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "服务器";
+ this.labelX1.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(3, 47);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 23);
+ this.labelX2.TabIndex = 1;
+ this.labelX2.Text = "数据库";
+ this.labelX2.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(3, 98);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 23);
+ this.labelX3.TabIndex = 2;
+ this.labelX3.Text = "账号";
+ this.labelX3.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(3, 148);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 23);
+ this.labelX4.TabIndex = 3;
+ this.labelX4.Text = "密码";
+ this.labelX4.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // txt_ip
+ //
+ //
+ //
+ //
+ this.txt_ip.Border.Class = "TextBoxBorder";
+ this.txt_ip.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_ip.Location = new System.Drawing.Point(69, 2);
+ this.txt_ip.Name = "txt_ip";
+ this.txt_ip.Size = new System.Drawing.Size(167, 21);
+ this.txt_ip.TabIndex = 4;
+ //
+ // txt_db
+ //
+ //
+ //
+ //
+ this.txt_db.Border.Class = "TextBoxBorder";
+ this.txt_db.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_db.Location = new System.Drawing.Point(69, 47);
+ this.txt_db.Name = "txt_db";
+ this.txt_db.Size = new System.Drawing.Size(167, 21);
+ this.txt_db.TabIndex = 4;
+ //
+ // txt_user
+ //
+ //
+ //
+ //
+ this.txt_user.Border.Class = "TextBoxBorder";
+ this.txt_user.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_user.Location = new System.Drawing.Point(69, 98);
+ this.txt_user.Name = "txt_user";
+ this.txt_user.Size = new System.Drawing.Size(167, 21);
+ this.txt_user.TabIndex = 4;
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(197, 249);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 5;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.txt_pwd);
+ this.groupPanel1.Controls.Add(this.chk);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.txt_user);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_db);
+ this.groupPanel1.Controls.Add(this.txt_ip);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 6);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(260, 229);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 6;
+ this.groupPanel1.Text = "数据库信息";
+ //
+ // chk
+ //
+ this.chk.AutoSize = true;
+ //
+ //
+ //
+ this.chk.BackgroundStyle.Class = "";
+ this.chk.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.chk.Location = new System.Drawing.Point(166, 180);
+ this.chk.Name = "chk";
+ this.chk.Size = new System.Drawing.Size(70, 16);
+ this.chk.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.chk.TabIndex = 5;
+ this.chk.Text = "记住配置";
+ //
+ // txt_pwd
+ //
+ //
+ //
+ //
+ this.txt_pwd.Border.Class = "TextBoxBorder";
+ this.txt_pwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_pwd.Location = new System.Drawing.Point(69, 149);
+ this.txt_pwd.Name = "txt_pwd";
+ this.txt_pwd.PasswordChar = '*';
+ this.txt_pwd.Size = new System.Drawing.Size(167, 21);
+ this.txt_pwd.TabIndex = 6;
+ //
+ // FrmFlagDatabase
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 284);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btn_ok);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagDatabase";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器数据库连接";
+ this.Load += new System.EventHandler(this.FrmFlagDatabase_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_ip;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_db;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_user;
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.CheckBoxX chk;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_pwd;
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDatabase.cs b/FrmFlagDatabase.cs
new file mode 100644
index 0000000..5a137c0
--- /dev/null
+++ b/FrmFlagDatabase.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.IO;
+using System.Xml;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDatabase : Office2007Form
+ {
+ public static string dbServer = "";
+ public static string database = "";
+ public static string userId = "";
+ public static string password = "";
+ public static GSODataSource ds = null;
+ private GSOGlobeControl ctl;
+
+ public FrmFlagDatabase(GSOGlobeControl _ctl)
+ {
+ InitializeComponent();
+ ctl = _ctl;
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ if (String.IsNullOrEmpty(txt_ip.Text.Trim()) || String.IsNullOrEmpty(txt_db.Text.Trim()) || String.IsNullOrEmpty(txt_user.Text.Trim()) || String.IsNullOrEmpty(txt_pwd.Text.Trim()))
+ {
+ MessageBox.Show("配置参数不能为空!", "提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+ try
+ {
+ ds = ctl.Globe.DataManager.OpenOracleDataSource(txt_ip.Text.Trim() + "/" + txt_db.Text.Trim(), "", "", txt_user.Text.Trim(), txt_pwd.Text.Trim());
+ if (ds == null)
+ {
+ MessageBox.Show("数据库连接失败!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ else
+ {
+ dbServer = txt_ip.Text.Trim();
+ database = txt_db.Text.Trim();
+ userId = txt_user.Text.Trim();
+ password = txt_pwd.Text.Trim();
+ WriteXML();
+ }
+ this.DialogResult = DialogResult.OK;
+ MessageBox.Show("已成功连接数据库!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("数据库连接失败:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
+
+ private void FrmFlagDatabase_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ ReadXML();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("窗体加载失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void ReadXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ if (!File.Exists(strFileName))
+ {
+ return;
+ }
+
+ //初始化XML文档操作类
+ XmlDocument myDoc = new XmlDocument();
+ //加载XML文件
+ myDoc.Load(strFileName);
+ //搜索指定的节点
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ XmlNodeList nodes = null;
+ if (serverRootNode != null)
+ {
+ nodes = myDoc.SelectSingleNode("CyberPipe").ChildNodes;
+ if (nodes != null)
+ {
+ bool bRecorded = false;
+ XmlNode bRecordNode = serverRootNode.SelectSingleNode("IsRecordedSql");
+ if (bRecordNode != null)
+ {
+ bool.TryParse(bRecordNode.InnerText, out bRecorded);
+ chk.Checked = bRecorded;
+ }
+ if (bRecorded)
+ {
+ foreach (System.Xml.XmlNode xn in nodes)
+ {
+ if (xn.Name == "serverIP")
+ {
+ txt_ip.Text = xn.InnerText;
+ }
+ else if (xn.Name == "pipedb")
+ {
+ txt_db.Text = xn.InnerText;
+ }
+ else if (xn.Name == "userName")
+ {
+ txt_user.Text = xn.InnerText;
+ }
+ else if (xn.Name == "password")
+ {
+ txt_pwd.Text = xn.InnerText;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void WriteXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ File.WriteAllText(strFileName, " ");
+ XmlDocument myDoc = new XmlDocument();
+
+ //加载XML文件
+ // XmlElement serverRootNode = null;
+ try
+ {
+ myDoc.Load(strFileName);
+
+ }
+ catch (Exception e)
+ {
+ File.Delete(strFileName);
+ File.WriteAllText(strFileName, " ");
+ throw e;
+ }
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ if (serverRootNode == null)
+ {
+ serverRootNode = myDoc.CreateElement("CyberPipe");
+ }
+ XmlElement ele0 = myDoc.CreateElement("IsRecordedSql");
+ ele0.InnerText = chk.Checked.ToString();
+ serverRootNode.AppendChild(ele0);
+
+ XmlElement ele1 = myDoc.CreateElement("serverIP");
+ ele1.InnerText = dbServer;
+ serverRootNode.AppendChild(ele1);
+
+ XmlElement ele2 = myDoc.CreateElement("pipedb");
+ ele2.InnerText = database;
+ serverRootNode.AppendChild(ele2);
+
+ XmlElement ele3 = myDoc.CreateElement("userName");
+ ele3.InnerText = userId;
+ serverRootNode.AppendChild(ele3);
+
+ XmlElement ele4 = myDoc.CreateElement("password");
+ ele4.InnerText = password;
+ serverRootNode.AppendChild(ele4);
+ try
+ {
+ myDoc.Save(strFileName);
+ }
+ catch (Exception exp)
+ {
+ throw exp;
+ }
+ }
+ }
+}
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs
index dd63f62..5b05926 100644
--- a/FrmBSQStatis.cs
+++ b/FrmBSQStatis.cs
@@ -23,10 +23,8 @@
bsq = getBSQNameAndNumMap(polygon);
}
-
private void FrmBSQStatis_Load(object sender, EventArgs e)
{
-
try
{
chartStatis.Series.Add("标识器");
diff --git a/FrmFlagDatabase.Designer.cs b/FrmFlagDatabase.Designer.cs
new file mode 100644
index 0000000..cc7aca8
--- /dev/null
+++ b/FrmFlagDatabase.Designer.cs
@@ -0,0 +1,265 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDatabase
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.txt_ip = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_db = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_user = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.chk = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.txt_pwd = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(3, 3);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(50, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "服务器";
+ this.labelX1.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(3, 47);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 23);
+ this.labelX2.TabIndex = 1;
+ this.labelX2.Text = "数据库";
+ this.labelX2.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(3, 98);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 23);
+ this.labelX3.TabIndex = 2;
+ this.labelX3.Text = "账号";
+ this.labelX3.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(3, 148);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 23);
+ this.labelX4.TabIndex = 3;
+ this.labelX4.Text = "密码";
+ this.labelX4.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // txt_ip
+ //
+ //
+ //
+ //
+ this.txt_ip.Border.Class = "TextBoxBorder";
+ this.txt_ip.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_ip.Location = new System.Drawing.Point(69, 2);
+ this.txt_ip.Name = "txt_ip";
+ this.txt_ip.Size = new System.Drawing.Size(167, 21);
+ this.txt_ip.TabIndex = 4;
+ //
+ // txt_db
+ //
+ //
+ //
+ //
+ this.txt_db.Border.Class = "TextBoxBorder";
+ this.txt_db.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_db.Location = new System.Drawing.Point(69, 47);
+ this.txt_db.Name = "txt_db";
+ this.txt_db.Size = new System.Drawing.Size(167, 21);
+ this.txt_db.TabIndex = 4;
+ //
+ // txt_user
+ //
+ //
+ //
+ //
+ this.txt_user.Border.Class = "TextBoxBorder";
+ this.txt_user.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_user.Location = new System.Drawing.Point(69, 98);
+ this.txt_user.Name = "txt_user";
+ this.txt_user.Size = new System.Drawing.Size(167, 21);
+ this.txt_user.TabIndex = 4;
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(197, 249);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 5;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.txt_pwd);
+ this.groupPanel1.Controls.Add(this.chk);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.txt_user);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_db);
+ this.groupPanel1.Controls.Add(this.txt_ip);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 6);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(260, 229);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 6;
+ this.groupPanel1.Text = "数据库信息";
+ //
+ // chk
+ //
+ this.chk.AutoSize = true;
+ //
+ //
+ //
+ this.chk.BackgroundStyle.Class = "";
+ this.chk.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.chk.Location = new System.Drawing.Point(166, 180);
+ this.chk.Name = "chk";
+ this.chk.Size = new System.Drawing.Size(70, 16);
+ this.chk.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.chk.TabIndex = 5;
+ this.chk.Text = "记住配置";
+ //
+ // txt_pwd
+ //
+ //
+ //
+ //
+ this.txt_pwd.Border.Class = "TextBoxBorder";
+ this.txt_pwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_pwd.Location = new System.Drawing.Point(69, 149);
+ this.txt_pwd.Name = "txt_pwd";
+ this.txt_pwd.PasswordChar = '*';
+ this.txt_pwd.Size = new System.Drawing.Size(167, 21);
+ this.txt_pwd.TabIndex = 6;
+ //
+ // FrmFlagDatabase
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 284);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btn_ok);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagDatabase";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器数据库连接";
+ this.Load += new System.EventHandler(this.FrmFlagDatabase_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_ip;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_db;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_user;
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.CheckBoxX chk;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_pwd;
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDatabase.cs b/FrmFlagDatabase.cs
new file mode 100644
index 0000000..5a137c0
--- /dev/null
+++ b/FrmFlagDatabase.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.IO;
+using System.Xml;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDatabase : Office2007Form
+ {
+ public static string dbServer = "";
+ public static string database = "";
+ public static string userId = "";
+ public static string password = "";
+ public static GSODataSource ds = null;
+ private GSOGlobeControl ctl;
+
+ public FrmFlagDatabase(GSOGlobeControl _ctl)
+ {
+ InitializeComponent();
+ ctl = _ctl;
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ if (String.IsNullOrEmpty(txt_ip.Text.Trim()) || String.IsNullOrEmpty(txt_db.Text.Trim()) || String.IsNullOrEmpty(txt_user.Text.Trim()) || String.IsNullOrEmpty(txt_pwd.Text.Trim()))
+ {
+ MessageBox.Show("配置参数不能为空!", "提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+ try
+ {
+ ds = ctl.Globe.DataManager.OpenOracleDataSource(txt_ip.Text.Trim() + "/" + txt_db.Text.Trim(), "", "", txt_user.Text.Trim(), txt_pwd.Text.Trim());
+ if (ds == null)
+ {
+ MessageBox.Show("数据库连接失败!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ else
+ {
+ dbServer = txt_ip.Text.Trim();
+ database = txt_db.Text.Trim();
+ userId = txt_user.Text.Trim();
+ password = txt_pwd.Text.Trim();
+ WriteXML();
+ }
+ this.DialogResult = DialogResult.OK;
+ MessageBox.Show("已成功连接数据库!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("数据库连接失败:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
+
+ private void FrmFlagDatabase_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ ReadXML();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("窗体加载失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void ReadXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ if (!File.Exists(strFileName))
+ {
+ return;
+ }
+
+ //初始化XML文档操作类
+ XmlDocument myDoc = new XmlDocument();
+ //加载XML文件
+ myDoc.Load(strFileName);
+ //搜索指定的节点
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ XmlNodeList nodes = null;
+ if (serverRootNode != null)
+ {
+ nodes = myDoc.SelectSingleNode("CyberPipe").ChildNodes;
+ if (nodes != null)
+ {
+ bool bRecorded = false;
+ XmlNode bRecordNode = serverRootNode.SelectSingleNode("IsRecordedSql");
+ if (bRecordNode != null)
+ {
+ bool.TryParse(bRecordNode.InnerText, out bRecorded);
+ chk.Checked = bRecorded;
+ }
+ if (bRecorded)
+ {
+ foreach (System.Xml.XmlNode xn in nodes)
+ {
+ if (xn.Name == "serverIP")
+ {
+ txt_ip.Text = xn.InnerText;
+ }
+ else if (xn.Name == "pipedb")
+ {
+ txt_db.Text = xn.InnerText;
+ }
+ else if (xn.Name == "userName")
+ {
+ txt_user.Text = xn.InnerText;
+ }
+ else if (xn.Name == "password")
+ {
+ txt_pwd.Text = xn.InnerText;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void WriteXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ File.WriteAllText(strFileName, " ");
+ XmlDocument myDoc = new XmlDocument();
+
+ //加载XML文件
+ // XmlElement serverRootNode = null;
+ try
+ {
+ myDoc.Load(strFileName);
+
+ }
+ catch (Exception e)
+ {
+ File.Delete(strFileName);
+ File.WriteAllText(strFileName, " ");
+ throw e;
+ }
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ if (serverRootNode == null)
+ {
+ serverRootNode = myDoc.CreateElement("CyberPipe");
+ }
+ XmlElement ele0 = myDoc.CreateElement("IsRecordedSql");
+ ele0.InnerText = chk.Checked.ToString();
+ serverRootNode.AppendChild(ele0);
+
+ XmlElement ele1 = myDoc.CreateElement("serverIP");
+ ele1.InnerText = dbServer;
+ serverRootNode.AppendChild(ele1);
+
+ XmlElement ele2 = myDoc.CreateElement("pipedb");
+ ele2.InnerText = database;
+ serverRootNode.AppendChild(ele2);
+
+ XmlElement ele3 = myDoc.CreateElement("userName");
+ ele3.InnerText = userId;
+ serverRootNode.AppendChild(ele3);
+
+ XmlElement ele4 = myDoc.CreateElement("password");
+ ele4.InnerText = password;
+ serverRootNode.AppendChild(ele4);
+ try
+ {
+ myDoc.Save(strFileName);
+ }
+ catch (Exception exp)
+ {
+ throw exp;
+ }
+ }
+ }
+}
diff --git a/FrmFlagDatabase.resx b/FrmFlagDatabase.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmFlagDatabase.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs
index dd63f62..5b05926 100644
--- a/FrmBSQStatis.cs
+++ b/FrmBSQStatis.cs
@@ -23,10 +23,8 @@
bsq = getBSQNameAndNumMap(polygon);
}
-
private void FrmBSQStatis_Load(object sender, EventArgs e)
{
-
try
{
chartStatis.Series.Add("标识器");
diff --git a/FrmFlagDatabase.Designer.cs b/FrmFlagDatabase.Designer.cs
new file mode 100644
index 0000000..cc7aca8
--- /dev/null
+++ b/FrmFlagDatabase.Designer.cs
@@ -0,0 +1,265 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDatabase
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.txt_ip = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_db = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_user = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.chk = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.txt_pwd = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(3, 3);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(50, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "服务器";
+ this.labelX1.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(3, 47);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 23);
+ this.labelX2.TabIndex = 1;
+ this.labelX2.Text = "数据库";
+ this.labelX2.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(3, 98);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 23);
+ this.labelX3.TabIndex = 2;
+ this.labelX3.Text = "账号";
+ this.labelX3.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(3, 148);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 23);
+ this.labelX4.TabIndex = 3;
+ this.labelX4.Text = "密码";
+ this.labelX4.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // txt_ip
+ //
+ //
+ //
+ //
+ this.txt_ip.Border.Class = "TextBoxBorder";
+ this.txt_ip.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_ip.Location = new System.Drawing.Point(69, 2);
+ this.txt_ip.Name = "txt_ip";
+ this.txt_ip.Size = new System.Drawing.Size(167, 21);
+ this.txt_ip.TabIndex = 4;
+ //
+ // txt_db
+ //
+ //
+ //
+ //
+ this.txt_db.Border.Class = "TextBoxBorder";
+ this.txt_db.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_db.Location = new System.Drawing.Point(69, 47);
+ this.txt_db.Name = "txt_db";
+ this.txt_db.Size = new System.Drawing.Size(167, 21);
+ this.txt_db.TabIndex = 4;
+ //
+ // txt_user
+ //
+ //
+ //
+ //
+ this.txt_user.Border.Class = "TextBoxBorder";
+ this.txt_user.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_user.Location = new System.Drawing.Point(69, 98);
+ this.txt_user.Name = "txt_user";
+ this.txt_user.Size = new System.Drawing.Size(167, 21);
+ this.txt_user.TabIndex = 4;
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(197, 249);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 5;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.txt_pwd);
+ this.groupPanel1.Controls.Add(this.chk);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.txt_user);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_db);
+ this.groupPanel1.Controls.Add(this.txt_ip);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 6);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(260, 229);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 6;
+ this.groupPanel1.Text = "数据库信息";
+ //
+ // chk
+ //
+ this.chk.AutoSize = true;
+ //
+ //
+ //
+ this.chk.BackgroundStyle.Class = "";
+ this.chk.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.chk.Location = new System.Drawing.Point(166, 180);
+ this.chk.Name = "chk";
+ this.chk.Size = new System.Drawing.Size(70, 16);
+ this.chk.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.chk.TabIndex = 5;
+ this.chk.Text = "记住配置";
+ //
+ // txt_pwd
+ //
+ //
+ //
+ //
+ this.txt_pwd.Border.Class = "TextBoxBorder";
+ this.txt_pwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_pwd.Location = new System.Drawing.Point(69, 149);
+ this.txt_pwd.Name = "txt_pwd";
+ this.txt_pwd.PasswordChar = '*';
+ this.txt_pwd.Size = new System.Drawing.Size(167, 21);
+ this.txt_pwd.TabIndex = 6;
+ //
+ // FrmFlagDatabase
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 284);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btn_ok);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagDatabase";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器数据库连接";
+ this.Load += new System.EventHandler(this.FrmFlagDatabase_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_ip;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_db;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_user;
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.CheckBoxX chk;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_pwd;
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDatabase.cs b/FrmFlagDatabase.cs
new file mode 100644
index 0000000..5a137c0
--- /dev/null
+++ b/FrmFlagDatabase.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.IO;
+using System.Xml;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDatabase : Office2007Form
+ {
+ public static string dbServer = "";
+ public static string database = "";
+ public static string userId = "";
+ public static string password = "";
+ public static GSODataSource ds = null;
+ private GSOGlobeControl ctl;
+
+ public FrmFlagDatabase(GSOGlobeControl _ctl)
+ {
+ InitializeComponent();
+ ctl = _ctl;
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ if (String.IsNullOrEmpty(txt_ip.Text.Trim()) || String.IsNullOrEmpty(txt_db.Text.Trim()) || String.IsNullOrEmpty(txt_user.Text.Trim()) || String.IsNullOrEmpty(txt_pwd.Text.Trim()))
+ {
+ MessageBox.Show("配置参数不能为空!", "提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+ try
+ {
+ ds = ctl.Globe.DataManager.OpenOracleDataSource(txt_ip.Text.Trim() + "/" + txt_db.Text.Trim(), "", "", txt_user.Text.Trim(), txt_pwd.Text.Trim());
+ if (ds == null)
+ {
+ MessageBox.Show("数据库连接失败!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ else
+ {
+ dbServer = txt_ip.Text.Trim();
+ database = txt_db.Text.Trim();
+ userId = txt_user.Text.Trim();
+ password = txt_pwd.Text.Trim();
+ WriteXML();
+ }
+ this.DialogResult = DialogResult.OK;
+ MessageBox.Show("已成功连接数据库!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("数据库连接失败:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
+
+ private void FrmFlagDatabase_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ ReadXML();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("窗体加载失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void ReadXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ if (!File.Exists(strFileName))
+ {
+ return;
+ }
+
+ //初始化XML文档操作类
+ XmlDocument myDoc = new XmlDocument();
+ //加载XML文件
+ myDoc.Load(strFileName);
+ //搜索指定的节点
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ XmlNodeList nodes = null;
+ if (serverRootNode != null)
+ {
+ nodes = myDoc.SelectSingleNode("CyberPipe").ChildNodes;
+ if (nodes != null)
+ {
+ bool bRecorded = false;
+ XmlNode bRecordNode = serverRootNode.SelectSingleNode("IsRecordedSql");
+ if (bRecordNode != null)
+ {
+ bool.TryParse(bRecordNode.InnerText, out bRecorded);
+ chk.Checked = bRecorded;
+ }
+ if (bRecorded)
+ {
+ foreach (System.Xml.XmlNode xn in nodes)
+ {
+ if (xn.Name == "serverIP")
+ {
+ txt_ip.Text = xn.InnerText;
+ }
+ else if (xn.Name == "pipedb")
+ {
+ txt_db.Text = xn.InnerText;
+ }
+ else if (xn.Name == "userName")
+ {
+ txt_user.Text = xn.InnerText;
+ }
+ else if (xn.Name == "password")
+ {
+ txt_pwd.Text = xn.InnerText;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void WriteXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ File.WriteAllText(strFileName, " ");
+ XmlDocument myDoc = new XmlDocument();
+
+ //加载XML文件
+ // XmlElement serverRootNode = null;
+ try
+ {
+ myDoc.Load(strFileName);
+
+ }
+ catch (Exception e)
+ {
+ File.Delete(strFileName);
+ File.WriteAllText(strFileName, " ");
+ throw e;
+ }
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ if (serverRootNode == null)
+ {
+ serverRootNode = myDoc.CreateElement("CyberPipe");
+ }
+ XmlElement ele0 = myDoc.CreateElement("IsRecordedSql");
+ ele0.InnerText = chk.Checked.ToString();
+ serverRootNode.AppendChild(ele0);
+
+ XmlElement ele1 = myDoc.CreateElement("serverIP");
+ ele1.InnerText = dbServer;
+ serverRootNode.AppendChild(ele1);
+
+ XmlElement ele2 = myDoc.CreateElement("pipedb");
+ ele2.InnerText = database;
+ serverRootNode.AppendChild(ele2);
+
+ XmlElement ele3 = myDoc.CreateElement("userName");
+ ele3.InnerText = userId;
+ serverRootNode.AppendChild(ele3);
+
+ XmlElement ele4 = myDoc.CreateElement("password");
+ ele4.InnerText = password;
+ serverRootNode.AppendChild(ele4);
+ try
+ {
+ myDoc.Save(strFileName);
+ }
+ catch (Exception exp)
+ {
+ throw exp;
+ }
+ }
+ }
+}
diff --git a/FrmFlagDatabase.resx b/FrmFlagDatabase.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmFlagDatabase.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmFlagDetail.Designer.cs b/FrmFlagDetail.Designer.cs
new file mode 100644
index 0000000..982bfc6
--- /dev/null
+++ b/FrmFlagDetail.Designer.cs
@@ -0,0 +1,103 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDetail
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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 dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ this.dataGridViewX_markDetail = new DevComponents.DotNetBar.Controls.DataGridViewX();
+ this.对象类型 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象编号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).BeginInit();
+ this.SuspendLayout();
+ //
+ // dataGridViewX_markDetail
+ //
+ this.dataGridViewX_markDetail.AllowUserToAddRows = false;
+ this.dataGridViewX_markDetail.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+ this.dataGridViewX_markDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridViewX_markDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.对象类型,
+ this.对象编号,
+ this.对象名称});
+ dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
+ dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dataGridViewX_markDetail.DefaultCellStyle = dataGridViewCellStyle3;
+ this.dataGridViewX_markDetail.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridViewX_markDetail.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
+ this.dataGridViewX_markDetail.Location = new System.Drawing.Point(0, 0);
+ this.dataGridViewX_markDetail.Name = "dataGridViewX_markDetail";
+ this.dataGridViewX_markDetail.RowTemplate.Height = 23;
+ this.dataGridViewX_markDetail.Size = new System.Drawing.Size(508, 321);
+ this.dataGridViewX_markDetail.TabIndex = 0;
+ //
+ // 对象类型
+ //
+ this.对象类型.HeaderText = "对象类型";
+ this.对象类型.Name = "对象类型";
+ //
+ // 对象编号
+ //
+ this.对象编号.HeaderText = "对象编号";
+ this.对象编号.Name = "对象编号";
+ //
+ // 对象名称
+ //
+ this.对象名称.HeaderText = "对象名称";
+ this.对象名称.Name = "对象名称";
+ //
+ // FrmFlagDetail
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(508, 321);
+ this.Controls.Add(this.dataGridViewX_markDetail);
+ this.Name = "FrmFlagDetail";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识对象信息";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmFlagDetail_FormClosing);
+ this.Load += new System.EventHandler(this.FrmFlagDetail_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_markDetail;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象类型;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象编号;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象名称;
+
+ }
+}
\ No newline at end of file
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs
index dd63f62..5b05926 100644
--- a/FrmBSQStatis.cs
+++ b/FrmBSQStatis.cs
@@ -23,10 +23,8 @@
bsq = getBSQNameAndNumMap(polygon);
}
-
private void FrmBSQStatis_Load(object sender, EventArgs e)
{
-
try
{
chartStatis.Series.Add("标识器");
diff --git a/FrmFlagDatabase.Designer.cs b/FrmFlagDatabase.Designer.cs
new file mode 100644
index 0000000..cc7aca8
--- /dev/null
+++ b/FrmFlagDatabase.Designer.cs
@@ -0,0 +1,265 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDatabase
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.txt_ip = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_db = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_user = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.chk = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.txt_pwd = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(3, 3);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(50, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "服务器";
+ this.labelX1.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(3, 47);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 23);
+ this.labelX2.TabIndex = 1;
+ this.labelX2.Text = "数据库";
+ this.labelX2.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(3, 98);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 23);
+ this.labelX3.TabIndex = 2;
+ this.labelX3.Text = "账号";
+ this.labelX3.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(3, 148);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 23);
+ this.labelX4.TabIndex = 3;
+ this.labelX4.Text = "密码";
+ this.labelX4.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // txt_ip
+ //
+ //
+ //
+ //
+ this.txt_ip.Border.Class = "TextBoxBorder";
+ this.txt_ip.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_ip.Location = new System.Drawing.Point(69, 2);
+ this.txt_ip.Name = "txt_ip";
+ this.txt_ip.Size = new System.Drawing.Size(167, 21);
+ this.txt_ip.TabIndex = 4;
+ //
+ // txt_db
+ //
+ //
+ //
+ //
+ this.txt_db.Border.Class = "TextBoxBorder";
+ this.txt_db.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_db.Location = new System.Drawing.Point(69, 47);
+ this.txt_db.Name = "txt_db";
+ this.txt_db.Size = new System.Drawing.Size(167, 21);
+ this.txt_db.TabIndex = 4;
+ //
+ // txt_user
+ //
+ //
+ //
+ //
+ this.txt_user.Border.Class = "TextBoxBorder";
+ this.txt_user.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_user.Location = new System.Drawing.Point(69, 98);
+ this.txt_user.Name = "txt_user";
+ this.txt_user.Size = new System.Drawing.Size(167, 21);
+ this.txt_user.TabIndex = 4;
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(197, 249);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 5;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.txt_pwd);
+ this.groupPanel1.Controls.Add(this.chk);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.txt_user);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_db);
+ this.groupPanel1.Controls.Add(this.txt_ip);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 6);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(260, 229);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 6;
+ this.groupPanel1.Text = "数据库信息";
+ //
+ // chk
+ //
+ this.chk.AutoSize = true;
+ //
+ //
+ //
+ this.chk.BackgroundStyle.Class = "";
+ this.chk.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.chk.Location = new System.Drawing.Point(166, 180);
+ this.chk.Name = "chk";
+ this.chk.Size = new System.Drawing.Size(70, 16);
+ this.chk.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.chk.TabIndex = 5;
+ this.chk.Text = "记住配置";
+ //
+ // txt_pwd
+ //
+ //
+ //
+ //
+ this.txt_pwd.Border.Class = "TextBoxBorder";
+ this.txt_pwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_pwd.Location = new System.Drawing.Point(69, 149);
+ this.txt_pwd.Name = "txt_pwd";
+ this.txt_pwd.PasswordChar = '*';
+ this.txt_pwd.Size = new System.Drawing.Size(167, 21);
+ this.txt_pwd.TabIndex = 6;
+ //
+ // FrmFlagDatabase
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 284);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btn_ok);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagDatabase";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器数据库连接";
+ this.Load += new System.EventHandler(this.FrmFlagDatabase_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_ip;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_db;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_user;
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.CheckBoxX chk;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_pwd;
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDatabase.cs b/FrmFlagDatabase.cs
new file mode 100644
index 0000000..5a137c0
--- /dev/null
+++ b/FrmFlagDatabase.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.IO;
+using System.Xml;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDatabase : Office2007Form
+ {
+ public static string dbServer = "";
+ public static string database = "";
+ public static string userId = "";
+ public static string password = "";
+ public static GSODataSource ds = null;
+ private GSOGlobeControl ctl;
+
+ public FrmFlagDatabase(GSOGlobeControl _ctl)
+ {
+ InitializeComponent();
+ ctl = _ctl;
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ if (String.IsNullOrEmpty(txt_ip.Text.Trim()) || String.IsNullOrEmpty(txt_db.Text.Trim()) || String.IsNullOrEmpty(txt_user.Text.Trim()) || String.IsNullOrEmpty(txt_pwd.Text.Trim()))
+ {
+ MessageBox.Show("配置参数不能为空!", "提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+ try
+ {
+ ds = ctl.Globe.DataManager.OpenOracleDataSource(txt_ip.Text.Trim() + "/" + txt_db.Text.Trim(), "", "", txt_user.Text.Trim(), txt_pwd.Text.Trim());
+ if (ds == null)
+ {
+ MessageBox.Show("数据库连接失败!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ else
+ {
+ dbServer = txt_ip.Text.Trim();
+ database = txt_db.Text.Trim();
+ userId = txt_user.Text.Trim();
+ password = txt_pwd.Text.Trim();
+ WriteXML();
+ }
+ this.DialogResult = DialogResult.OK;
+ MessageBox.Show("已成功连接数据库!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("数据库连接失败:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
+
+ private void FrmFlagDatabase_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ ReadXML();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("窗体加载失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void ReadXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ if (!File.Exists(strFileName))
+ {
+ return;
+ }
+
+ //初始化XML文档操作类
+ XmlDocument myDoc = new XmlDocument();
+ //加载XML文件
+ myDoc.Load(strFileName);
+ //搜索指定的节点
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ XmlNodeList nodes = null;
+ if (serverRootNode != null)
+ {
+ nodes = myDoc.SelectSingleNode("CyberPipe").ChildNodes;
+ if (nodes != null)
+ {
+ bool bRecorded = false;
+ XmlNode bRecordNode = serverRootNode.SelectSingleNode("IsRecordedSql");
+ if (bRecordNode != null)
+ {
+ bool.TryParse(bRecordNode.InnerText, out bRecorded);
+ chk.Checked = bRecorded;
+ }
+ if (bRecorded)
+ {
+ foreach (System.Xml.XmlNode xn in nodes)
+ {
+ if (xn.Name == "serverIP")
+ {
+ txt_ip.Text = xn.InnerText;
+ }
+ else if (xn.Name == "pipedb")
+ {
+ txt_db.Text = xn.InnerText;
+ }
+ else if (xn.Name == "userName")
+ {
+ txt_user.Text = xn.InnerText;
+ }
+ else if (xn.Name == "password")
+ {
+ txt_pwd.Text = xn.InnerText;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void WriteXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ File.WriteAllText(strFileName, " ");
+ XmlDocument myDoc = new XmlDocument();
+
+ //加载XML文件
+ // XmlElement serverRootNode = null;
+ try
+ {
+ myDoc.Load(strFileName);
+
+ }
+ catch (Exception e)
+ {
+ File.Delete(strFileName);
+ File.WriteAllText(strFileName, " ");
+ throw e;
+ }
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ if (serverRootNode == null)
+ {
+ serverRootNode = myDoc.CreateElement("CyberPipe");
+ }
+ XmlElement ele0 = myDoc.CreateElement("IsRecordedSql");
+ ele0.InnerText = chk.Checked.ToString();
+ serverRootNode.AppendChild(ele0);
+
+ XmlElement ele1 = myDoc.CreateElement("serverIP");
+ ele1.InnerText = dbServer;
+ serverRootNode.AppendChild(ele1);
+
+ XmlElement ele2 = myDoc.CreateElement("pipedb");
+ ele2.InnerText = database;
+ serverRootNode.AppendChild(ele2);
+
+ XmlElement ele3 = myDoc.CreateElement("userName");
+ ele3.InnerText = userId;
+ serverRootNode.AppendChild(ele3);
+
+ XmlElement ele4 = myDoc.CreateElement("password");
+ ele4.InnerText = password;
+ serverRootNode.AppendChild(ele4);
+ try
+ {
+ myDoc.Save(strFileName);
+ }
+ catch (Exception exp)
+ {
+ throw exp;
+ }
+ }
+ }
+}
diff --git a/FrmFlagDatabase.resx b/FrmFlagDatabase.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmFlagDatabase.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmFlagDetail.Designer.cs b/FrmFlagDetail.Designer.cs
new file mode 100644
index 0000000..982bfc6
--- /dev/null
+++ b/FrmFlagDetail.Designer.cs
@@ -0,0 +1,103 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDetail
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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 dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ this.dataGridViewX_markDetail = new DevComponents.DotNetBar.Controls.DataGridViewX();
+ this.对象类型 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象编号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).BeginInit();
+ this.SuspendLayout();
+ //
+ // dataGridViewX_markDetail
+ //
+ this.dataGridViewX_markDetail.AllowUserToAddRows = false;
+ this.dataGridViewX_markDetail.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+ this.dataGridViewX_markDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridViewX_markDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.对象类型,
+ this.对象编号,
+ this.对象名称});
+ dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
+ dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dataGridViewX_markDetail.DefaultCellStyle = dataGridViewCellStyle3;
+ this.dataGridViewX_markDetail.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridViewX_markDetail.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
+ this.dataGridViewX_markDetail.Location = new System.Drawing.Point(0, 0);
+ this.dataGridViewX_markDetail.Name = "dataGridViewX_markDetail";
+ this.dataGridViewX_markDetail.RowTemplate.Height = 23;
+ this.dataGridViewX_markDetail.Size = new System.Drawing.Size(508, 321);
+ this.dataGridViewX_markDetail.TabIndex = 0;
+ //
+ // 对象类型
+ //
+ this.对象类型.HeaderText = "对象类型";
+ this.对象类型.Name = "对象类型";
+ //
+ // 对象编号
+ //
+ this.对象编号.HeaderText = "对象编号";
+ this.对象编号.Name = "对象编号";
+ //
+ // 对象名称
+ //
+ this.对象名称.HeaderText = "对象名称";
+ this.对象名称.Name = "对象名称";
+ //
+ // FrmFlagDetail
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(508, 321);
+ this.Controls.Add(this.dataGridViewX_markDetail);
+ this.Name = "FrmFlagDetail";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识对象信息";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmFlagDetail_FormClosing);
+ this.Load += new System.EventHandler(this.FrmFlagDetail_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_markDetail;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象类型;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象编号;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象名称;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDetail.cs b/FrmFlagDetail.cs
new file mode 100644
index 0000000..d72eee9
--- /dev/null
+++ b/FrmFlagDetail.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using GeoScene.Globe;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDetail : Form
+ {
+ DataTable dt = new DataTable();
+ private GSOGlobeControl globeControl1;
+
+ public delegate void Handle();
+ public event Handle showParentForm;
+ String markId;
+
+ public FrmFlagDetail(GSOGlobeControl globeControl1, String id)
+ {
+ InitializeComponent();
+ this.markId = id;
+ }
+
+ private void FrmFlagDetail_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ showParentForm();
+ }
+
+ private void FrmFlagDetail_Load(object sender, EventArgs e)
+ {
+ string objectIds = "";
+ string objectTypeCodes = "";
+ string sql = "select t.对象编号,t.对象类型 from 标识器 t where t.编号='" + markId + "'";
+ using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql))
+ {
+ while (reader.Read())
+ {
+ objectIds = reader.GetString(0);
+ objectTypeCodes = reader.GetString(1);
+ }
+ }
+
+ string[] codeTypes = objectTypeCodes.Split(',');
+ string[] codeIds = objectIds.Split(',');
+ int length = 0;
+ if (codeTypes.Length <= codeIds.Length)
+ {
+ length = codeTypes.Length;
+ }
+ else
+ {
+ length = codeIds.Length;
+ }
+ for (int n = 0; n < length; n++)
+ {
+ for (int i = 0; i < Utility.listPipelineType.Count; i++)
+ {
+ if (Utility.listPipelineType[i].code == codeTypes[n])
+ {
+ int index = this.dataGridViewX_markDetail.Rows.Add();
+ this.dataGridViewX_markDetail.Rows[index].Cells[0].Value = Utility.listPipelineType[i].type;
+ this.dataGridViewX_markDetail.Rows[index].Cells[1].Value = codeIds[n].ToString();
+ this.dataGridViewX_markDetail.Rows[index].Cells[2].Value = Utility.listPipelineType[i].name;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs
index dd63f62..5b05926 100644
--- a/FrmBSQStatis.cs
+++ b/FrmBSQStatis.cs
@@ -23,10 +23,8 @@
bsq = getBSQNameAndNumMap(polygon);
}
-
private void FrmBSQStatis_Load(object sender, EventArgs e)
{
-
try
{
chartStatis.Series.Add("标识器");
diff --git a/FrmFlagDatabase.Designer.cs b/FrmFlagDatabase.Designer.cs
new file mode 100644
index 0000000..cc7aca8
--- /dev/null
+++ b/FrmFlagDatabase.Designer.cs
@@ -0,0 +1,265 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDatabase
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.txt_ip = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_db = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_user = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.chk = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.txt_pwd = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(3, 3);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(50, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "服务器";
+ this.labelX1.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(3, 47);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 23);
+ this.labelX2.TabIndex = 1;
+ this.labelX2.Text = "数据库";
+ this.labelX2.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(3, 98);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 23);
+ this.labelX3.TabIndex = 2;
+ this.labelX3.Text = "账号";
+ this.labelX3.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(3, 148);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 23);
+ this.labelX4.TabIndex = 3;
+ this.labelX4.Text = "密码";
+ this.labelX4.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // txt_ip
+ //
+ //
+ //
+ //
+ this.txt_ip.Border.Class = "TextBoxBorder";
+ this.txt_ip.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_ip.Location = new System.Drawing.Point(69, 2);
+ this.txt_ip.Name = "txt_ip";
+ this.txt_ip.Size = new System.Drawing.Size(167, 21);
+ this.txt_ip.TabIndex = 4;
+ //
+ // txt_db
+ //
+ //
+ //
+ //
+ this.txt_db.Border.Class = "TextBoxBorder";
+ this.txt_db.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_db.Location = new System.Drawing.Point(69, 47);
+ this.txt_db.Name = "txt_db";
+ this.txt_db.Size = new System.Drawing.Size(167, 21);
+ this.txt_db.TabIndex = 4;
+ //
+ // txt_user
+ //
+ //
+ //
+ //
+ this.txt_user.Border.Class = "TextBoxBorder";
+ this.txt_user.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_user.Location = new System.Drawing.Point(69, 98);
+ this.txt_user.Name = "txt_user";
+ this.txt_user.Size = new System.Drawing.Size(167, 21);
+ this.txt_user.TabIndex = 4;
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(197, 249);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 5;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.txt_pwd);
+ this.groupPanel1.Controls.Add(this.chk);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.txt_user);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_db);
+ this.groupPanel1.Controls.Add(this.txt_ip);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 6);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(260, 229);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 6;
+ this.groupPanel1.Text = "数据库信息";
+ //
+ // chk
+ //
+ this.chk.AutoSize = true;
+ //
+ //
+ //
+ this.chk.BackgroundStyle.Class = "";
+ this.chk.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.chk.Location = new System.Drawing.Point(166, 180);
+ this.chk.Name = "chk";
+ this.chk.Size = new System.Drawing.Size(70, 16);
+ this.chk.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.chk.TabIndex = 5;
+ this.chk.Text = "记住配置";
+ //
+ // txt_pwd
+ //
+ //
+ //
+ //
+ this.txt_pwd.Border.Class = "TextBoxBorder";
+ this.txt_pwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_pwd.Location = new System.Drawing.Point(69, 149);
+ this.txt_pwd.Name = "txt_pwd";
+ this.txt_pwd.PasswordChar = '*';
+ this.txt_pwd.Size = new System.Drawing.Size(167, 21);
+ this.txt_pwd.TabIndex = 6;
+ //
+ // FrmFlagDatabase
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 284);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btn_ok);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagDatabase";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器数据库连接";
+ this.Load += new System.EventHandler(this.FrmFlagDatabase_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_ip;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_db;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_user;
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.CheckBoxX chk;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_pwd;
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDatabase.cs b/FrmFlagDatabase.cs
new file mode 100644
index 0000000..5a137c0
--- /dev/null
+++ b/FrmFlagDatabase.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.IO;
+using System.Xml;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDatabase : Office2007Form
+ {
+ public static string dbServer = "";
+ public static string database = "";
+ public static string userId = "";
+ public static string password = "";
+ public static GSODataSource ds = null;
+ private GSOGlobeControl ctl;
+
+ public FrmFlagDatabase(GSOGlobeControl _ctl)
+ {
+ InitializeComponent();
+ ctl = _ctl;
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ if (String.IsNullOrEmpty(txt_ip.Text.Trim()) || String.IsNullOrEmpty(txt_db.Text.Trim()) || String.IsNullOrEmpty(txt_user.Text.Trim()) || String.IsNullOrEmpty(txt_pwd.Text.Trim()))
+ {
+ MessageBox.Show("配置参数不能为空!", "提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+ try
+ {
+ ds = ctl.Globe.DataManager.OpenOracleDataSource(txt_ip.Text.Trim() + "/" + txt_db.Text.Trim(), "", "", txt_user.Text.Trim(), txt_pwd.Text.Trim());
+ if (ds == null)
+ {
+ MessageBox.Show("数据库连接失败!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ else
+ {
+ dbServer = txt_ip.Text.Trim();
+ database = txt_db.Text.Trim();
+ userId = txt_user.Text.Trim();
+ password = txt_pwd.Text.Trim();
+ WriteXML();
+ }
+ this.DialogResult = DialogResult.OK;
+ MessageBox.Show("已成功连接数据库!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("数据库连接失败:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
+
+ private void FrmFlagDatabase_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ ReadXML();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("窗体加载失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void ReadXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ if (!File.Exists(strFileName))
+ {
+ return;
+ }
+
+ //初始化XML文档操作类
+ XmlDocument myDoc = new XmlDocument();
+ //加载XML文件
+ myDoc.Load(strFileName);
+ //搜索指定的节点
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ XmlNodeList nodes = null;
+ if (serverRootNode != null)
+ {
+ nodes = myDoc.SelectSingleNode("CyberPipe").ChildNodes;
+ if (nodes != null)
+ {
+ bool bRecorded = false;
+ XmlNode bRecordNode = serverRootNode.SelectSingleNode("IsRecordedSql");
+ if (bRecordNode != null)
+ {
+ bool.TryParse(bRecordNode.InnerText, out bRecorded);
+ chk.Checked = bRecorded;
+ }
+ if (bRecorded)
+ {
+ foreach (System.Xml.XmlNode xn in nodes)
+ {
+ if (xn.Name == "serverIP")
+ {
+ txt_ip.Text = xn.InnerText;
+ }
+ else if (xn.Name == "pipedb")
+ {
+ txt_db.Text = xn.InnerText;
+ }
+ else if (xn.Name == "userName")
+ {
+ txt_user.Text = xn.InnerText;
+ }
+ else if (xn.Name == "password")
+ {
+ txt_pwd.Text = xn.InnerText;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void WriteXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ File.WriteAllText(strFileName, " ");
+ XmlDocument myDoc = new XmlDocument();
+
+ //加载XML文件
+ // XmlElement serverRootNode = null;
+ try
+ {
+ myDoc.Load(strFileName);
+
+ }
+ catch (Exception e)
+ {
+ File.Delete(strFileName);
+ File.WriteAllText(strFileName, " ");
+ throw e;
+ }
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ if (serverRootNode == null)
+ {
+ serverRootNode = myDoc.CreateElement("CyberPipe");
+ }
+ XmlElement ele0 = myDoc.CreateElement("IsRecordedSql");
+ ele0.InnerText = chk.Checked.ToString();
+ serverRootNode.AppendChild(ele0);
+
+ XmlElement ele1 = myDoc.CreateElement("serverIP");
+ ele1.InnerText = dbServer;
+ serverRootNode.AppendChild(ele1);
+
+ XmlElement ele2 = myDoc.CreateElement("pipedb");
+ ele2.InnerText = database;
+ serverRootNode.AppendChild(ele2);
+
+ XmlElement ele3 = myDoc.CreateElement("userName");
+ ele3.InnerText = userId;
+ serverRootNode.AppendChild(ele3);
+
+ XmlElement ele4 = myDoc.CreateElement("password");
+ ele4.InnerText = password;
+ serverRootNode.AppendChild(ele4);
+ try
+ {
+ myDoc.Save(strFileName);
+ }
+ catch (Exception exp)
+ {
+ throw exp;
+ }
+ }
+ }
+}
diff --git a/FrmFlagDatabase.resx b/FrmFlagDatabase.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmFlagDatabase.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmFlagDetail.Designer.cs b/FrmFlagDetail.Designer.cs
new file mode 100644
index 0000000..982bfc6
--- /dev/null
+++ b/FrmFlagDetail.Designer.cs
@@ -0,0 +1,103 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDetail
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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 dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ this.dataGridViewX_markDetail = new DevComponents.DotNetBar.Controls.DataGridViewX();
+ this.对象类型 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象编号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).BeginInit();
+ this.SuspendLayout();
+ //
+ // dataGridViewX_markDetail
+ //
+ this.dataGridViewX_markDetail.AllowUserToAddRows = false;
+ this.dataGridViewX_markDetail.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+ this.dataGridViewX_markDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridViewX_markDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.对象类型,
+ this.对象编号,
+ this.对象名称});
+ dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
+ dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dataGridViewX_markDetail.DefaultCellStyle = dataGridViewCellStyle3;
+ this.dataGridViewX_markDetail.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridViewX_markDetail.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
+ this.dataGridViewX_markDetail.Location = new System.Drawing.Point(0, 0);
+ this.dataGridViewX_markDetail.Name = "dataGridViewX_markDetail";
+ this.dataGridViewX_markDetail.RowTemplate.Height = 23;
+ this.dataGridViewX_markDetail.Size = new System.Drawing.Size(508, 321);
+ this.dataGridViewX_markDetail.TabIndex = 0;
+ //
+ // 对象类型
+ //
+ this.对象类型.HeaderText = "对象类型";
+ this.对象类型.Name = "对象类型";
+ //
+ // 对象编号
+ //
+ this.对象编号.HeaderText = "对象编号";
+ this.对象编号.Name = "对象编号";
+ //
+ // 对象名称
+ //
+ this.对象名称.HeaderText = "对象名称";
+ this.对象名称.Name = "对象名称";
+ //
+ // FrmFlagDetail
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(508, 321);
+ this.Controls.Add(this.dataGridViewX_markDetail);
+ this.Name = "FrmFlagDetail";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识对象信息";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmFlagDetail_FormClosing);
+ this.Load += new System.EventHandler(this.FrmFlagDetail_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_markDetail;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象类型;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象编号;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象名称;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDetail.cs b/FrmFlagDetail.cs
new file mode 100644
index 0000000..d72eee9
--- /dev/null
+++ b/FrmFlagDetail.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using GeoScene.Globe;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDetail : Form
+ {
+ DataTable dt = new DataTable();
+ private GSOGlobeControl globeControl1;
+
+ public delegate void Handle();
+ public event Handle showParentForm;
+ String markId;
+
+ public FrmFlagDetail(GSOGlobeControl globeControl1, String id)
+ {
+ InitializeComponent();
+ this.markId = id;
+ }
+
+ private void FrmFlagDetail_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ showParentForm();
+ }
+
+ private void FrmFlagDetail_Load(object sender, EventArgs e)
+ {
+ string objectIds = "";
+ string objectTypeCodes = "";
+ string sql = "select t.对象编号,t.对象类型 from 标识器 t where t.编号='" + markId + "'";
+ using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql))
+ {
+ while (reader.Read())
+ {
+ objectIds = reader.GetString(0);
+ objectTypeCodes = reader.GetString(1);
+ }
+ }
+
+ string[] codeTypes = objectTypeCodes.Split(',');
+ string[] codeIds = objectIds.Split(',');
+ int length = 0;
+ if (codeTypes.Length <= codeIds.Length)
+ {
+ length = codeTypes.Length;
+ }
+ else
+ {
+ length = codeIds.Length;
+ }
+ for (int n = 0; n < length; n++)
+ {
+ for (int i = 0; i < Utility.listPipelineType.Count; i++)
+ {
+ if (Utility.listPipelineType[i].code == codeTypes[n])
+ {
+ int index = this.dataGridViewX_markDetail.Rows.Add();
+ this.dataGridViewX_markDetail.Rows[index].Cells[0].Value = Utility.listPipelineType[i].type;
+ this.dataGridViewX_markDetail.Rows[index].Cells[1].Value = codeIds[n].ToString();
+ this.dataGridViewX_markDetail.Rows[index].Cells[2].Value = Utility.listPipelineType[i].name;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/FrmFlagDetail.resx b/FrmFlagDetail.resx
new file mode 100644
index 0000000..e98a8fe
--- /dev/null
+++ b/FrmFlagDetail.resx
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ True
+
+
+ True
+
+
+ True
+
+
\ No newline at end of file
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs
index dd63f62..5b05926 100644
--- a/FrmBSQStatis.cs
+++ b/FrmBSQStatis.cs
@@ -23,10 +23,8 @@
bsq = getBSQNameAndNumMap(polygon);
}
-
private void FrmBSQStatis_Load(object sender, EventArgs e)
{
-
try
{
chartStatis.Series.Add("标识器");
diff --git a/FrmFlagDatabase.Designer.cs b/FrmFlagDatabase.Designer.cs
new file mode 100644
index 0000000..cc7aca8
--- /dev/null
+++ b/FrmFlagDatabase.Designer.cs
@@ -0,0 +1,265 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDatabase
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.txt_ip = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_db = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_user = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.chk = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.txt_pwd = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(3, 3);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(50, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "服务器";
+ this.labelX1.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(3, 47);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 23);
+ this.labelX2.TabIndex = 1;
+ this.labelX2.Text = "数据库";
+ this.labelX2.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(3, 98);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 23);
+ this.labelX3.TabIndex = 2;
+ this.labelX3.Text = "账号";
+ this.labelX3.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(3, 148);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 23);
+ this.labelX4.TabIndex = 3;
+ this.labelX4.Text = "密码";
+ this.labelX4.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // txt_ip
+ //
+ //
+ //
+ //
+ this.txt_ip.Border.Class = "TextBoxBorder";
+ this.txt_ip.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_ip.Location = new System.Drawing.Point(69, 2);
+ this.txt_ip.Name = "txt_ip";
+ this.txt_ip.Size = new System.Drawing.Size(167, 21);
+ this.txt_ip.TabIndex = 4;
+ //
+ // txt_db
+ //
+ //
+ //
+ //
+ this.txt_db.Border.Class = "TextBoxBorder";
+ this.txt_db.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_db.Location = new System.Drawing.Point(69, 47);
+ this.txt_db.Name = "txt_db";
+ this.txt_db.Size = new System.Drawing.Size(167, 21);
+ this.txt_db.TabIndex = 4;
+ //
+ // txt_user
+ //
+ //
+ //
+ //
+ this.txt_user.Border.Class = "TextBoxBorder";
+ this.txt_user.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_user.Location = new System.Drawing.Point(69, 98);
+ this.txt_user.Name = "txt_user";
+ this.txt_user.Size = new System.Drawing.Size(167, 21);
+ this.txt_user.TabIndex = 4;
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(197, 249);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 5;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.txt_pwd);
+ this.groupPanel1.Controls.Add(this.chk);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.txt_user);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_db);
+ this.groupPanel1.Controls.Add(this.txt_ip);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 6);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(260, 229);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 6;
+ this.groupPanel1.Text = "数据库信息";
+ //
+ // chk
+ //
+ this.chk.AutoSize = true;
+ //
+ //
+ //
+ this.chk.BackgroundStyle.Class = "";
+ this.chk.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.chk.Location = new System.Drawing.Point(166, 180);
+ this.chk.Name = "chk";
+ this.chk.Size = new System.Drawing.Size(70, 16);
+ this.chk.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.chk.TabIndex = 5;
+ this.chk.Text = "记住配置";
+ //
+ // txt_pwd
+ //
+ //
+ //
+ //
+ this.txt_pwd.Border.Class = "TextBoxBorder";
+ this.txt_pwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_pwd.Location = new System.Drawing.Point(69, 149);
+ this.txt_pwd.Name = "txt_pwd";
+ this.txt_pwd.PasswordChar = '*';
+ this.txt_pwd.Size = new System.Drawing.Size(167, 21);
+ this.txt_pwd.TabIndex = 6;
+ //
+ // FrmFlagDatabase
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 284);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btn_ok);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagDatabase";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器数据库连接";
+ this.Load += new System.EventHandler(this.FrmFlagDatabase_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_ip;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_db;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_user;
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.CheckBoxX chk;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_pwd;
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDatabase.cs b/FrmFlagDatabase.cs
new file mode 100644
index 0000000..5a137c0
--- /dev/null
+++ b/FrmFlagDatabase.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.IO;
+using System.Xml;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDatabase : Office2007Form
+ {
+ public static string dbServer = "";
+ public static string database = "";
+ public static string userId = "";
+ public static string password = "";
+ public static GSODataSource ds = null;
+ private GSOGlobeControl ctl;
+
+ public FrmFlagDatabase(GSOGlobeControl _ctl)
+ {
+ InitializeComponent();
+ ctl = _ctl;
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ if (String.IsNullOrEmpty(txt_ip.Text.Trim()) || String.IsNullOrEmpty(txt_db.Text.Trim()) || String.IsNullOrEmpty(txt_user.Text.Trim()) || String.IsNullOrEmpty(txt_pwd.Text.Trim()))
+ {
+ MessageBox.Show("配置参数不能为空!", "提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+ try
+ {
+ ds = ctl.Globe.DataManager.OpenOracleDataSource(txt_ip.Text.Trim() + "/" + txt_db.Text.Trim(), "", "", txt_user.Text.Trim(), txt_pwd.Text.Trim());
+ if (ds == null)
+ {
+ MessageBox.Show("数据库连接失败!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ else
+ {
+ dbServer = txt_ip.Text.Trim();
+ database = txt_db.Text.Trim();
+ userId = txt_user.Text.Trim();
+ password = txt_pwd.Text.Trim();
+ WriteXML();
+ }
+ this.DialogResult = DialogResult.OK;
+ MessageBox.Show("已成功连接数据库!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("数据库连接失败:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
+
+ private void FrmFlagDatabase_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ ReadXML();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("窗体加载失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void ReadXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ if (!File.Exists(strFileName))
+ {
+ return;
+ }
+
+ //初始化XML文档操作类
+ XmlDocument myDoc = new XmlDocument();
+ //加载XML文件
+ myDoc.Load(strFileName);
+ //搜索指定的节点
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ XmlNodeList nodes = null;
+ if (serverRootNode != null)
+ {
+ nodes = myDoc.SelectSingleNode("CyberPipe").ChildNodes;
+ if (nodes != null)
+ {
+ bool bRecorded = false;
+ XmlNode bRecordNode = serverRootNode.SelectSingleNode("IsRecordedSql");
+ if (bRecordNode != null)
+ {
+ bool.TryParse(bRecordNode.InnerText, out bRecorded);
+ chk.Checked = bRecorded;
+ }
+ if (bRecorded)
+ {
+ foreach (System.Xml.XmlNode xn in nodes)
+ {
+ if (xn.Name == "serverIP")
+ {
+ txt_ip.Text = xn.InnerText;
+ }
+ else if (xn.Name == "pipedb")
+ {
+ txt_db.Text = xn.InnerText;
+ }
+ else if (xn.Name == "userName")
+ {
+ txt_user.Text = xn.InnerText;
+ }
+ else if (xn.Name == "password")
+ {
+ txt_pwd.Text = xn.InnerText;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void WriteXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ File.WriteAllText(strFileName, " ");
+ XmlDocument myDoc = new XmlDocument();
+
+ //加载XML文件
+ // XmlElement serverRootNode = null;
+ try
+ {
+ myDoc.Load(strFileName);
+
+ }
+ catch (Exception e)
+ {
+ File.Delete(strFileName);
+ File.WriteAllText(strFileName, " ");
+ throw e;
+ }
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ if (serverRootNode == null)
+ {
+ serverRootNode = myDoc.CreateElement("CyberPipe");
+ }
+ XmlElement ele0 = myDoc.CreateElement("IsRecordedSql");
+ ele0.InnerText = chk.Checked.ToString();
+ serverRootNode.AppendChild(ele0);
+
+ XmlElement ele1 = myDoc.CreateElement("serverIP");
+ ele1.InnerText = dbServer;
+ serverRootNode.AppendChild(ele1);
+
+ XmlElement ele2 = myDoc.CreateElement("pipedb");
+ ele2.InnerText = database;
+ serverRootNode.AppendChild(ele2);
+
+ XmlElement ele3 = myDoc.CreateElement("userName");
+ ele3.InnerText = userId;
+ serverRootNode.AppendChild(ele3);
+
+ XmlElement ele4 = myDoc.CreateElement("password");
+ ele4.InnerText = password;
+ serverRootNode.AppendChild(ele4);
+ try
+ {
+ myDoc.Save(strFileName);
+ }
+ catch (Exception exp)
+ {
+ throw exp;
+ }
+ }
+ }
+}
diff --git a/FrmFlagDatabase.resx b/FrmFlagDatabase.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmFlagDatabase.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmFlagDetail.Designer.cs b/FrmFlagDetail.Designer.cs
new file mode 100644
index 0000000..982bfc6
--- /dev/null
+++ b/FrmFlagDetail.Designer.cs
@@ -0,0 +1,103 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDetail
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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 dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ this.dataGridViewX_markDetail = new DevComponents.DotNetBar.Controls.DataGridViewX();
+ this.对象类型 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象编号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).BeginInit();
+ this.SuspendLayout();
+ //
+ // dataGridViewX_markDetail
+ //
+ this.dataGridViewX_markDetail.AllowUserToAddRows = false;
+ this.dataGridViewX_markDetail.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+ this.dataGridViewX_markDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridViewX_markDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.对象类型,
+ this.对象编号,
+ this.对象名称});
+ dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
+ dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dataGridViewX_markDetail.DefaultCellStyle = dataGridViewCellStyle3;
+ this.dataGridViewX_markDetail.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridViewX_markDetail.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
+ this.dataGridViewX_markDetail.Location = new System.Drawing.Point(0, 0);
+ this.dataGridViewX_markDetail.Name = "dataGridViewX_markDetail";
+ this.dataGridViewX_markDetail.RowTemplate.Height = 23;
+ this.dataGridViewX_markDetail.Size = new System.Drawing.Size(508, 321);
+ this.dataGridViewX_markDetail.TabIndex = 0;
+ //
+ // 对象类型
+ //
+ this.对象类型.HeaderText = "对象类型";
+ this.对象类型.Name = "对象类型";
+ //
+ // 对象编号
+ //
+ this.对象编号.HeaderText = "对象编号";
+ this.对象编号.Name = "对象编号";
+ //
+ // 对象名称
+ //
+ this.对象名称.HeaderText = "对象名称";
+ this.对象名称.Name = "对象名称";
+ //
+ // FrmFlagDetail
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(508, 321);
+ this.Controls.Add(this.dataGridViewX_markDetail);
+ this.Name = "FrmFlagDetail";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识对象信息";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmFlagDetail_FormClosing);
+ this.Load += new System.EventHandler(this.FrmFlagDetail_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_markDetail;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象类型;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象编号;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象名称;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDetail.cs b/FrmFlagDetail.cs
new file mode 100644
index 0000000..d72eee9
--- /dev/null
+++ b/FrmFlagDetail.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using GeoScene.Globe;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDetail : Form
+ {
+ DataTable dt = new DataTable();
+ private GSOGlobeControl globeControl1;
+
+ public delegate void Handle();
+ public event Handle showParentForm;
+ String markId;
+
+ public FrmFlagDetail(GSOGlobeControl globeControl1, String id)
+ {
+ InitializeComponent();
+ this.markId = id;
+ }
+
+ private void FrmFlagDetail_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ showParentForm();
+ }
+
+ private void FrmFlagDetail_Load(object sender, EventArgs e)
+ {
+ string objectIds = "";
+ string objectTypeCodes = "";
+ string sql = "select t.对象编号,t.对象类型 from 标识器 t where t.编号='" + markId + "'";
+ using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql))
+ {
+ while (reader.Read())
+ {
+ objectIds = reader.GetString(0);
+ objectTypeCodes = reader.GetString(1);
+ }
+ }
+
+ string[] codeTypes = objectTypeCodes.Split(',');
+ string[] codeIds = objectIds.Split(',');
+ int length = 0;
+ if (codeTypes.Length <= codeIds.Length)
+ {
+ length = codeTypes.Length;
+ }
+ else
+ {
+ length = codeIds.Length;
+ }
+ for (int n = 0; n < length; n++)
+ {
+ for (int i = 0; i < Utility.listPipelineType.Count; i++)
+ {
+ if (Utility.listPipelineType[i].code == codeTypes[n])
+ {
+ int index = this.dataGridViewX_markDetail.Rows.Add();
+ this.dataGridViewX_markDetail.Rows[index].Cells[0].Value = Utility.listPipelineType[i].type;
+ this.dataGridViewX_markDetail.Rows[index].Cells[1].Value = codeIds[n].ToString();
+ this.dataGridViewX_markDetail.Rows[index].Cells[2].Value = Utility.listPipelineType[i].name;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/FrmFlagDetail.resx b/FrmFlagDetail.resx
new file mode 100644
index 0000000..e98a8fe
--- /dev/null
+++ b/FrmFlagDetail.resx
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ True
+
+
+ True
+
+
+ True
+
+
\ No newline at end of file
diff --git a/FrmFlagEdits.Designer.cs b/FrmFlagEdits.Designer.cs
new file mode 100644
index 0000000..205dd3b
--- /dev/null
+++ b/FrmFlagEdits.Designer.cs
@@ -0,0 +1,564 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagEdits
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.txt_flag_no = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_flag_type = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_flag_id = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_deep = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX11 = new DevComponents.DotNetBar.LabelX();
+ this.txt_street = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxbz = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX15 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxjlzrr = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX14 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsgjl = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX13 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsgzrr = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX12 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsgdw = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX10 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsjrxm = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX8 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsjdw = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX7 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxqsdw = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxXgc = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(602, 307);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 4;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(18, 22);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(75, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "标识器ID";
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(251, 23);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(75, 23);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "编号";
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(474, 23);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(75, 23);
+ this.labelX3.TabIndex = 0;
+ this.labelX3.Text = "型号";
+ //
+ // txt_flag_no
+ //
+ //
+ //
+ //
+ this.txt_flag_no.Border.Class = "TextBoxBorder";
+ this.txt_flag_no.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_flag_no.Location = new System.Drawing.Point(326, 22);
+ this.txt_flag_no.Name = "txt_flag_no";
+ this.txt_flag_no.ReadOnly = true;
+ this.txt_flag_no.Size = new System.Drawing.Size(128, 21);
+ this.txt_flag_no.TabIndex = 1;
+ //
+ // labelX6
+ //
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(251, 72);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(75, 23);
+ this.labelX6.TabIndex = 0;
+ this.labelX6.Text = "埋深(米)*";
+ //
+ // txt_flag_type
+ //
+ //
+ //
+ //
+ this.txt_flag_type.Border.Class = "TextBoxBorder";
+ this.txt_flag_type.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_flag_type.Location = new System.Drawing.Point(547, 22);
+ this.txt_flag_type.Name = "txt_flag_type";
+ this.txt_flag_type.Size = new System.Drawing.Size(128, 21);
+ this.txt_flag_type.TabIndex = 1;
+ //
+ // txt_flag_id
+ //
+ //
+ //
+ //
+ this.txt_flag_id.Border.Class = "TextBoxBorder";
+ this.txt_flag_id.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_flag_id.Location = new System.Drawing.Point(103, 22);
+ this.txt_flag_id.Name = "txt_flag_id";
+ this.txt_flag_id.ReadOnly = true;
+ this.txt_flag_id.Size = new System.Drawing.Size(128, 21);
+ this.txt_flag_id.TabIndex = 1;
+ //
+ // txt_deep
+ //
+ //
+ //
+ //
+ this.txt_deep.Border.Class = "TextBoxBorder";
+ this.txt_deep.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_deep.Location = new System.Drawing.Point(326, 71);
+ this.txt_deep.Name = "txt_deep";
+ this.txt_deep.Size = new System.Drawing.Size(128, 21);
+ this.txt_deep.TabIndex = 1;
+ //
+ // labelX11
+ //
+ this.labelX11.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX11.BackgroundStyle.Class = "";
+ this.labelX11.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX11.Location = new System.Drawing.Point(467, 71);
+ this.labelX11.Name = "labelX11";
+ this.labelX11.Size = new System.Drawing.Size(75, 23);
+ this.labelX11.TabIndex = 5;
+ this.labelX11.Text = "所属道路";
+ //
+ // txt_street
+ //
+ //
+ //
+ //
+ this.txt_street.Border.Class = "TextBoxBorder";
+ this.txt_street.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_street.Location = new System.Drawing.Point(547, 69);
+ this.txt_street.Name = "txt_street";
+ this.txt_street.Size = new System.Drawing.Size(128, 21);
+ this.txt_street.TabIndex = 12;
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.textBoxbz);
+ this.groupPanel1.Controls.Add(this.labelX15);
+ this.groupPanel1.Controls.Add(this.textBoxjlzrr);
+ this.groupPanel1.Controls.Add(this.labelX14);
+ this.groupPanel1.Controls.Add(this.textBoxsgjl);
+ this.groupPanel1.Controls.Add(this.labelX13);
+ this.groupPanel1.Controls.Add(this.textBoxsgzrr);
+ this.groupPanel1.Controls.Add(this.labelX12);
+ this.groupPanel1.Controls.Add(this.textBoxsgdw);
+ this.groupPanel1.Controls.Add(this.labelX10);
+ this.groupPanel1.Controls.Add(this.textBoxsjrxm);
+ this.groupPanel1.Controls.Add(this.labelX8);
+ this.groupPanel1.Controls.Add(this.textBoxsjdw);
+ this.groupPanel1.Controls.Add(this.labelX7);
+ this.groupPanel1.Controls.Add(this.textBoxqsdw);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.textBoxXgc);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_street);
+ this.groupPanel1.Controls.Add(this.labelX11);
+ this.groupPanel1.Controls.Add(this.txt_deep);
+ this.groupPanel1.Controls.Add(this.txt_flag_id);
+ this.groupPanel1.Controls.Add(this.txt_flag_type);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.txt_flag_no);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupPanel1.Location = new System.Drawing.Point(0, 0);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(733, 290);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 2;
+ this.groupPanel1.Text = "标识器属性信息";
+ //
+ // textBoxbz
+ //
+ //
+ //
+ //
+ this.textBoxbz.Border.Class = "TextBoxBorder";
+ this.textBoxbz.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxbz.Location = new System.Drawing.Point(326, 216);
+ this.textBoxbz.Name = "textBoxbz";
+ this.textBoxbz.Size = new System.Drawing.Size(128, 21);
+ this.textBoxbz.TabIndex = 32;
+ //
+ // labelX15
+ //
+ this.labelX15.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX15.BackgroundStyle.Class = "";
+ this.labelX15.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX15.Location = new System.Drawing.Point(245, 216);
+ this.labelX15.Name = "labelX15";
+ this.labelX15.Size = new System.Drawing.Size(75, 23);
+ this.labelX15.TabIndex = 31;
+ this.labelX15.Text = "备注";
+ //
+ // textBoxjlzrr
+ //
+ //
+ //
+ //
+ this.textBoxjlzrr.Border.Class = "TextBoxBorder";
+ this.textBoxjlzrr.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxjlzrr.Location = new System.Drawing.Point(102, 216);
+ this.textBoxjlzrr.Name = "textBoxjlzrr";
+ this.textBoxjlzrr.Size = new System.Drawing.Size(128, 21);
+ this.textBoxjlzrr.TabIndex = 30;
+ //
+ // labelX14
+ //
+ this.labelX14.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX14.BackgroundStyle.Class = "";
+ this.labelX14.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX14.Location = new System.Drawing.Point(18, 216);
+ this.labelX14.Name = "labelX14";
+ this.labelX14.Size = new System.Drawing.Size(75, 23);
+ this.labelX14.TabIndex = 29;
+ this.labelX14.Text = "监理责任人";
+ //
+ // textBoxsgjl
+ //
+ //
+ //
+ //
+ this.textBoxsgjl.Border.Class = "TextBoxBorder";
+ this.textBoxsgjl.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsgjl.Location = new System.Drawing.Point(547, 167);
+ this.textBoxsgjl.Name = "textBoxsgjl";
+ this.textBoxsgjl.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsgjl.TabIndex = 28;
+ //
+ // labelX13
+ //
+ this.labelX13.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX13.BackgroundStyle.Class = "";
+ this.labelX13.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX13.Location = new System.Drawing.Point(466, 167);
+ this.labelX13.Name = "labelX13";
+ this.labelX13.Size = new System.Drawing.Size(75, 23);
+ this.labelX13.TabIndex = 27;
+ this.labelX13.Text = "施工监理";
+ //
+ // textBoxsgzrr
+ //
+ //
+ //
+ //
+ this.textBoxsgzrr.Border.Class = "TextBoxBorder";
+ this.textBoxsgzrr.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsgzrr.Location = new System.Drawing.Point(326, 167);
+ this.textBoxsgzrr.Name = "textBoxsgzrr";
+ this.textBoxsgzrr.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsgzrr.TabIndex = 26;
+ //
+ // labelX12
+ //
+ this.labelX12.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX12.BackgroundStyle.Class = "";
+ this.labelX12.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX12.Location = new System.Drawing.Point(245, 167);
+ this.labelX12.Name = "labelX12";
+ this.labelX12.Size = new System.Drawing.Size(75, 23);
+ this.labelX12.TabIndex = 25;
+ this.labelX12.Text = "施工责任人";
+ //
+ // textBoxsgdw
+ //
+ //
+ //
+ //
+ this.textBoxsgdw.Border.Class = "TextBoxBorder";
+ this.textBoxsgdw.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsgdw.Location = new System.Drawing.Point(103, 167);
+ this.textBoxsgdw.Name = "textBoxsgdw";
+ this.textBoxsgdw.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsgdw.TabIndex = 24;
+ //
+ // labelX10
+ //
+ this.labelX10.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX10.BackgroundStyle.Class = "";
+ this.labelX10.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX10.Location = new System.Drawing.Point(18, 167);
+ this.labelX10.Name = "labelX10";
+ this.labelX10.Size = new System.Drawing.Size(75, 23);
+ this.labelX10.TabIndex = 23;
+ this.labelX10.Text = "施工单位";
+ //
+ // textBoxsjrxm
+ //
+ //
+ //
+ //
+ this.textBoxsjrxm.Border.Class = "TextBoxBorder";
+ this.textBoxsjrxm.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsjrxm.Location = new System.Drawing.Point(547, 120);
+ this.textBoxsjrxm.Name = "textBoxsjrxm";
+ this.textBoxsjrxm.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsjrxm.TabIndex = 20;
+ //
+ // labelX8
+ //
+ this.labelX8.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX8.BackgroundStyle.Class = "";
+ this.labelX8.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX8.Location = new System.Drawing.Point(466, 120);
+ this.labelX8.Name = "labelX8";
+ this.labelX8.Size = new System.Drawing.Size(75, 23);
+ this.labelX8.TabIndex = 19;
+ this.labelX8.Text = "设计人姓名";
+ //
+ // textBoxsjdw
+ //
+ //
+ //
+ //
+ this.textBoxsjdw.Border.Class = "TextBoxBorder";
+ this.textBoxsjdw.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsjdw.Location = new System.Drawing.Point(326, 120);
+ this.textBoxsjdw.Name = "textBoxsjdw";
+ this.textBoxsjdw.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsjdw.TabIndex = 18;
+ //
+ // labelX7
+ //
+ this.labelX7.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX7.BackgroundStyle.Class = "";
+ this.labelX7.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX7.Location = new System.Drawing.Point(251, 120);
+ this.labelX7.Name = "labelX7";
+ this.labelX7.Size = new System.Drawing.Size(75, 23);
+ this.labelX7.TabIndex = 17;
+ this.labelX7.Text = "设计单位";
+ //
+ // textBoxqsdw
+ //
+ //
+ //
+ //
+ this.textBoxqsdw.Border.Class = "TextBoxBorder";
+ this.textBoxqsdw.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxqsdw.Location = new System.Drawing.Point(103, 120);
+ this.textBoxqsdw.Name = "textBoxqsdw";
+ this.textBoxqsdw.Size = new System.Drawing.Size(128, 21);
+ this.textBoxqsdw.TabIndex = 16;
+ //
+ // labelX5
+ //
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(18, 120);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(75, 23);
+ this.labelX5.TabIndex = 15;
+ this.labelX5.Text = "权属单位";
+ //
+ // textBoxXgc
+ //
+ //
+ //
+ //
+ this.textBoxXgc.Border.Class = "TextBoxBorder";
+ this.textBoxXgc.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXgc.Location = new System.Drawing.Point(102, 72);
+ this.textBoxXgc.Name = "textBoxXgc";
+ this.textBoxXgc.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXgc.TabIndex = 14;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(9, 72);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(87, 23);
+ this.labelX4.TabIndex = 13;
+ this.labelX4.Text = "地面高程(米)";
+ //
+ // FrmFlagEdits
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(733, 356);
+ this.Controls.Add(this.btn_ok);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagEdits";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器属性编辑";
+ this.groupPanel1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_flag_no;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_flag_type;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_flag_id;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_deep;
+ private DevComponents.DotNetBar.LabelX labelX11;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_street;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXgc;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsjdw;
+ private DevComponents.DotNetBar.LabelX labelX7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxqsdw;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsgzrr;
+ private DevComponents.DotNetBar.LabelX labelX12;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsgdw;
+ private DevComponents.DotNetBar.LabelX labelX10;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsjrxm;
+ private DevComponents.DotNetBar.LabelX labelX8;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxbz;
+ private DevComponents.DotNetBar.LabelX labelX15;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxjlzrr;
+ private DevComponents.DotNetBar.LabelX labelX14;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsgjl;
+ private DevComponents.DotNetBar.LabelX labelX13;
+
+ }
+}
\ No newline at end of file
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs
index dd63f62..5b05926 100644
--- a/FrmBSQStatis.cs
+++ b/FrmBSQStatis.cs
@@ -23,10 +23,8 @@
bsq = getBSQNameAndNumMap(polygon);
}
-
private void FrmBSQStatis_Load(object sender, EventArgs e)
{
-
try
{
chartStatis.Series.Add("标识器");
diff --git a/FrmFlagDatabase.Designer.cs b/FrmFlagDatabase.Designer.cs
new file mode 100644
index 0000000..cc7aca8
--- /dev/null
+++ b/FrmFlagDatabase.Designer.cs
@@ -0,0 +1,265 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDatabase
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.txt_ip = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_db = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_user = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.chk = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.txt_pwd = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(3, 3);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(50, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "服务器";
+ this.labelX1.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(3, 47);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 23);
+ this.labelX2.TabIndex = 1;
+ this.labelX2.Text = "数据库";
+ this.labelX2.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(3, 98);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 23);
+ this.labelX3.TabIndex = 2;
+ this.labelX3.Text = "账号";
+ this.labelX3.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(3, 148);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 23);
+ this.labelX4.TabIndex = 3;
+ this.labelX4.Text = "密码";
+ this.labelX4.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // txt_ip
+ //
+ //
+ //
+ //
+ this.txt_ip.Border.Class = "TextBoxBorder";
+ this.txt_ip.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_ip.Location = new System.Drawing.Point(69, 2);
+ this.txt_ip.Name = "txt_ip";
+ this.txt_ip.Size = new System.Drawing.Size(167, 21);
+ this.txt_ip.TabIndex = 4;
+ //
+ // txt_db
+ //
+ //
+ //
+ //
+ this.txt_db.Border.Class = "TextBoxBorder";
+ this.txt_db.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_db.Location = new System.Drawing.Point(69, 47);
+ this.txt_db.Name = "txt_db";
+ this.txt_db.Size = new System.Drawing.Size(167, 21);
+ this.txt_db.TabIndex = 4;
+ //
+ // txt_user
+ //
+ //
+ //
+ //
+ this.txt_user.Border.Class = "TextBoxBorder";
+ this.txt_user.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_user.Location = new System.Drawing.Point(69, 98);
+ this.txt_user.Name = "txt_user";
+ this.txt_user.Size = new System.Drawing.Size(167, 21);
+ this.txt_user.TabIndex = 4;
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(197, 249);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 5;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.txt_pwd);
+ this.groupPanel1.Controls.Add(this.chk);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.txt_user);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_db);
+ this.groupPanel1.Controls.Add(this.txt_ip);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 6);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(260, 229);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 6;
+ this.groupPanel1.Text = "数据库信息";
+ //
+ // chk
+ //
+ this.chk.AutoSize = true;
+ //
+ //
+ //
+ this.chk.BackgroundStyle.Class = "";
+ this.chk.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.chk.Location = new System.Drawing.Point(166, 180);
+ this.chk.Name = "chk";
+ this.chk.Size = new System.Drawing.Size(70, 16);
+ this.chk.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.chk.TabIndex = 5;
+ this.chk.Text = "记住配置";
+ //
+ // txt_pwd
+ //
+ //
+ //
+ //
+ this.txt_pwd.Border.Class = "TextBoxBorder";
+ this.txt_pwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_pwd.Location = new System.Drawing.Point(69, 149);
+ this.txt_pwd.Name = "txt_pwd";
+ this.txt_pwd.PasswordChar = '*';
+ this.txt_pwd.Size = new System.Drawing.Size(167, 21);
+ this.txt_pwd.TabIndex = 6;
+ //
+ // FrmFlagDatabase
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 284);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btn_ok);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagDatabase";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器数据库连接";
+ this.Load += new System.EventHandler(this.FrmFlagDatabase_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_ip;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_db;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_user;
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.CheckBoxX chk;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_pwd;
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDatabase.cs b/FrmFlagDatabase.cs
new file mode 100644
index 0000000..5a137c0
--- /dev/null
+++ b/FrmFlagDatabase.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.IO;
+using System.Xml;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDatabase : Office2007Form
+ {
+ public static string dbServer = "";
+ public static string database = "";
+ public static string userId = "";
+ public static string password = "";
+ public static GSODataSource ds = null;
+ private GSOGlobeControl ctl;
+
+ public FrmFlagDatabase(GSOGlobeControl _ctl)
+ {
+ InitializeComponent();
+ ctl = _ctl;
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ if (String.IsNullOrEmpty(txt_ip.Text.Trim()) || String.IsNullOrEmpty(txt_db.Text.Trim()) || String.IsNullOrEmpty(txt_user.Text.Trim()) || String.IsNullOrEmpty(txt_pwd.Text.Trim()))
+ {
+ MessageBox.Show("配置参数不能为空!", "提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+ try
+ {
+ ds = ctl.Globe.DataManager.OpenOracleDataSource(txt_ip.Text.Trim() + "/" + txt_db.Text.Trim(), "", "", txt_user.Text.Trim(), txt_pwd.Text.Trim());
+ if (ds == null)
+ {
+ MessageBox.Show("数据库连接失败!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ else
+ {
+ dbServer = txt_ip.Text.Trim();
+ database = txt_db.Text.Trim();
+ userId = txt_user.Text.Trim();
+ password = txt_pwd.Text.Trim();
+ WriteXML();
+ }
+ this.DialogResult = DialogResult.OK;
+ MessageBox.Show("已成功连接数据库!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("数据库连接失败:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
+
+ private void FrmFlagDatabase_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ ReadXML();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("窗体加载失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void ReadXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ if (!File.Exists(strFileName))
+ {
+ return;
+ }
+
+ //初始化XML文档操作类
+ XmlDocument myDoc = new XmlDocument();
+ //加载XML文件
+ myDoc.Load(strFileName);
+ //搜索指定的节点
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ XmlNodeList nodes = null;
+ if (serverRootNode != null)
+ {
+ nodes = myDoc.SelectSingleNode("CyberPipe").ChildNodes;
+ if (nodes != null)
+ {
+ bool bRecorded = false;
+ XmlNode bRecordNode = serverRootNode.SelectSingleNode("IsRecordedSql");
+ if (bRecordNode != null)
+ {
+ bool.TryParse(bRecordNode.InnerText, out bRecorded);
+ chk.Checked = bRecorded;
+ }
+ if (bRecorded)
+ {
+ foreach (System.Xml.XmlNode xn in nodes)
+ {
+ if (xn.Name == "serverIP")
+ {
+ txt_ip.Text = xn.InnerText;
+ }
+ else if (xn.Name == "pipedb")
+ {
+ txt_db.Text = xn.InnerText;
+ }
+ else if (xn.Name == "userName")
+ {
+ txt_user.Text = xn.InnerText;
+ }
+ else if (xn.Name == "password")
+ {
+ txt_pwd.Text = xn.InnerText;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void WriteXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ File.WriteAllText(strFileName, " ");
+ XmlDocument myDoc = new XmlDocument();
+
+ //加载XML文件
+ // XmlElement serverRootNode = null;
+ try
+ {
+ myDoc.Load(strFileName);
+
+ }
+ catch (Exception e)
+ {
+ File.Delete(strFileName);
+ File.WriteAllText(strFileName, " ");
+ throw e;
+ }
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ if (serverRootNode == null)
+ {
+ serverRootNode = myDoc.CreateElement("CyberPipe");
+ }
+ XmlElement ele0 = myDoc.CreateElement("IsRecordedSql");
+ ele0.InnerText = chk.Checked.ToString();
+ serverRootNode.AppendChild(ele0);
+
+ XmlElement ele1 = myDoc.CreateElement("serverIP");
+ ele1.InnerText = dbServer;
+ serverRootNode.AppendChild(ele1);
+
+ XmlElement ele2 = myDoc.CreateElement("pipedb");
+ ele2.InnerText = database;
+ serverRootNode.AppendChild(ele2);
+
+ XmlElement ele3 = myDoc.CreateElement("userName");
+ ele3.InnerText = userId;
+ serverRootNode.AppendChild(ele3);
+
+ XmlElement ele4 = myDoc.CreateElement("password");
+ ele4.InnerText = password;
+ serverRootNode.AppendChild(ele4);
+ try
+ {
+ myDoc.Save(strFileName);
+ }
+ catch (Exception exp)
+ {
+ throw exp;
+ }
+ }
+ }
+}
diff --git a/FrmFlagDatabase.resx b/FrmFlagDatabase.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmFlagDatabase.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmFlagDetail.Designer.cs b/FrmFlagDetail.Designer.cs
new file mode 100644
index 0000000..982bfc6
--- /dev/null
+++ b/FrmFlagDetail.Designer.cs
@@ -0,0 +1,103 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDetail
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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 dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ this.dataGridViewX_markDetail = new DevComponents.DotNetBar.Controls.DataGridViewX();
+ this.对象类型 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象编号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).BeginInit();
+ this.SuspendLayout();
+ //
+ // dataGridViewX_markDetail
+ //
+ this.dataGridViewX_markDetail.AllowUserToAddRows = false;
+ this.dataGridViewX_markDetail.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+ this.dataGridViewX_markDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridViewX_markDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.对象类型,
+ this.对象编号,
+ this.对象名称});
+ dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
+ dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dataGridViewX_markDetail.DefaultCellStyle = dataGridViewCellStyle3;
+ this.dataGridViewX_markDetail.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridViewX_markDetail.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
+ this.dataGridViewX_markDetail.Location = new System.Drawing.Point(0, 0);
+ this.dataGridViewX_markDetail.Name = "dataGridViewX_markDetail";
+ this.dataGridViewX_markDetail.RowTemplate.Height = 23;
+ this.dataGridViewX_markDetail.Size = new System.Drawing.Size(508, 321);
+ this.dataGridViewX_markDetail.TabIndex = 0;
+ //
+ // 对象类型
+ //
+ this.对象类型.HeaderText = "对象类型";
+ this.对象类型.Name = "对象类型";
+ //
+ // 对象编号
+ //
+ this.对象编号.HeaderText = "对象编号";
+ this.对象编号.Name = "对象编号";
+ //
+ // 对象名称
+ //
+ this.对象名称.HeaderText = "对象名称";
+ this.对象名称.Name = "对象名称";
+ //
+ // FrmFlagDetail
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(508, 321);
+ this.Controls.Add(this.dataGridViewX_markDetail);
+ this.Name = "FrmFlagDetail";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识对象信息";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmFlagDetail_FormClosing);
+ this.Load += new System.EventHandler(this.FrmFlagDetail_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_markDetail;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象类型;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象编号;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象名称;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDetail.cs b/FrmFlagDetail.cs
new file mode 100644
index 0000000..d72eee9
--- /dev/null
+++ b/FrmFlagDetail.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using GeoScene.Globe;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDetail : Form
+ {
+ DataTable dt = new DataTable();
+ private GSOGlobeControl globeControl1;
+
+ public delegate void Handle();
+ public event Handle showParentForm;
+ String markId;
+
+ public FrmFlagDetail(GSOGlobeControl globeControl1, String id)
+ {
+ InitializeComponent();
+ this.markId = id;
+ }
+
+ private void FrmFlagDetail_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ showParentForm();
+ }
+
+ private void FrmFlagDetail_Load(object sender, EventArgs e)
+ {
+ string objectIds = "";
+ string objectTypeCodes = "";
+ string sql = "select t.对象编号,t.对象类型 from 标识器 t where t.编号='" + markId + "'";
+ using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql))
+ {
+ while (reader.Read())
+ {
+ objectIds = reader.GetString(0);
+ objectTypeCodes = reader.GetString(1);
+ }
+ }
+
+ string[] codeTypes = objectTypeCodes.Split(',');
+ string[] codeIds = objectIds.Split(',');
+ int length = 0;
+ if (codeTypes.Length <= codeIds.Length)
+ {
+ length = codeTypes.Length;
+ }
+ else
+ {
+ length = codeIds.Length;
+ }
+ for (int n = 0; n < length; n++)
+ {
+ for (int i = 0; i < Utility.listPipelineType.Count; i++)
+ {
+ if (Utility.listPipelineType[i].code == codeTypes[n])
+ {
+ int index = this.dataGridViewX_markDetail.Rows.Add();
+ this.dataGridViewX_markDetail.Rows[index].Cells[0].Value = Utility.listPipelineType[i].type;
+ this.dataGridViewX_markDetail.Rows[index].Cells[1].Value = codeIds[n].ToString();
+ this.dataGridViewX_markDetail.Rows[index].Cells[2].Value = Utility.listPipelineType[i].name;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/FrmFlagDetail.resx b/FrmFlagDetail.resx
new file mode 100644
index 0000000..e98a8fe
--- /dev/null
+++ b/FrmFlagDetail.resx
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ True
+
+
+ True
+
+
+ True
+
+
\ No newline at end of file
diff --git a/FrmFlagEdits.Designer.cs b/FrmFlagEdits.Designer.cs
new file mode 100644
index 0000000..205dd3b
--- /dev/null
+++ b/FrmFlagEdits.Designer.cs
@@ -0,0 +1,564 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagEdits
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.txt_flag_no = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_flag_type = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_flag_id = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_deep = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX11 = new DevComponents.DotNetBar.LabelX();
+ this.txt_street = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxbz = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX15 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxjlzrr = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX14 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsgjl = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX13 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsgzrr = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX12 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsgdw = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX10 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsjrxm = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX8 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsjdw = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX7 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxqsdw = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxXgc = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(602, 307);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 4;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(18, 22);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(75, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "标识器ID";
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(251, 23);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(75, 23);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "编号";
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(474, 23);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(75, 23);
+ this.labelX3.TabIndex = 0;
+ this.labelX3.Text = "型号";
+ //
+ // txt_flag_no
+ //
+ //
+ //
+ //
+ this.txt_flag_no.Border.Class = "TextBoxBorder";
+ this.txt_flag_no.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_flag_no.Location = new System.Drawing.Point(326, 22);
+ this.txt_flag_no.Name = "txt_flag_no";
+ this.txt_flag_no.ReadOnly = true;
+ this.txt_flag_no.Size = new System.Drawing.Size(128, 21);
+ this.txt_flag_no.TabIndex = 1;
+ //
+ // labelX6
+ //
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(251, 72);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(75, 23);
+ this.labelX6.TabIndex = 0;
+ this.labelX6.Text = "埋深(米)*";
+ //
+ // txt_flag_type
+ //
+ //
+ //
+ //
+ this.txt_flag_type.Border.Class = "TextBoxBorder";
+ this.txt_flag_type.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_flag_type.Location = new System.Drawing.Point(547, 22);
+ this.txt_flag_type.Name = "txt_flag_type";
+ this.txt_flag_type.Size = new System.Drawing.Size(128, 21);
+ this.txt_flag_type.TabIndex = 1;
+ //
+ // txt_flag_id
+ //
+ //
+ //
+ //
+ this.txt_flag_id.Border.Class = "TextBoxBorder";
+ this.txt_flag_id.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_flag_id.Location = new System.Drawing.Point(103, 22);
+ this.txt_flag_id.Name = "txt_flag_id";
+ this.txt_flag_id.ReadOnly = true;
+ this.txt_flag_id.Size = new System.Drawing.Size(128, 21);
+ this.txt_flag_id.TabIndex = 1;
+ //
+ // txt_deep
+ //
+ //
+ //
+ //
+ this.txt_deep.Border.Class = "TextBoxBorder";
+ this.txt_deep.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_deep.Location = new System.Drawing.Point(326, 71);
+ this.txt_deep.Name = "txt_deep";
+ this.txt_deep.Size = new System.Drawing.Size(128, 21);
+ this.txt_deep.TabIndex = 1;
+ //
+ // labelX11
+ //
+ this.labelX11.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX11.BackgroundStyle.Class = "";
+ this.labelX11.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX11.Location = new System.Drawing.Point(467, 71);
+ this.labelX11.Name = "labelX11";
+ this.labelX11.Size = new System.Drawing.Size(75, 23);
+ this.labelX11.TabIndex = 5;
+ this.labelX11.Text = "所属道路";
+ //
+ // txt_street
+ //
+ //
+ //
+ //
+ this.txt_street.Border.Class = "TextBoxBorder";
+ this.txt_street.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_street.Location = new System.Drawing.Point(547, 69);
+ this.txt_street.Name = "txt_street";
+ this.txt_street.Size = new System.Drawing.Size(128, 21);
+ this.txt_street.TabIndex = 12;
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.textBoxbz);
+ this.groupPanel1.Controls.Add(this.labelX15);
+ this.groupPanel1.Controls.Add(this.textBoxjlzrr);
+ this.groupPanel1.Controls.Add(this.labelX14);
+ this.groupPanel1.Controls.Add(this.textBoxsgjl);
+ this.groupPanel1.Controls.Add(this.labelX13);
+ this.groupPanel1.Controls.Add(this.textBoxsgzrr);
+ this.groupPanel1.Controls.Add(this.labelX12);
+ this.groupPanel1.Controls.Add(this.textBoxsgdw);
+ this.groupPanel1.Controls.Add(this.labelX10);
+ this.groupPanel1.Controls.Add(this.textBoxsjrxm);
+ this.groupPanel1.Controls.Add(this.labelX8);
+ this.groupPanel1.Controls.Add(this.textBoxsjdw);
+ this.groupPanel1.Controls.Add(this.labelX7);
+ this.groupPanel1.Controls.Add(this.textBoxqsdw);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.textBoxXgc);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_street);
+ this.groupPanel1.Controls.Add(this.labelX11);
+ this.groupPanel1.Controls.Add(this.txt_deep);
+ this.groupPanel1.Controls.Add(this.txt_flag_id);
+ this.groupPanel1.Controls.Add(this.txt_flag_type);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.txt_flag_no);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupPanel1.Location = new System.Drawing.Point(0, 0);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(733, 290);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 2;
+ this.groupPanel1.Text = "标识器属性信息";
+ //
+ // textBoxbz
+ //
+ //
+ //
+ //
+ this.textBoxbz.Border.Class = "TextBoxBorder";
+ this.textBoxbz.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxbz.Location = new System.Drawing.Point(326, 216);
+ this.textBoxbz.Name = "textBoxbz";
+ this.textBoxbz.Size = new System.Drawing.Size(128, 21);
+ this.textBoxbz.TabIndex = 32;
+ //
+ // labelX15
+ //
+ this.labelX15.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX15.BackgroundStyle.Class = "";
+ this.labelX15.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX15.Location = new System.Drawing.Point(245, 216);
+ this.labelX15.Name = "labelX15";
+ this.labelX15.Size = new System.Drawing.Size(75, 23);
+ this.labelX15.TabIndex = 31;
+ this.labelX15.Text = "备注";
+ //
+ // textBoxjlzrr
+ //
+ //
+ //
+ //
+ this.textBoxjlzrr.Border.Class = "TextBoxBorder";
+ this.textBoxjlzrr.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxjlzrr.Location = new System.Drawing.Point(102, 216);
+ this.textBoxjlzrr.Name = "textBoxjlzrr";
+ this.textBoxjlzrr.Size = new System.Drawing.Size(128, 21);
+ this.textBoxjlzrr.TabIndex = 30;
+ //
+ // labelX14
+ //
+ this.labelX14.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX14.BackgroundStyle.Class = "";
+ this.labelX14.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX14.Location = new System.Drawing.Point(18, 216);
+ this.labelX14.Name = "labelX14";
+ this.labelX14.Size = new System.Drawing.Size(75, 23);
+ this.labelX14.TabIndex = 29;
+ this.labelX14.Text = "监理责任人";
+ //
+ // textBoxsgjl
+ //
+ //
+ //
+ //
+ this.textBoxsgjl.Border.Class = "TextBoxBorder";
+ this.textBoxsgjl.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsgjl.Location = new System.Drawing.Point(547, 167);
+ this.textBoxsgjl.Name = "textBoxsgjl";
+ this.textBoxsgjl.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsgjl.TabIndex = 28;
+ //
+ // labelX13
+ //
+ this.labelX13.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX13.BackgroundStyle.Class = "";
+ this.labelX13.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX13.Location = new System.Drawing.Point(466, 167);
+ this.labelX13.Name = "labelX13";
+ this.labelX13.Size = new System.Drawing.Size(75, 23);
+ this.labelX13.TabIndex = 27;
+ this.labelX13.Text = "施工监理";
+ //
+ // textBoxsgzrr
+ //
+ //
+ //
+ //
+ this.textBoxsgzrr.Border.Class = "TextBoxBorder";
+ this.textBoxsgzrr.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsgzrr.Location = new System.Drawing.Point(326, 167);
+ this.textBoxsgzrr.Name = "textBoxsgzrr";
+ this.textBoxsgzrr.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsgzrr.TabIndex = 26;
+ //
+ // labelX12
+ //
+ this.labelX12.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX12.BackgroundStyle.Class = "";
+ this.labelX12.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX12.Location = new System.Drawing.Point(245, 167);
+ this.labelX12.Name = "labelX12";
+ this.labelX12.Size = new System.Drawing.Size(75, 23);
+ this.labelX12.TabIndex = 25;
+ this.labelX12.Text = "施工责任人";
+ //
+ // textBoxsgdw
+ //
+ //
+ //
+ //
+ this.textBoxsgdw.Border.Class = "TextBoxBorder";
+ this.textBoxsgdw.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsgdw.Location = new System.Drawing.Point(103, 167);
+ this.textBoxsgdw.Name = "textBoxsgdw";
+ this.textBoxsgdw.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsgdw.TabIndex = 24;
+ //
+ // labelX10
+ //
+ this.labelX10.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX10.BackgroundStyle.Class = "";
+ this.labelX10.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX10.Location = new System.Drawing.Point(18, 167);
+ this.labelX10.Name = "labelX10";
+ this.labelX10.Size = new System.Drawing.Size(75, 23);
+ this.labelX10.TabIndex = 23;
+ this.labelX10.Text = "施工单位";
+ //
+ // textBoxsjrxm
+ //
+ //
+ //
+ //
+ this.textBoxsjrxm.Border.Class = "TextBoxBorder";
+ this.textBoxsjrxm.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsjrxm.Location = new System.Drawing.Point(547, 120);
+ this.textBoxsjrxm.Name = "textBoxsjrxm";
+ this.textBoxsjrxm.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsjrxm.TabIndex = 20;
+ //
+ // labelX8
+ //
+ this.labelX8.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX8.BackgroundStyle.Class = "";
+ this.labelX8.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX8.Location = new System.Drawing.Point(466, 120);
+ this.labelX8.Name = "labelX8";
+ this.labelX8.Size = new System.Drawing.Size(75, 23);
+ this.labelX8.TabIndex = 19;
+ this.labelX8.Text = "设计人姓名";
+ //
+ // textBoxsjdw
+ //
+ //
+ //
+ //
+ this.textBoxsjdw.Border.Class = "TextBoxBorder";
+ this.textBoxsjdw.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsjdw.Location = new System.Drawing.Point(326, 120);
+ this.textBoxsjdw.Name = "textBoxsjdw";
+ this.textBoxsjdw.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsjdw.TabIndex = 18;
+ //
+ // labelX7
+ //
+ this.labelX7.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX7.BackgroundStyle.Class = "";
+ this.labelX7.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX7.Location = new System.Drawing.Point(251, 120);
+ this.labelX7.Name = "labelX7";
+ this.labelX7.Size = new System.Drawing.Size(75, 23);
+ this.labelX7.TabIndex = 17;
+ this.labelX7.Text = "设计单位";
+ //
+ // textBoxqsdw
+ //
+ //
+ //
+ //
+ this.textBoxqsdw.Border.Class = "TextBoxBorder";
+ this.textBoxqsdw.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxqsdw.Location = new System.Drawing.Point(103, 120);
+ this.textBoxqsdw.Name = "textBoxqsdw";
+ this.textBoxqsdw.Size = new System.Drawing.Size(128, 21);
+ this.textBoxqsdw.TabIndex = 16;
+ //
+ // labelX5
+ //
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(18, 120);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(75, 23);
+ this.labelX5.TabIndex = 15;
+ this.labelX5.Text = "权属单位";
+ //
+ // textBoxXgc
+ //
+ //
+ //
+ //
+ this.textBoxXgc.Border.Class = "TextBoxBorder";
+ this.textBoxXgc.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXgc.Location = new System.Drawing.Point(102, 72);
+ this.textBoxXgc.Name = "textBoxXgc";
+ this.textBoxXgc.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXgc.TabIndex = 14;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(9, 72);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(87, 23);
+ this.labelX4.TabIndex = 13;
+ this.labelX4.Text = "地面高程(米)";
+ //
+ // FrmFlagEdits
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(733, 356);
+ this.Controls.Add(this.btn_ok);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagEdits";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器属性编辑";
+ this.groupPanel1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_flag_no;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_flag_type;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_flag_id;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_deep;
+ private DevComponents.DotNetBar.LabelX labelX11;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_street;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXgc;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsjdw;
+ private DevComponents.DotNetBar.LabelX labelX7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxqsdw;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsgzrr;
+ private DevComponents.DotNetBar.LabelX labelX12;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsgdw;
+ private DevComponents.DotNetBar.LabelX labelX10;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsjrxm;
+ private DevComponents.DotNetBar.LabelX labelX8;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxbz;
+ private DevComponents.DotNetBar.LabelX labelX15;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxjlzrr;
+ private DevComponents.DotNetBar.LabelX labelX14;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsgjl;
+ private DevComponents.DotNetBar.LabelX labelX13;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs
new file mode 100644
index 0000000..b830ce4
--- /dev/null
+++ b/FrmFlagEdits.cs
@@ -0,0 +1,89 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagEdits : Office2007Form
+ {
+ public FrmFlagEdits()
+ {
+ InitializeComponent();
+ }
+ string id = "";
+ public delegate void Handle();
+ public event Handle refresh;
+
+ public FrmFlagEdits(string id, string flagid, string flagno, string flagtype,
+ string deep, string street, string gc, string belongComp, string designComp,
+ string designer, string workComp, string worker, string monitorComp, string monitor, string remark)
+ {
+ InitializeComponent();
+ this.id = id;
+ txt_flag_id.Text = flagid;//标识器ID
+ txt_flag_no.Text = flagno;//编号
+ txt_flag_type.Text = flagtype;//标识器型号
+ textBoxXgc.Text = gc;//地面高程
+ txt_deep.Text = deep;//埋深
+ txt_street.Text = street;//所属道路
+ textBoxqsdw.Text = belongComp;//权属单位
+ textBoxsjdw.Text = designComp;//设计单位
+ textBoxsjrxm.Text = designer;
+ textBoxsgdw.Text = workComp;
+ textBoxsgzrr.Text = worker;
+ textBoxsgjl.Text = monitorComp;
+ textBoxjlzrr.Text = monitor;
+ textBoxbz.Text = remark;
+
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ double outer;
+
+ if (!double.TryParse(txt_deep.Text.Trim(), out outer))
+ {
+ MessageBox.Show("埋深取值有误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ txt_deep.Focus();
+ return;
+ }
+ string sql = "update 标识器 t " +
+ "set t.标识器id号 = '" + txt_flag_id.Text.Trim() + "'," +
+ "t.编号 = '" + txt_flag_no.Text.Trim() + "'," +
+ "t.标识器型号 = '" + txt_flag_type.Text.Trim() + "'," +
+ "t.地面高程 =" + textBoxXgc.Text.Trim() + "," +
+ "t.标识器埋深 =" + txt_deep.Text.Trim() + "," +
+ "t.所属道路 = '" + txt_street.Text.Trim() + "'," +
+ "t.权属单位 = '" + textBoxqsdw.Text.Trim() + "'," +
+ "t.设计单位 = '" + textBoxsjdw.Text.Trim() + "'," +
+ "t.设计人姓名 = '" + textBoxsjrxm.Text.Trim() + "'," +
+ "t.施工单位 = '" + textBoxsgdw.Text.Trim() + "'," +
+ "t.施工责任人 = '" + textBoxsgzrr.Text.Trim() + "'," +
+ "t.施工监理 = '" + textBoxsgjl.Text.Trim() + "'," +
+ "t.监理责任人 = '" + textBoxjlzrr.Text.Trim() + "'," +
+ "t.备注 = '" + textBoxbz.Text.Trim() + "'" +
+ "where t.LSSYS_ID =" + id;
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK)
+ {
+ this.Close();
+ refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ }
+}
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmAllPipelineStatis.cs b/FrmAllPipelineStatis.cs
index 0911557..56848dc 100644
--- a/FrmAllPipelineStatis.cs
+++ b/FrmAllPipelineStatis.cs
@@ -12,14 +12,6 @@
{
public partial class FrmAllPipelineStatis : Office2007Form
{
- //Dictionary pipelineLengthAndType = new Dictionary();
- //List list = new List();
- //GSOGlobeControl globeControl1;
- //int type;
- //static FrmAllPipelineStatis frm;
- //private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
- //DataTable table = new DataTable();
- //string strLable = "";
static FrmAllPipelineStatis frm;
private MainFrm.DataGridViewDelegate m_InitDataGridViewX1;
@@ -30,22 +22,6 @@
private List pipeLayerNames;
private static bool isSpaceQuery;
- //public static void ShowForm(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // if (frm == null)
- // {
- // frm = new FrmAllPipelineStatis(_type, pipeLen, _list, ctl, InitDataGridViewX1);
- // frm.Show(ctl.Parent);
- // }
- // else
- // {
- // if (frm.WindowState == FormWindowState.Minimized)
- // {
- // frm.WindowState = FormWindowState.Normal;
- // }
- // }
- //}
public static void ShowForm(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1,List pipeLayerNames)
{
isSpaceQuery = true;
@@ -59,17 +35,7 @@
frm.WindowState = FormWindowState.Normal;
}
}
- //public FrmAllPipelineStatis(int _type, Dictionary pipeLen, List _list,
- // GSOGlobeControl ctl, MainFrm.DataGridViewDelegate InitDataGridViewX1)
- //{
- // InitializeComponent();
- // type = _type;
- // pipelineLengthAndType = pipeLen;
- // list = _list;
- // globeControl1 = ctl;
- // m_InitDataGridViewX1 = InitDataGridViewX1;
- //}
public FrmAllPipelineStatis(GSOGlobeControl ctl, GSOGeoPolygon3D polygon, MainFrm.DataGridViewDelegate InitDataGridViewX1, List pipeLayerNames)
{
InitializeComponent();
@@ -91,14 +57,6 @@
private void drawChart() {
try
{
- //if (type == 0)
- //{
- // Text = "管线距离统计";
- //}
- //else
- //{
- // Text = "空间查询";
- //}
chartAllAreaPipeline.Series.Add("管线");
// Set axis title
@@ -138,20 +96,7 @@
//GSOFeatures fs = list[indexHit];
string pipetype = chartAllAreaPipeline.Series["管线"].Points[indexHit].AxisLabel+"管线";
- //foreach (string key in nameAndPipesMap.Keys)
- //{
- // if (key.StartsWith(pipetype))
- // {
- // pipetype = key;
- // break;
- // }
- //}
- //GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(pipetype);
- //if (layer == null)
- //{
- // return;
- //}
GSOFeatures fs = nameAndPipesMap[pipetype];
string[] fields = ClassSearchAnalysis.getFields(pipetype, globeControl1);
DataTable table = ClassSearchAnalysis.convertGSOFeatures2DataTable(fs, fields);
diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs
index dd63f62..5b05926 100644
--- a/FrmBSQStatis.cs
+++ b/FrmBSQStatis.cs
@@ -23,10 +23,8 @@
bsq = getBSQNameAndNumMap(polygon);
}
-
private void FrmBSQStatis_Load(object sender, EventArgs e)
{
-
try
{
chartStatis.Series.Add("标识器");
diff --git a/FrmFlagDatabase.Designer.cs b/FrmFlagDatabase.Designer.cs
new file mode 100644
index 0000000..cc7aca8
--- /dev/null
+++ b/FrmFlagDatabase.Designer.cs
@@ -0,0 +1,265 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDatabase
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.txt_ip = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_db = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_user = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.chk = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.txt_pwd = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(3, 3);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(50, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "服务器";
+ this.labelX1.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(3, 47);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 23);
+ this.labelX2.TabIndex = 1;
+ this.labelX2.Text = "数据库";
+ this.labelX2.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(3, 98);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 23);
+ this.labelX3.TabIndex = 2;
+ this.labelX3.Text = "账号";
+ this.labelX3.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(3, 148);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 23);
+ this.labelX4.TabIndex = 3;
+ this.labelX4.Text = "密码";
+ this.labelX4.TextAlignment = System.Drawing.StringAlignment.Far;
+ //
+ // txt_ip
+ //
+ //
+ //
+ //
+ this.txt_ip.Border.Class = "TextBoxBorder";
+ this.txt_ip.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_ip.Location = new System.Drawing.Point(69, 2);
+ this.txt_ip.Name = "txt_ip";
+ this.txt_ip.Size = new System.Drawing.Size(167, 21);
+ this.txt_ip.TabIndex = 4;
+ //
+ // txt_db
+ //
+ //
+ //
+ //
+ this.txt_db.Border.Class = "TextBoxBorder";
+ this.txt_db.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_db.Location = new System.Drawing.Point(69, 47);
+ this.txt_db.Name = "txt_db";
+ this.txt_db.Size = new System.Drawing.Size(167, 21);
+ this.txt_db.TabIndex = 4;
+ //
+ // txt_user
+ //
+ //
+ //
+ //
+ this.txt_user.Border.Class = "TextBoxBorder";
+ this.txt_user.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_user.Location = new System.Drawing.Point(69, 98);
+ this.txt_user.Name = "txt_user";
+ this.txt_user.Size = new System.Drawing.Size(167, 21);
+ this.txt_user.TabIndex = 4;
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(197, 249);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 5;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.txt_pwd);
+ this.groupPanel1.Controls.Add(this.chk);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.txt_user);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_db);
+ this.groupPanel1.Controls.Add(this.txt_ip);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 6);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(260, 229);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 6;
+ this.groupPanel1.Text = "数据库信息";
+ //
+ // chk
+ //
+ this.chk.AutoSize = true;
+ //
+ //
+ //
+ this.chk.BackgroundStyle.Class = "";
+ this.chk.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.chk.Location = new System.Drawing.Point(166, 180);
+ this.chk.Name = "chk";
+ this.chk.Size = new System.Drawing.Size(70, 16);
+ this.chk.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.chk.TabIndex = 5;
+ this.chk.Text = "记住配置";
+ //
+ // txt_pwd
+ //
+ //
+ //
+ //
+ this.txt_pwd.Border.Class = "TextBoxBorder";
+ this.txt_pwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_pwd.Location = new System.Drawing.Point(69, 149);
+ this.txt_pwd.Name = "txt_pwd";
+ this.txt_pwd.PasswordChar = '*';
+ this.txt_pwd.Size = new System.Drawing.Size(167, 21);
+ this.txt_pwd.TabIndex = 6;
+ //
+ // FrmFlagDatabase
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 284);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btn_ok);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagDatabase";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器数据库连接";
+ this.Load += new System.EventHandler(this.FrmFlagDatabase_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_ip;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_db;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_user;
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.CheckBoxX chk;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_pwd;
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDatabase.cs b/FrmFlagDatabase.cs
new file mode 100644
index 0000000..5a137c0
--- /dev/null
+++ b/FrmFlagDatabase.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.IO;
+using System.Xml;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDatabase : Office2007Form
+ {
+ public static string dbServer = "";
+ public static string database = "";
+ public static string userId = "";
+ public static string password = "";
+ public static GSODataSource ds = null;
+ private GSOGlobeControl ctl;
+
+ public FrmFlagDatabase(GSOGlobeControl _ctl)
+ {
+ InitializeComponent();
+ ctl = _ctl;
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ if (String.IsNullOrEmpty(txt_ip.Text.Trim()) || String.IsNullOrEmpty(txt_db.Text.Trim()) || String.IsNullOrEmpty(txt_user.Text.Trim()) || String.IsNullOrEmpty(txt_pwd.Text.Trim()))
+ {
+ MessageBox.Show("配置参数不能为空!", "提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+ try
+ {
+ ds = ctl.Globe.DataManager.OpenOracleDataSource(txt_ip.Text.Trim() + "/" + txt_db.Text.Trim(), "", "", txt_user.Text.Trim(), txt_pwd.Text.Trim());
+ if (ds == null)
+ {
+ MessageBox.Show("数据库连接失败!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ else
+ {
+ dbServer = txt_ip.Text.Trim();
+ database = txt_db.Text.Trim();
+ userId = txt_user.Text.Trim();
+ password = txt_pwd.Text.Trim();
+ WriteXML();
+ }
+ this.DialogResult = DialogResult.OK;
+ MessageBox.Show("已成功连接数据库!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("数据库连接失败:" + ex.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
+
+ private void FrmFlagDatabase_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ ReadXML();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("窗体加载失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void ReadXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ if (!File.Exists(strFileName))
+ {
+ return;
+ }
+
+ //初始化XML文档操作类
+ XmlDocument myDoc = new XmlDocument();
+ //加载XML文件
+ myDoc.Load(strFileName);
+ //搜索指定的节点
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ XmlNodeList nodes = null;
+ if (serverRootNode != null)
+ {
+ nodes = myDoc.SelectSingleNode("CyberPipe").ChildNodes;
+ if (nodes != null)
+ {
+ bool bRecorded = false;
+ XmlNode bRecordNode = serverRootNode.SelectSingleNode("IsRecordedSql");
+ if (bRecordNode != null)
+ {
+ bool.TryParse(bRecordNode.InnerText, out bRecorded);
+ chk.Checked = bRecorded;
+ }
+ if (bRecorded)
+ {
+ foreach (System.Xml.XmlNode xn in nodes)
+ {
+ if (xn.Name == "serverIP")
+ {
+ txt_ip.Text = xn.InnerText;
+ }
+ else if (xn.Name == "pipedb")
+ {
+ txt_db.Text = xn.InnerText;
+ }
+ else if (xn.Name == "userName")
+ {
+ txt_user.Text = xn.InnerText;
+ }
+ else if (xn.Name == "password")
+ {
+ txt_pwd.Text = xn.InnerText;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void WriteXML()
+ {
+ string strFileName = Path.GetDirectoryName(Application.ExecutablePath) + "/EMSdatabaseConfig.xml";
+ File.WriteAllText(strFileName, " ");
+ XmlDocument myDoc = new XmlDocument();
+
+ //加载XML文件
+ // XmlElement serverRootNode = null;
+ try
+ {
+ myDoc.Load(strFileName);
+
+ }
+ catch (Exception e)
+ {
+ File.Delete(strFileName);
+ File.WriteAllText(strFileName, " ");
+ throw e;
+ }
+ XmlNode serverRootNode = myDoc.SelectSingleNode("CyberPipe");
+ if (serverRootNode == null)
+ {
+ serverRootNode = myDoc.CreateElement("CyberPipe");
+ }
+ XmlElement ele0 = myDoc.CreateElement("IsRecordedSql");
+ ele0.InnerText = chk.Checked.ToString();
+ serverRootNode.AppendChild(ele0);
+
+ XmlElement ele1 = myDoc.CreateElement("serverIP");
+ ele1.InnerText = dbServer;
+ serverRootNode.AppendChild(ele1);
+
+ XmlElement ele2 = myDoc.CreateElement("pipedb");
+ ele2.InnerText = database;
+ serverRootNode.AppendChild(ele2);
+
+ XmlElement ele3 = myDoc.CreateElement("userName");
+ ele3.InnerText = userId;
+ serverRootNode.AppendChild(ele3);
+
+ XmlElement ele4 = myDoc.CreateElement("password");
+ ele4.InnerText = password;
+ serverRootNode.AppendChild(ele4);
+ try
+ {
+ myDoc.Save(strFileName);
+ }
+ catch (Exception exp)
+ {
+ throw exp;
+ }
+ }
+ }
+}
diff --git a/FrmFlagDatabase.resx b/FrmFlagDatabase.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmFlagDatabase.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FrmFlagDetail.Designer.cs b/FrmFlagDetail.Designer.cs
new file mode 100644
index 0000000..982bfc6
--- /dev/null
+++ b/FrmFlagDetail.Designer.cs
@@ -0,0 +1,103 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagDetail
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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 dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ this.dataGridViewX_markDetail = new DevComponents.DotNetBar.Controls.DataGridViewX();
+ this.对象类型 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象编号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.对象名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).BeginInit();
+ this.SuspendLayout();
+ //
+ // dataGridViewX_markDetail
+ //
+ this.dataGridViewX_markDetail.AllowUserToAddRows = false;
+ this.dataGridViewX_markDetail.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+ this.dataGridViewX_markDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridViewX_markDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.对象类型,
+ this.对象编号,
+ this.对象名称});
+ dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
+ dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dataGridViewX_markDetail.DefaultCellStyle = dataGridViewCellStyle3;
+ this.dataGridViewX_markDetail.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridViewX_markDetail.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
+ this.dataGridViewX_markDetail.Location = new System.Drawing.Point(0, 0);
+ this.dataGridViewX_markDetail.Name = "dataGridViewX_markDetail";
+ this.dataGridViewX_markDetail.RowTemplate.Height = 23;
+ this.dataGridViewX_markDetail.Size = new System.Drawing.Size(508, 321);
+ this.dataGridViewX_markDetail.TabIndex = 0;
+ //
+ // 对象类型
+ //
+ this.对象类型.HeaderText = "对象类型";
+ this.对象类型.Name = "对象类型";
+ //
+ // 对象编号
+ //
+ this.对象编号.HeaderText = "对象编号";
+ this.对象编号.Name = "对象编号";
+ //
+ // 对象名称
+ //
+ this.对象名称.HeaderText = "对象名称";
+ this.对象名称.Name = "对象名称";
+ //
+ // FrmFlagDetail
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(508, 321);
+ this.Controls.Add(this.dataGridViewX_markDetail);
+ this.Name = "FrmFlagDetail";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识对象信息";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmFlagDetail_FormClosing);
+ this.Load += new System.EventHandler(this.FrmFlagDetail_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_markDetail)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_markDetail;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象类型;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象编号;
+ private System.Windows.Forms.DataGridViewTextBoxColumn 对象名称;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagDetail.cs b/FrmFlagDetail.cs
new file mode 100644
index 0000000..d72eee9
--- /dev/null
+++ b/FrmFlagDetail.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using GeoScene.Globe;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagDetail : Form
+ {
+ DataTable dt = new DataTable();
+ private GSOGlobeControl globeControl1;
+
+ public delegate void Handle();
+ public event Handle showParentForm;
+ String markId;
+
+ public FrmFlagDetail(GSOGlobeControl globeControl1, String id)
+ {
+ InitializeComponent();
+ this.markId = id;
+ }
+
+ private void FrmFlagDetail_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ showParentForm();
+ }
+
+ private void FrmFlagDetail_Load(object sender, EventArgs e)
+ {
+ string objectIds = "";
+ string objectTypeCodes = "";
+ string sql = "select t.对象编号,t.对象类型 from 标识器 t where t.编号='" + markId + "'";
+ using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql))
+ {
+ while (reader.Read())
+ {
+ objectIds = reader.GetString(0);
+ objectTypeCodes = reader.GetString(1);
+ }
+ }
+
+ string[] codeTypes = objectTypeCodes.Split(',');
+ string[] codeIds = objectIds.Split(',');
+ int length = 0;
+ if (codeTypes.Length <= codeIds.Length)
+ {
+ length = codeTypes.Length;
+ }
+ else
+ {
+ length = codeIds.Length;
+ }
+ for (int n = 0; n < length; n++)
+ {
+ for (int i = 0; i < Utility.listPipelineType.Count; i++)
+ {
+ if (Utility.listPipelineType[i].code == codeTypes[n])
+ {
+ int index = this.dataGridViewX_markDetail.Rows.Add();
+ this.dataGridViewX_markDetail.Rows[index].Cells[0].Value = Utility.listPipelineType[i].type;
+ this.dataGridViewX_markDetail.Rows[index].Cells[1].Value = codeIds[n].ToString();
+ this.dataGridViewX_markDetail.Rows[index].Cells[2].Value = Utility.listPipelineType[i].name;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/FrmFlagDetail.resx b/FrmFlagDetail.resx
new file mode 100644
index 0000000..e98a8fe
--- /dev/null
+++ b/FrmFlagDetail.resx
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ True
+
+
+ True
+
+
+ True
+
+
\ No newline at end of file
diff --git a/FrmFlagEdits.Designer.cs b/FrmFlagEdits.Designer.cs
new file mode 100644
index 0000000..205dd3b
--- /dev/null
+++ b/FrmFlagEdits.Designer.cs
@@ -0,0 +1,564 @@
+namespace Cyberpipe
+{
+ partial class FrmFlagEdits
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btn_ok = new DevComponents.DotNetBar.ButtonX();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.txt_flag_no = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_flag_type = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_flag_id = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_deep = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX11 = new DevComponents.DotNetBar.LabelX();
+ this.txt_street = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxbz = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX15 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxjlzrr = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX14 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsgjl = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX13 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsgzrr = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX12 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsgdw = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX10 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsjrxm = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX8 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxsjdw = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX7 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxqsdw = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.textBoxXgc = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btn_ok
+ //
+ this.btn_ok.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_ok.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_ok.Location = new System.Drawing.Point(602, 307);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(75, 23);
+ this.btn_ok.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_ok.TabIndex = 4;
+ this.btn_ok.Text = "确定";
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Location = new System.Drawing.Point(18, 22);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(75, 23);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "标识器ID";
+ //
+ // labelX2
+ //
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(251, 23);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(75, 23);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "编号";
+ //
+ // labelX3
+ //
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(474, 23);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(75, 23);
+ this.labelX3.TabIndex = 0;
+ this.labelX3.Text = "型号";
+ //
+ // txt_flag_no
+ //
+ //
+ //
+ //
+ this.txt_flag_no.Border.Class = "TextBoxBorder";
+ this.txt_flag_no.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_flag_no.Location = new System.Drawing.Point(326, 22);
+ this.txt_flag_no.Name = "txt_flag_no";
+ this.txt_flag_no.ReadOnly = true;
+ this.txt_flag_no.Size = new System.Drawing.Size(128, 21);
+ this.txt_flag_no.TabIndex = 1;
+ //
+ // labelX6
+ //
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(251, 72);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(75, 23);
+ this.labelX6.TabIndex = 0;
+ this.labelX6.Text = "埋深(米)*";
+ //
+ // txt_flag_type
+ //
+ //
+ //
+ //
+ this.txt_flag_type.Border.Class = "TextBoxBorder";
+ this.txt_flag_type.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_flag_type.Location = new System.Drawing.Point(547, 22);
+ this.txt_flag_type.Name = "txt_flag_type";
+ this.txt_flag_type.Size = new System.Drawing.Size(128, 21);
+ this.txt_flag_type.TabIndex = 1;
+ //
+ // txt_flag_id
+ //
+ //
+ //
+ //
+ this.txt_flag_id.Border.Class = "TextBoxBorder";
+ this.txt_flag_id.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_flag_id.Location = new System.Drawing.Point(103, 22);
+ this.txt_flag_id.Name = "txt_flag_id";
+ this.txt_flag_id.ReadOnly = true;
+ this.txt_flag_id.Size = new System.Drawing.Size(128, 21);
+ this.txt_flag_id.TabIndex = 1;
+ //
+ // txt_deep
+ //
+ //
+ //
+ //
+ this.txt_deep.Border.Class = "TextBoxBorder";
+ this.txt_deep.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_deep.Location = new System.Drawing.Point(326, 71);
+ this.txt_deep.Name = "txt_deep";
+ this.txt_deep.Size = new System.Drawing.Size(128, 21);
+ this.txt_deep.TabIndex = 1;
+ //
+ // labelX11
+ //
+ this.labelX11.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX11.BackgroundStyle.Class = "";
+ this.labelX11.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX11.Location = new System.Drawing.Point(467, 71);
+ this.labelX11.Name = "labelX11";
+ this.labelX11.Size = new System.Drawing.Size(75, 23);
+ this.labelX11.TabIndex = 5;
+ this.labelX11.Text = "所属道路";
+ //
+ // txt_street
+ //
+ //
+ //
+ //
+ this.txt_street.Border.Class = "TextBoxBorder";
+ this.txt_street.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_street.Location = new System.Drawing.Point(547, 69);
+ this.txt_street.Name = "txt_street";
+ this.txt_street.Size = new System.Drawing.Size(128, 21);
+ this.txt_street.TabIndex = 12;
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.textBoxbz);
+ this.groupPanel1.Controls.Add(this.labelX15);
+ this.groupPanel1.Controls.Add(this.textBoxjlzrr);
+ this.groupPanel1.Controls.Add(this.labelX14);
+ this.groupPanel1.Controls.Add(this.textBoxsgjl);
+ this.groupPanel1.Controls.Add(this.labelX13);
+ this.groupPanel1.Controls.Add(this.textBoxsgzrr);
+ this.groupPanel1.Controls.Add(this.labelX12);
+ this.groupPanel1.Controls.Add(this.textBoxsgdw);
+ this.groupPanel1.Controls.Add(this.labelX10);
+ this.groupPanel1.Controls.Add(this.textBoxsjrxm);
+ this.groupPanel1.Controls.Add(this.labelX8);
+ this.groupPanel1.Controls.Add(this.textBoxsjdw);
+ this.groupPanel1.Controls.Add(this.labelX7);
+ this.groupPanel1.Controls.Add(this.textBoxqsdw);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.textBoxXgc);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.txt_street);
+ this.groupPanel1.Controls.Add(this.labelX11);
+ this.groupPanel1.Controls.Add(this.txt_deep);
+ this.groupPanel1.Controls.Add(this.txt_flag_id);
+ this.groupPanel1.Controls.Add(this.txt_flag_type);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.txt_flag_no);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Controls.Add(this.labelX1);
+ this.groupPanel1.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupPanel1.Location = new System.Drawing.Point(0, 0);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(733, 290);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 2;
+ this.groupPanel1.Text = "标识器属性信息";
+ //
+ // textBoxbz
+ //
+ //
+ //
+ //
+ this.textBoxbz.Border.Class = "TextBoxBorder";
+ this.textBoxbz.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxbz.Location = new System.Drawing.Point(326, 216);
+ this.textBoxbz.Name = "textBoxbz";
+ this.textBoxbz.Size = new System.Drawing.Size(128, 21);
+ this.textBoxbz.TabIndex = 32;
+ //
+ // labelX15
+ //
+ this.labelX15.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX15.BackgroundStyle.Class = "";
+ this.labelX15.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX15.Location = new System.Drawing.Point(245, 216);
+ this.labelX15.Name = "labelX15";
+ this.labelX15.Size = new System.Drawing.Size(75, 23);
+ this.labelX15.TabIndex = 31;
+ this.labelX15.Text = "备注";
+ //
+ // textBoxjlzrr
+ //
+ //
+ //
+ //
+ this.textBoxjlzrr.Border.Class = "TextBoxBorder";
+ this.textBoxjlzrr.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxjlzrr.Location = new System.Drawing.Point(102, 216);
+ this.textBoxjlzrr.Name = "textBoxjlzrr";
+ this.textBoxjlzrr.Size = new System.Drawing.Size(128, 21);
+ this.textBoxjlzrr.TabIndex = 30;
+ //
+ // labelX14
+ //
+ this.labelX14.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX14.BackgroundStyle.Class = "";
+ this.labelX14.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX14.Location = new System.Drawing.Point(18, 216);
+ this.labelX14.Name = "labelX14";
+ this.labelX14.Size = new System.Drawing.Size(75, 23);
+ this.labelX14.TabIndex = 29;
+ this.labelX14.Text = "监理责任人";
+ //
+ // textBoxsgjl
+ //
+ //
+ //
+ //
+ this.textBoxsgjl.Border.Class = "TextBoxBorder";
+ this.textBoxsgjl.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsgjl.Location = new System.Drawing.Point(547, 167);
+ this.textBoxsgjl.Name = "textBoxsgjl";
+ this.textBoxsgjl.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsgjl.TabIndex = 28;
+ //
+ // labelX13
+ //
+ this.labelX13.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX13.BackgroundStyle.Class = "";
+ this.labelX13.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX13.Location = new System.Drawing.Point(466, 167);
+ this.labelX13.Name = "labelX13";
+ this.labelX13.Size = new System.Drawing.Size(75, 23);
+ this.labelX13.TabIndex = 27;
+ this.labelX13.Text = "施工监理";
+ //
+ // textBoxsgzrr
+ //
+ //
+ //
+ //
+ this.textBoxsgzrr.Border.Class = "TextBoxBorder";
+ this.textBoxsgzrr.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsgzrr.Location = new System.Drawing.Point(326, 167);
+ this.textBoxsgzrr.Name = "textBoxsgzrr";
+ this.textBoxsgzrr.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsgzrr.TabIndex = 26;
+ //
+ // labelX12
+ //
+ this.labelX12.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX12.BackgroundStyle.Class = "";
+ this.labelX12.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX12.Location = new System.Drawing.Point(245, 167);
+ this.labelX12.Name = "labelX12";
+ this.labelX12.Size = new System.Drawing.Size(75, 23);
+ this.labelX12.TabIndex = 25;
+ this.labelX12.Text = "施工责任人";
+ //
+ // textBoxsgdw
+ //
+ //
+ //
+ //
+ this.textBoxsgdw.Border.Class = "TextBoxBorder";
+ this.textBoxsgdw.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsgdw.Location = new System.Drawing.Point(103, 167);
+ this.textBoxsgdw.Name = "textBoxsgdw";
+ this.textBoxsgdw.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsgdw.TabIndex = 24;
+ //
+ // labelX10
+ //
+ this.labelX10.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX10.BackgroundStyle.Class = "";
+ this.labelX10.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX10.Location = new System.Drawing.Point(18, 167);
+ this.labelX10.Name = "labelX10";
+ this.labelX10.Size = new System.Drawing.Size(75, 23);
+ this.labelX10.TabIndex = 23;
+ this.labelX10.Text = "施工单位";
+ //
+ // textBoxsjrxm
+ //
+ //
+ //
+ //
+ this.textBoxsjrxm.Border.Class = "TextBoxBorder";
+ this.textBoxsjrxm.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsjrxm.Location = new System.Drawing.Point(547, 120);
+ this.textBoxsjrxm.Name = "textBoxsjrxm";
+ this.textBoxsjrxm.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsjrxm.TabIndex = 20;
+ //
+ // labelX8
+ //
+ this.labelX8.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX8.BackgroundStyle.Class = "";
+ this.labelX8.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX8.Location = new System.Drawing.Point(466, 120);
+ this.labelX8.Name = "labelX8";
+ this.labelX8.Size = new System.Drawing.Size(75, 23);
+ this.labelX8.TabIndex = 19;
+ this.labelX8.Text = "设计人姓名";
+ //
+ // textBoxsjdw
+ //
+ //
+ //
+ //
+ this.textBoxsjdw.Border.Class = "TextBoxBorder";
+ this.textBoxsjdw.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxsjdw.Location = new System.Drawing.Point(326, 120);
+ this.textBoxsjdw.Name = "textBoxsjdw";
+ this.textBoxsjdw.Size = new System.Drawing.Size(128, 21);
+ this.textBoxsjdw.TabIndex = 18;
+ //
+ // labelX7
+ //
+ this.labelX7.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX7.BackgroundStyle.Class = "";
+ this.labelX7.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX7.Location = new System.Drawing.Point(251, 120);
+ this.labelX7.Name = "labelX7";
+ this.labelX7.Size = new System.Drawing.Size(75, 23);
+ this.labelX7.TabIndex = 17;
+ this.labelX7.Text = "设计单位";
+ //
+ // textBoxqsdw
+ //
+ //
+ //
+ //
+ this.textBoxqsdw.Border.Class = "TextBoxBorder";
+ this.textBoxqsdw.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxqsdw.Location = new System.Drawing.Point(103, 120);
+ this.textBoxqsdw.Name = "textBoxqsdw";
+ this.textBoxqsdw.Size = new System.Drawing.Size(128, 21);
+ this.textBoxqsdw.TabIndex = 16;
+ //
+ // labelX5
+ //
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(18, 120);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(75, 23);
+ this.labelX5.TabIndex = 15;
+ this.labelX5.Text = "权属单位";
+ //
+ // textBoxXgc
+ //
+ //
+ //
+ //
+ this.textBoxXgc.Border.Class = "TextBoxBorder";
+ this.textBoxXgc.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXgc.Location = new System.Drawing.Point(102, 72);
+ this.textBoxXgc.Name = "textBoxXgc";
+ this.textBoxXgc.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXgc.TabIndex = 14;
+ //
+ // labelX4
+ //
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(9, 72);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(87, 23);
+ this.labelX4.TabIndex = 13;
+ this.labelX4.Text = "地面高程(米)";
+ //
+ // FrmFlagEdits
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(733, 356);
+ this.Controls.Add(this.btn_ok);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmFlagEdits";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "标识器属性编辑";
+ this.groupPanel1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btn_ok;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_flag_no;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_flag_type;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_flag_id;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_deep;
+ private DevComponents.DotNetBar.LabelX labelX11;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_street;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXgc;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsjdw;
+ private DevComponents.DotNetBar.LabelX labelX7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxqsdw;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsgzrr;
+ private DevComponents.DotNetBar.LabelX labelX12;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsgdw;
+ private DevComponents.DotNetBar.LabelX labelX10;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsjrxm;
+ private DevComponents.DotNetBar.LabelX labelX8;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxbz;
+ private DevComponents.DotNetBar.LabelX labelX15;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxjlzrr;
+ private DevComponents.DotNetBar.LabelX labelX14;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxsgjl;
+ private DevComponents.DotNetBar.LabelX labelX13;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs
new file mode 100644
index 0000000..b830ce4
--- /dev/null
+++ b/FrmFlagEdits.cs
@@ -0,0 +1,89 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+
+namespace Cyberpipe
+{
+ public partial class FrmFlagEdits : Office2007Form
+ {
+ public FrmFlagEdits()
+ {
+ InitializeComponent();
+ }
+ string id = "";
+ public delegate void Handle();
+ public event Handle refresh;
+
+ public FrmFlagEdits(string id, string flagid, string flagno, string flagtype,
+ string deep, string street, string gc, string belongComp, string designComp,
+ string designer, string workComp, string worker, string monitorComp, string monitor, string remark)
+ {
+ InitializeComponent();
+ this.id = id;
+ txt_flag_id.Text = flagid;//标识器ID
+ txt_flag_no.Text = flagno;//编号
+ txt_flag_type.Text = flagtype;//标识器型号
+ textBoxXgc.Text = gc;//地面高程
+ txt_deep.Text = deep;//埋深
+ txt_street.Text = street;//所属道路
+ textBoxqsdw.Text = belongComp;//权属单位
+ textBoxsjdw.Text = designComp;//设计单位
+ textBoxsjrxm.Text = designer;
+ textBoxsgdw.Text = workComp;
+ textBoxsgzrr.Text = worker;
+ textBoxsgjl.Text = monitorComp;
+ textBoxjlzrr.Text = monitor;
+ textBoxbz.Text = remark;
+
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ double outer;
+
+ if (!double.TryParse(txt_deep.Text.Trim(), out outer))
+ {
+ MessageBox.Show("埋深取值有误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ txt_deep.Focus();
+ return;
+ }
+ string sql = "update 标识器 t " +
+ "set t.标识器id号 = '" + txt_flag_id.Text.Trim() + "'," +
+ "t.编号 = '" + txt_flag_no.Text.Trim() + "'," +
+ "t.标识器型号 = '" + txt_flag_type.Text.Trim() + "'," +
+ "t.地面高程 =" + textBoxXgc.Text.Trim() + "," +
+ "t.标识器埋深 =" + txt_deep.Text.Trim() + "," +
+ "t.所属道路 = '" + txt_street.Text.Trim() + "'," +
+ "t.权属单位 = '" + textBoxqsdw.Text.Trim() + "'," +
+ "t.设计单位 = '" + textBoxsjdw.Text.Trim() + "'," +
+ "t.设计人姓名 = '" + textBoxsjrxm.Text.Trim() + "'," +
+ "t.施工单位 = '" + textBoxsgdw.Text.Trim() + "'," +
+ "t.施工责任人 = '" + textBoxsgzrr.Text.Trim() + "'," +
+ "t.施工监理 = '" + textBoxsgjl.Text.Trim() + "'," +
+ "t.监理责任人 = '" + textBoxjlzrr.Text.Trim() + "'," +
+ "t.备注 = '" + textBoxbz.Text.Trim() + "'" +
+ "where t.LSSYS_ID =" + id;
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK)
+ {
+ this.Close();
+ refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ }
+}
diff --git a/FrmFlagEdits.resx b/FrmFlagEdits.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmFlagEdits.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ClassExecuteSQL.cs b/ClassExecuteSQL.cs
new file mode 100644
index 0000000..bee1e28
--- /dev/null
+++ b/ClassExecuteSQL.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cyberpipe
+{
+ class ClassExecuteSQL
+ {
+ }
+}
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index 90b9430..9dd7009 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -245,6 +245,42 @@
FormDocumentManager.cs
+
+ Form
+
+
+ FrmAddFlagBatch.cs
+
+
+ Form
+
+
+ FrmAddSinMark.cs
+
+
+ Form
+
+
+ FrmFlagDatabase.cs
+
+
+ Form
+
+
+ FrmFlagDetail.cs
+
+
+ Form
+
+
+ FrmFlagEdits.cs
+
+
+ Form
+
+
+ FrmFlagManagers.cs
+
Form
@@ -1152,6 +1188,24 @@
FormDocumentManager.cs
+
+ FrmAddFlagBatch.cs
+
+
+ FrmAddSinMark.cs
+
+
+ FrmFlagDatabase.cs
+
+
+ FrmFlagDetail.cs
+
+
+ FrmFlagEdits.cs
+
+
+ FrmFlagManagers.cs
+
FrmGBJCresult.cs
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index ed9584a..db17b0e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/ExpEXCEL.cs b/ExpEXCEL.cs
index 608f061..63d9a77 100644
--- a/ExpEXCEL.cs
+++ b/ExpEXCEL.cs
@@ -20,7 +20,7 @@
///
///
///
- public static void ExpToExcel(DataGridView dt, string strSaveFile,string str)
+ public static void ExpToExcel(DataGridView dt, string strSaveFile, string str)
{
//创建一个EXCEL应用程序
Application excel = new Application();
diff --git a/FrmAddFlagBatch.Designer.cs b/FrmAddFlagBatch.Designer.cs
new file mode 100644
index 0000000..fdc20a0
--- /dev/null
+++ b/FrmAddFlagBatch.Designer.cs
@@ -0,0 +1,323 @@
+namespace Cyberpipe
+{
+ partial class FrmAddFlagBatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.labelX1 = new DevComponents.DotNetBar.LabelX();
+ this.labelX2 = new DevComponents.DotNetBar.LabelX();
+ this.labelX3 = new DevComponents.DotNetBar.LabelX();
+ this.labelX4 = new DevComponents.DotNetBar.LabelX();
+ this.labelX5 = new DevComponents.DotNetBar.LabelX();
+ this.labelX6 = new DevComponents.DotNetBar.LabelX();
+ this.txt_layer_file = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.txt_layer_name = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.combo_model_name = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_model_path = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.combo_z_value = new DevComponents.DotNetBar.Controls.ComboBoxEx();
+ this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
+ this.btn_file_select = new DevComponents.DotNetBar.ButtonX();
+ this.btn_imp = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.btn_file_select);
+ this.groupPanel1.Controls.Add(this.combo_z_value);
+ this.groupPanel1.Controls.Add(this.combo_model_path);
+ this.groupPanel1.Controls.Add(this.combo_model_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_name);
+ this.groupPanel1.Controls.Add(this.txt_layer_file);
+ this.groupPanel1.Controls.Add(this.labelX6);
+ this.groupPanel1.Controls.Add(this.labelX5);
+ this.groupPanel1.Controls.Add(this.labelX4);
+ this.groupPanel1.Controls.Add(this.labelX3);
+ this.groupPanel1.Controls.Add(this.labelX2);
+ this.groupPanel1.Location = new System.Drawing.Point(0, 59);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(441, 266);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 0;
+ this.groupPanel1.Text = "导入信息";
+ //
+ // labelX1
+ //
+ this.labelX1.BackColor = System.Drawing.SystemColors.MenuText;
+ //
+ //
+ //
+ this.labelX1.BackgroundStyle.Class = "";
+ this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.labelX1.ForeColor = System.Drawing.Color.Red;
+ this.labelX1.Location = new System.Drawing.Point(0, 0);
+ this.labelX1.Name = "labelX1";
+ this.labelX1.Size = new System.Drawing.Size(441, 57);
+ this.labelX1.TabIndex = 0;
+ this.labelX1.Text = "shp字段名要求是中文字段,入库后的字段名称和shp一致。标识器模型文件夹必须和程序exe在同一个目录下";
+ this.labelX1.WordWrap = true;
+ //
+ // labelX2
+ //
+ this.labelX2.AutoSize = true;
+ this.labelX2.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX2.BackgroundStyle.Class = "";
+ this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX2.Location = new System.Drawing.Point(10, 19);
+ this.labelX2.Name = "labelX2";
+ this.labelX2.Size = new System.Drawing.Size(50, 16);
+ this.labelX2.TabIndex = 0;
+ this.labelX2.Text = "图层文件";
+ //
+ // labelX3
+ //
+ this.labelX3.AutoSize = true;
+ this.labelX3.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX3.BackgroundStyle.Class = "";
+ this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX3.Location = new System.Drawing.Point(10, 66);
+ this.labelX3.Name = "labelX3";
+ this.labelX3.Size = new System.Drawing.Size(50, 16);
+ this.labelX3.TabIndex = 1;
+ this.labelX3.Text = "图层名称";
+ //
+ // labelX4
+ //
+ this.labelX4.AutoSize = true;
+ this.labelX4.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX4.BackgroundStyle.Class = "";
+ this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX4.Location = new System.Drawing.Point(10, 113);
+ this.labelX4.Name = "labelX4";
+ this.labelX4.Size = new System.Drawing.Size(50, 16);
+ this.labelX4.TabIndex = 2;
+ this.labelX4.Text = "模型名称";
+ //
+ // labelX5
+ //
+ this.labelX5.AutoSize = true;
+ this.labelX5.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX5.BackgroundStyle.Class = "";
+ this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX5.Location = new System.Drawing.Point(10, 161);
+ this.labelX5.Name = "labelX5";
+ this.labelX5.Size = new System.Drawing.Size(50, 16);
+ this.labelX5.TabIndex = 3;
+ this.labelX5.Text = "模型路径";
+ //
+ // labelX6
+ //
+ this.labelX6.AutoSize = true;
+ this.labelX6.BackColor = System.Drawing.Color.Transparent;
+ //
+ //
+ //
+ this.labelX6.BackgroundStyle.Class = "";
+ this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.labelX6.Location = new System.Drawing.Point(10, 203);
+ this.labelX6.Name = "labelX6";
+ this.labelX6.Size = new System.Drawing.Size(44, 16);
+ this.labelX6.TabIndex = 4;
+ this.labelX6.Text = "Z坐标值";
+ //
+ // txt_layer_file
+ //
+ this.txt_layer_file.BackColor = System.Drawing.SystemColors.Control;
+ //
+ //
+ //
+ this.txt_layer_file.Border.Class = "TextBoxBorder";
+ this.txt_layer_file.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_file.Location = new System.Drawing.Point(79, 13);
+ this.txt_layer_file.Name = "txt_layer_file";
+ this.txt_layer_file.ReadOnly = true;
+ this.txt_layer_file.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_file.TabIndex = 5;
+ //
+ // txt_layer_name
+ //
+ //
+ //
+ //
+ this.txt_layer_name.Border.Class = "TextBoxBorder";
+ this.txt_layer_name.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txt_layer_name.Location = new System.Drawing.Point(79, 60);
+ this.txt_layer_name.Name = "txt_layer_name";
+ this.txt_layer_name.Size = new System.Drawing.Size(281, 21);
+ this.txt_layer_name.TabIndex = 6;
+ //
+ // combo_model_name
+ //
+ this.combo_model_name.DisplayMember = "Text";
+ this.combo_model_name.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_name.FormattingEnabled = true;
+ this.combo_model_name.ItemHeight = 15;
+ this.combo_model_name.Location = new System.Drawing.Point(79, 108);
+ this.combo_model_name.Name = "combo_model_name";
+ this.combo_model_name.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_name.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_name.TabIndex = 7;
+ //
+ // combo_model_path
+ //
+ this.combo_model_path.DisplayMember = "Text";
+ this.combo_model_path.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_model_path.FormattingEnabled = true;
+ this.combo_model_path.ItemHeight = 15;
+ this.combo_model_path.Location = new System.Drawing.Point(79, 156);
+ this.combo_model_path.Name = "combo_model_path";
+ this.combo_model_path.Size = new System.Drawing.Size(281, 21);
+ this.combo_model_path.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_model_path.TabIndex = 7;
+ //
+ // combo_z_value
+ //
+ this.combo_z_value.DisplayMember = "Text";
+ this.combo_z_value.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.combo_z_value.FormattingEnabled = true;
+ this.combo_z_value.ItemHeight = 15;
+ this.combo_z_value.Location = new System.Drawing.Point(79, 198);
+ this.combo_z_value.Name = "combo_z_value";
+ this.combo_z_value.Size = new System.Drawing.Size(281, 21);
+ this.combo_z_value.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.combo_z_value.TabIndex = 7;
+ //
+ // styleManager1
+ //
+ this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue;
+ //
+ // btn_file_select
+ //
+ this.btn_file_select.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_file_select.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_file_select.Location = new System.Drawing.Point(365, 12);
+ this.btn_file_select.Name = "btn_file_select";
+ this.btn_file_select.Size = new System.Drawing.Size(49, 23);
+ this.btn_file_select.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_file_select.TabIndex = 8;
+ this.btn_file_select.Text = "选择";
+ this.btn_file_select.Click += new System.EventHandler(this.btn_file_select_Click);
+ //
+ // btn_imp
+ //
+ this.btn_imp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btn_imp.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btn_imp.Location = new System.Drawing.Point(352, 345);
+ this.btn_imp.Name = "btn_imp";
+ this.btn_imp.Size = new System.Drawing.Size(75, 23);
+ this.btn_imp.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btn_imp.TabIndex = 1;
+ this.btn_imp.Text = "导入";
+ this.btn_imp.Click += new System.EventHandler(this.btn_imp_Click);
+ //
+ // FrmAddFlagBatch
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(441, 380);
+ this.Controls.Add(this.btn_imp);
+ this.Controls.Add(this.labelX1);
+ this.Controls.Add(this.groupPanel1);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddFlagBatch";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "批量入库";
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.ButtonX btn_file_select;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_z_value;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_path;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx combo_model_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_name;
+ private DevComponents.DotNetBar.Controls.TextBoxX txt_layer_file;
+ private DevComponents.DotNetBar.LabelX labelX6;
+ private DevComponents.DotNetBar.LabelX labelX5;
+ private DevComponents.DotNetBar.LabelX labelX4;
+ private DevComponents.DotNetBar.LabelX labelX3;
+ private DevComponents.DotNetBar.LabelX labelX2;
+ private DevComponents.DotNetBar.LabelX labelX1;
+ private DevComponents.DotNetBar.StyleManager styleManager1;
+ private DevComponents.DotNetBar.ButtonX btn_imp;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddFlagBatch.cs b/FrmAddFlagBatch.cs
new file mode 100644
index 0000000..d643245
--- /dev/null
+++ b/FrmAddFlagBatch.cs
@@ -0,0 +1,368 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using GeoScene.Globe;
+using GeoScene.Engine;
+using System.Collections;
+using GeoScene.Data;
+using System.Text.RegularExpressions;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddFlagBatch : Office2007Form
+ {
+ GSOGlobeControl globeControl1;
+ GSODataSource ds;
+ GSOLayer layer;
+ string selectLayerName = "";
+ public GSOLayer flags = null;
+ private Hashtable fm_types = new Hashtable();
+ private Hashtable fm_cns = new Hashtable();
+
+ public FrmAddFlagBatch(GSOGlobeControl _globeControl1, GSODataSource _ds)
+ {
+ InitializeComponent();
+ this.globeControl1 = _globeControl1;
+ this.ds = _ds;
+ }
+
+ private void btn_file_select_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ dlg.Filter = "*.shp|*.shp";
+ dlg.Multiselect = false;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ layer = globeControl1.Globe.Layers.Add(dlg.FileName);
+ string txtMessage = valiValvedata(layer);
+ if (txtMessage != "")
+ {
+ btn_imp.Enabled = false;
+ txt_layer_file.Text = "";
+ txt_layer_name.Text = "";
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+ globeControl1.Globe.Layers.Remove(layer);
+ FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(dlg.FileName, txtMessage);
+ showErrorMessage.Show();
+ return;
+ }
+ else
+ {
+ btn_imp.Enabled = true;
+ txt_layer_file.Text = dlg.FileName;
+ selectLayerName = layer.Caption;
+ txt_layer_name.Text = layer.Caption;
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ return;
+
+ combo_model_path.Items.Clear();
+ combo_z_value.Items.Clear();
+ combo_model_name.Items.Clear();
+
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+ combo_model_path.Items.Add(fielddef.Name);
+ combo_z_value.Items.Add(fielddef.Name);
+ combo_model_name.Items.Add(fielddef.Name);
+ }
+ combo_model_name.SelectedItem = "编号";
+ combo_z_value.SelectedItem = "标识器埋深";
+ combo_model_path.SelectedItem = "模型路径";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("SHP文件选取失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btn_imp_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(txt_layer_file.Text.Trim()))
+ {
+ MessageBox.Show("请选择一个图层文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ if (String.IsNullOrEmpty(txt_layer_name.Text.Trim()))
+ {
+ MessageBox.Show("图层名称为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ //判断是数字或者存在特殊字符串
+ string SuiD = txt_layer_name.Text.Trim();
+ Regex reg = new Regex("^[0-9]");//判断是不是数据,要不是就表示没有选择。则从隐藏域里读出来
+ Match ma = reg.Match(SuiD);
+ if (ma.Success)
+ {
+ MessageBox.Show("图层名称不能以数字开头!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+ return;
+ }
+
+ GSODataset dataset = ds.GetDatasetByName(txt_layer_name.Text.Trim());
+ GSOFeatureDataset featdataset = null;
+ if (dataset != null)
+ {
+ DialogResult result = MessageBox.Show("标识器图层名称在数据库中已存在!是否向该表追加", "提示", MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
+ {
+ featdataset = dataset as GSOFeatureDataset;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ featdataset = CreateDBFeatureDataset(txt_layer_name.Text.Trim());
+ }
+
+ featdataset.Open();
+
+ GSOLayer shpLayer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+
+ GSOFeatures features = shpLayer.GetAllFeatures(true);
+ if (dataset != null)
+ {
+ //根据编号删除数据库图层中已经存在的记录即要素
+ string sql = "delete from " + txt_layer_name.Text.Trim() + " where 编号 in (";
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ if (f != null && f.IsFieldValueNull("编号") == false)
+ {
+ string fieldID = f.GetFieldAsString("编号").Trim();
+ if (!String.IsNullOrEmpty(fieldID))
+ {
+ sql += "'" + fieldID + "',";
+ }
+ }
+ }
+ sql = sql.Substring(0, sql.Length - 1);
+ sql += ")";
+ OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql);
+ }
+
+ featdataset.Close();
+ featdataset.Open();
+
+ for (int j = 0; j < features.Length; j++)
+ {
+ GSOFeature f = features[j];
+ GSOGeoPoint3D shpPoint = f.Geometry as GSOGeoPoint3D;
+
+ //double z = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double deep = f.GetFieldAsDouble(combo_z_value.SelectedItem.ToString());
+
+ double z = deep / 100;
+
+ GSOFeature feature = featdataset.CreateFeature();
+ GSOGeoModel model = new GSOGeoModel();
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = shpPoint.X;
+ pt.Y = shpPoint.Y;
+ pt.Z = -z;
+
+ model.Position = pt;
+ //model.Align = EnumEntityAlign.TopCenter; //接口已修复作用
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ //model.FilePath = Application.StartupPath + "\\" + f.GetFieldAsString(combo_model_path.SelectedItem.ToString());
+ model.FilePath = Application.StartupPath + "\\" + "管道配件gcm\\电子标识器\\电子标识器黑.gcm";
+ model.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Name = f.GetValue(combo_model_name.SelectedItem.ToString()).ToString();
+ feature.Geometry = model;
+
+ for (int i = 0; i < feature.GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(f.GetFieldDefn(i));
+ if (fielddef == null)
+ continue;
+
+ object obu = f.GetValue(fielddef.Name);
+ if (obu != null)
+ {
+ string fieldName = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ feature.SetValue(fieldName, obu);
+ }
+ }
+ featdataset.AddFeature(feature);
+ }
+ featdataset.Save();
+ MessageBox.Show("入库成功!", "提示");
+ if (shpLayer == null)
+ {
+ globeControl1.Globe.Layers.Remove(shpLayer);
+ }
+ GSOLayer layer = globeControl1.Globe.Layers.Add(featdataset);
+ this.layer = layer;
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("批量导入失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ #region 自定义方法
+
+ private GSOFeatureDataset CreateDBFeatureDataset(string name)
+ {
+ GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(selectLayerName);
+ GSOFeatures features = layer.GetAllFeatures();
+ if (features.Length == 0)
+ {
+ MessageBox.Show("图层要素个数为0!", "提示");
+ return null;
+ }
+
+ GSOFeatureDataset featDs = ds.CreateFeatureDataset(name);
+ if (featDs == null)
+ {
+ MessageBox.Show("图层名称不符合要求!", "提示");
+ return null;
+ }
+ for (int i = 0; i < features[0].GetFieldCount(); i++)
+ {
+ GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i));
+
+ GSOFieldAttr field = new GSOFieldAttr();
+
+ field.Name = fm_cns.ContainsKey(fielddef.Name) == true ? fm_cns[fielddef.Name].ToString() : fielddef.Name;
+ switch (fielddef.Type)
+ {
+ case EnumFieldType.Text:
+ field.Type = EnumFieldType.Text;
+ field.Width = 8000;
+ break;
+ case EnumFieldType.INT32:
+ field.Type = EnumFieldType.INT32;
+ field.Width = 4;
+ break;
+ case EnumFieldType.Double:
+ field.Type = EnumFieldType.Double;
+ field.Width = 8;
+ break;
+ case EnumFieldType.Date:
+ field.Type = EnumFieldType.Date;
+ field.Width = 10;
+ break;
+ }
+ bool res = featDs.AddField(field);
+ }
+ featDs.Save();
+ return featDs;
+ }
+
+ private string valiValvedata(GSOLayer layer)
+ {
+ string txtMessage = "";
+ if (layer != null)
+ {
+ GSOFeatureDataset featDataSet = layer.Dataset as GSOFeatureDataset;
+ List lstField = new List();
+ List listFieldType_Text = new List();
+ for (int i = 0; i < featDataSet.FieldCount; i++)
+ {
+ string fieldName = featDataSet.GetField(i).Name;
+ lstField.Add(fieldName);
+ if (fm_types.ContainsKey(fieldName))
+ {
+ string fieldType = fm_types[fieldName].ToString().ToUpper();
+ switch (featDataSet.GetField(i).Type)
+ {
+ case EnumFieldType.Text:
+ if (fieldType != "string".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ listFieldType_Text.Add(fieldName);
+ break;
+ case EnumFieldType.INT32:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.INT16:
+ if (fieldType != "int".ToUpper() && fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Double:
+ if (fieldType != "double".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ case EnumFieldType.Date:
+ if (fieldType != "date".ToUpper())
+ {
+ txtMessage += "" + fieldName + "数据类型不正确\r\n";
+ }
+ break;
+ }
+ }
+
+ }
+ if (!lstField.Contains("编号"))
+ {
+ txtMessage += "编号字段不存在!\r\n";
+ }
+ if (!lstField.Contains("模型路径"))
+ {
+ txtMessage += "模型路径字段不存在!\r\n";
+ }
+ if (!lstField.Contains("标识器埋深"))
+ {
+ txtMessage += "标识器埋深字段不存在!\r\n";
+ }
+ else
+ {
+ GSOFieldAttr fieldZ = featDataSet.GetField("标识器埋深");
+ if (fieldZ.Type != EnumFieldType.Double && fieldZ.Type != EnumFieldType.Float && fieldZ.Type != EnumFieldType.INT16 && fieldZ.Type != EnumFieldType.INT32)
+ {
+ txtMessage += "\"标识器埋深\"字段必须为数值类型 \r\n";
+ }
+ }
+ for (int i = 0; i < layer.GetAllFeatures().Length; i++)
+ {
+ GSOFeature f = layer.GetAt(i);
+ for (int j = 0; j < listFieldType_Text.Count; j++)
+ {
+ string fieldName = listFieldType_Text[j];
+ if (fm_types.ContainsKey(fieldName))
+ {
+ if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
+ {
+ txtMessage += "名称为" + f.Name + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
+ }
+ }
+ }
+ }
+ }
+ return txtMessage;
+ }
+
+ #endregion
+ }
+}
diff --git a/FrmAddFlagBatch.resx b/FrmAddFlagBatch.resx
new file mode 100644
index 0000000..851991c
--- /dev/null
+++ b/FrmAddFlagBatch.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/FrmAddSinMark.cs b/FrmAddSinMark.cs
new file mode 100644
index 0000000..5b1fc08
--- /dev/null
+++ b/FrmAddSinMark.cs
@@ -0,0 +1,535 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using GeoScene.Globe;
+using GeoScene.Data;
+using GeoScene.Engine;
+using System.Runtime.InteropServices;
+using System.Data.OracleClient;
+
+namespace Cyberpipe
+{
+ public partial class FrmAddSinMark : Form
+ {
+ public GSOPlane3DControl plane3DControl;
+ private GSOGlobeControl globeControl1;
+ private GSOFeature feature;
+ GSOFeature markerFeature = null;
+ public GSOGeoPoint3D point;
+ List bhList = new List();
+ string modelPath;
+ private GSOLayer modelLayer;
+ string modelObj="TRO7红色.gcm";
+ double xValue;
+ double yValue;
+ List list = new List();
+
+ public FrmAddSinMark(GSOGlobeControl ctl)
+ {
+ InitializeComponent();
+ this.globeControl1 = ctl;
+ modelLayer = globeControl1.Globe.Layers.GetLayerByCaption("标识器");
+ this.point = new GSOGeoPoint3D(ctl.Globe.CameraState.Longitude, ctl.Globe.CameraState.Latitude, 0);
+
+ plane3DControl = new GSOPlane3DControl();
+ panel1.Controls.Add(plane3DControl);
+ plane3DControl.Dock = DockStyle.Fill;
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBox3.Text == "")
+ {
+ MessageBox.Show("请填写标识器编号!", "提示");
+ return;
+ }
+ else
+ {
+ string sql = "select count(*) from 标识器 t where t.编号='" + textBox3.Text.ToString().Trim() + "'";
+ int count = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sql).ToString());
+ if (count > 0)
+ {
+ MessageBox.Show("该标识器编号已存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ if (textBox1.Text == "")
+ {
+ MessageBox.Show("请填写标识器ID号!", "警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox4.Text == "")
+ {
+ MessageBox.Show("请填写标识对象编号!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox5.Text == "")
+ {
+ MessageBox.Show("请填写标识对象类型!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ return;
+ }
+
+ if (textBox6.Text == "")
+ {
+ MessageBox.Show("请填写标识对象名称!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (comboBox2.Text == "")
+ {
+ MessageBox.Show("请填写标识所属道路!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+
+ string mark_ID = textBox3.Text;
+ string mark_Mac = textBox1.Text;
+ string markObjCode = textBox4.Text;
+ string markObjType = textBox5.Text;
+ string markObjName = textBox6.Text;
+ string belong = textBox9.Text;
+ string bulidTime = dateTimePicker1.Value.ToString();
+ string Street = comboBox2.Text;
+ string design = textBox10.Text;
+ string designPer = textBox11.Text;
+ string buildCom = textBox12.Text;
+ string buildPer = textBox13.Text;
+ string monitor = textBox14.Text;
+ string monitorPer = textBox15.Text;
+ string mon = textBox16.Text;
+ double deep = Convert.ToDouble(textBoxX4.Text);
+ string MarkType = comboBox1.Text;
+ double elevation = Convert.ToDouble(textBoxX1.Text);
+ xValue = Convert.ToDouble(textBox7.Text);
+ yValue = Convert.ToDouble(textBox2.Text);
+ string useState = comboBox3.Text;
+ string modelPath = "管道配件gcm\\电子标识器\\" + modelObj;
+ string modelPath2 = Application.StartupPath + @"\\管道配件gcm\电子标识器\" + modelObj;
+
+
+ if (feature != null)
+ {
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ }
+
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(yValue, xValue);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID);
+
+ GSOPoint3d pt = new GSOPoint3d();
+ pt.X = point.X;
+ pt.Y = point.Y;
+ pt.Z = point.Z;
+
+ GSOPoint3d pt2 = new GSOPoint3d();
+ pt2.X = result.X;
+ pt2.Y = result.Y;
+ pt2.Z = -0.4;
+
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = modelPath2;
+ model.Position = pt2;
+ //model.AltitudeMode = EnumAltitudeMode.Absolute;
+ model.AltitudeMode = EnumAltitudeMode.RelativeToGround;
+
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ modelLayer.Editable = true;
+ //feature.
+
+ GSOFieldDefn defn = new GSOFieldDefn();
+ defn.Name = "编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+
+ feature.SetFieldValue("编号", mark_ID);
+
+ defn.Name = "标识器ID号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器ID号", mark_Mac);
+
+ defn.Name = "标识器型号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("标识器型号", MarkType);
+
+ defn.Name = "地面高程";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ elevation = Math.Round(elevation, 3);
+ feature.SetFieldValue("地面高程", elevation);
+
+ defn.Name = "X坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ xValue = Math.Round(xValue, 3);
+ feature.SetFieldValue("X坐标", xValue);
+
+ defn.Name = "Y坐标";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ yValue = Math.Round(yValue, 3);
+ feature.SetFieldValue("Y坐标", yValue);
+
+ defn.Name = "标识器埋深";
+ defn.Type = EnumFieldType.Float;
+ feature.AddField(defn);
+ deep = Convert.ToDouble(deep.ToString("0.000"));
+ deep = Math.Round(deep, 3);
+ feature.SetFieldValue("标识器埋深", deep);
+
+ defn.Name = "对象编号";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象编号", markObjCode);
+
+ defn.Name = "对象类型";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象类型", markObjType);
+
+ defn.Name = "对象名称";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("对象名称", markObjName);
+
+ defn.Name = "埋设时间";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("埋设时间", bulidTime);
+
+ defn.Name = "所属道路";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("所属道路", comboBox2.Text);
+
+ defn.Name = "使用状态";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("使用状态", useState);
+
+ defn.Name = "权属单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("权属单位", belong);
+
+ defn.Name = "设计单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计单位", design);
+
+ defn.Name = "设计人姓名";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("设计人姓名", designPer);
+
+ defn.Name = "施工单位";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工单位", buildCom);
+
+ defn.Name = "施工责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工责任人", buildPer);
+
+ defn.Name = "施工监理";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("施工监理", monitor);
+
+ defn.Name = "监理责任人";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("监理责任人", monitorPer);
+
+ defn.Name = "模型路径";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("模型路径", modelPath);
+
+ defn.Name = "备注";
+ defn.Type = EnumFieldType.Text;
+ defn.Width = 100;
+ feature.AddField(defn);
+ feature.SetFieldValue("备注", mon);
+ modelLayer.AddFeature(feature);
+
+ globeControl1.Globe.JumpToFeature(feature, 2.5);
+ globeControl1.Refresh();
+ modelLayer.Save();
+ modelLayer.Editable = false;
+ MessageBox.Show("标识器添加成功!", "提示");
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("请指定模型规格!", "提示");
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("标识器添加失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+
+ private void listBoxSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBoxSize.SelectedIndex != -1)
+ {
+ string path = Application.StartupPath + @"\\管道配件gcm\\电子标识器\\" + list[listBoxSize.SelectedIndex];
+ modelObj=list[listBoxSize.SelectedIndex];
+ GSOGeoModel model = new GSOGeoModel();
+ model.FilePath = path;
+ modelPath = path;
+ model.SetPosition(0, 0, 0);
+ feature = new GSOFeature();
+ feature.Geometry = model;
+ feature.Geometry.LatLonCoord = false;
+ feature.HighLight = false;
+ this.plane3DControl.Plane3DScene.RemoveAllFeature();
+ this.plane3DControl.Plane3DScene.AddFeature(feature);
+ }
+ }
+
+ private void FrmAddSinMark_Load(object sender, EventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick += new MouseEventHandler(globeControl1_MouseClick);
+ }
+ this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+ if (point != null)
+ {
+ textBoxXLon.Text = point.X.ToString();
+ textBoxXLat.Text = point.Y.ToString();
+
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Application.StartupPath + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ string path = Application.StartupPath + @"\管道配件gcm\";
+ DirectoryInfo theFolder = new DirectoryInfo(path);
+ if (!theFolder.Exists)
+ {
+ MessageBox.Show("文件夹【" + path + "】不存在!", "提示");
+ }
+
+ listBoxSize.Items.Clear();
+ list.Clear();
+ string path1 = Application.StartupPath + @"\管道配件gcm\" + "电子标识器" + @"\";
+ DirectoryInfo theFolder1 = new DirectoryInfo(path1);
+ foreach (FileInfo nextFile in theFolder1.GetFiles())
+ {
+ if (nextFile.Name.IndexOf("3DS") > -1 || nextFile.Name.IndexOf("gcm") > -1)
+ {
+ this.listBoxSize.Items.Add(nextFile.Name.Substring(0, nextFile.Name.IndexOf(".")));
+ list.Add(nextFile.Name);
+ }
+ }
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox1.Items.Add("BIRMM-EM14");
+ comboBox1.Items.Add("BIRMM-EM30");
+ comboBox1.Text = "BIRMM-EM14";
+
+ comboBox3.DropDownStyle = ComboBoxStyle.DropDown;
+ comboBox3.Items.Add("使用中");
+ comboBox3.Items.Add("废弃");
+ comboBox3.Text = "使用中";
+
+ comboBox2.DropDownStyle = ComboBoxStyle.DropDown;
+ foreach (Location l in Utility.locationList)
+ comboBox2.Items.Add(l.NAME);
+
+ textBox9.Text = "管委会";
+ textBox10.Text = "北京无线电计量测试研究所";
+ textBoxX1.Text = "0";
+ textBoxX4.Text = "0.4";
+ }
+
+ private void globeControl1_MouseClick(object sender, MouseEventArgs e)
+ {
+ try
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ GSOPoint3d p = globeControl1.Globe.ScreenToScene(e.X, e.Y);
+ textBoxXLon.Text = p.X.ToString();
+ textBoxXLat.Text = p.Y.ToString();
+
+ point.X = p.X;
+ point.Y = p.Y;
+ if (markerFeature != null && markerFeature.Geometry != null)
+ {
+ GSOGeoMarker marker = markerFeature.Geometry as GSOGeoMarker;
+ marker.SetPosition(point.X, point.Y, point.Z);//设定位置点
+ }
+ else
+ {
+ markerFeature = new GSOFeature();
+ GSOGeoMarker marker = new GSOGeoMarker();
+ GSOMarkerStyle3D style = new GSOMarkerStyle3D();
+ style.IconPath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/CrossIcon.png";
+ marker.Style = style;
+ marker.SetPosition(point.X, point.Y, point.Z);
+ marker.AltitudeMode = EnumAltitudeMode.ClampToGround;
+ markerFeature.Name = "目标点";
+ markerFeature.CustomID = 001;
+ markerFeature.Geometry = marker;
+ globeControl1.Globe.MemoryLayer.AddFeature(markerFeature);
+ }
+ globeControl1.Refresh();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("运行错误:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ //经度
+ private void textBoxXLon_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLon.Text.Trim() != "" && textBoxXLat.Text.Trim() != "")
+ {
+ string longitude = textBoxXLon.Text.Trim();
+ double dLon = 0.0;
+ if (!double.TryParse(longitude, out dLon))
+ {
+ textBoxXLon.Text = "";
+ }
+ else
+ {
+ if (dLon > 180)
+ {
+ textBoxXLon.Text = 180 + "";
+ point.X = 180;
+ }
+ else if (dLon < -180)
+ {
+ textBoxXLon.Text = -180 + "";
+ point.X = -180;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = 0;
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ //textBoxX3.Text = result.Y.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("X坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ //纬度
+ private void textBoxXLat_TextChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (textBoxXLat.Text.Trim() != "" && textBoxXLon.Text.Trim() != "")
+ {
+ string latitude = textBoxXLat.Text.Trim();
+ double dLat = 0.0;
+ if (!double.TryParse(latitude, out dLat))
+ {
+ textBoxXLat.Text = "";
+ }
+ else
+ {
+ if (dLat > 90)
+ {
+ textBoxXLat.Text = 90 + "";
+ point.Y = 90;
+ }
+ else if (dLat < -90)
+ {
+ textBoxXLat.Text = -90 + "";
+ point.Y = -90;
+ }
+ }
+ int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
+ double x = Convert.ToDouble(textBoxXLon.Text);
+ double y = Convert.ToDouble(textBoxXLat.Text);
+ GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(x, y);
+ GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, ID);
+ textBox7.Text = result.Y.ToString();
+ textBox2.Text = result.X.ToString();
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Y坐标转换失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void FrmAddSinMark_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (globeControl1 != null)
+ {
+ globeControl1.MouseClick -= new MouseEventHandler(globeControl1_MouseClick);
+ }
+ if (markerFeature != null)
+ {
+ markerFeature.Delete();
+ globeControl1.Refresh();
+ }
+ }
+
+ }
+}
diff --git a/FrmAddSinMark.designer.cs b/FrmAddSinMark.designer.cs
new file mode 100644
index 0000000..2e2fed3
--- /dev/null
+++ b/FrmAddSinMark.designer.cs
@@ -0,0 +1,823 @@
+namespace Cyberpipe
+{
+ partial class FrmAddSinMark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.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()
+ {
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.btnAdd = new DevComponents.DotNetBar.ButtonX();
+ this.listBoxSize = new System.Windows.Forms.ListBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupPanel1 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBoxXLat = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxXLon = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.labelLat = new System.Windows.Forms.Label();
+ this.groupPanel3 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.textBox7 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label22 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.labelLon = new System.Windows.Forms.Label();
+ this.groupPanel2 = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.comboBox2 = new System.Windows.Forms.ComboBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.comboBox3 = new System.Windows.Forms.ComboBox();
+ this.textBox16 = new System.Windows.Forms.TextBox();
+ this.textBox15 = new System.Windows.Forms.TextBox();
+ this.textBox14 = new System.Windows.Forms.TextBox();
+ this.textBox13 = new System.Windows.Forms.TextBox();
+ this.textBox12 = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.textBox11 = new System.Windows.Forms.TextBox();
+ this.textBox10 = new System.Windows.Forms.TextBox();
+ this.textBox9 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label18 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.groupPanel1.SuspendLayout();
+ this.groupPanel3.SuspendLayout();
+ this.groupPanel2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.Location = new System.Drawing.Point(189, 514);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 18;
+ this.btnCancel.Text = "关闭";
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnAdd.Location = new System.Drawing.Point(43, 514);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnAdd.TabIndex = 17;
+ this.btnAdd.Text = "添加";
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // listBoxSize
+ //
+ this.listBoxSize.FormattingEnabled = true;
+ this.listBoxSize.ItemHeight = 12;
+ this.listBoxSize.Location = new System.Drawing.Point(72, 9);
+ this.listBoxSize.Name = "listBoxSize";
+ this.listBoxSize.Size = new System.Drawing.Size(177, 112);
+ this.listBoxSize.TabIndex = 8;
+ this.listBoxSize.SelectedIndexChanged += new System.EventHandler(this.listBoxSize_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.Font = new System.Drawing.Font("宋体", 9F);
+ this.label2.Location = new System.Drawing.Point(6, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(65, 12);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "模型规格:";
+ //
+ // groupPanel1
+ //
+ this.groupPanel1.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel1.Controls.Add(this.listBoxSize);
+ this.groupPanel1.Controls.Add(this.label2);
+ this.groupPanel1.Location = new System.Drawing.Point(12, 70);
+ this.groupPanel1.Name = "groupPanel1";
+ this.groupPanel1.Size = new System.Drawing.Size(268, 136);
+ //
+ //
+ //
+ this.groupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel1.Style.BackColorGradientAngle = 90;
+ this.groupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderBottomWidth = 1;
+ this.groupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderLeftWidth = 1;
+ this.groupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderRightWidth = 1;
+ this.groupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel1.Style.BorderTopWidth = 1;
+ this.groupPanel1.Style.Class = "";
+ this.groupPanel1.Style.CornerDiameter = 4;
+ this.groupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseDown.Class = "";
+ this.groupPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel1.StyleMouseOver.Class = "";
+ this.groupPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel1.TabIndex = 19;
+ //
+ // textBoxXLat
+ //
+ //
+ //
+ //
+ this.textBoxXLat.Border.Class = "TextBoxBorder";
+ this.textBoxXLat.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLat.Location = new System.Drawing.Point(229, 2);
+ this.textBoxXLat.Name = "textBoxXLat";
+ this.textBoxXLat.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLat.TabIndex = 3;
+ this.textBoxXLat.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxXLon
+ //
+ //
+ //
+ //
+ this.textBoxXLon.Border.Class = "TextBoxBorder";
+ this.textBoxXLon.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxXLon.Location = new System.Drawing.Point(46, 2);
+ this.textBoxXLon.Name = "textBoxXLon";
+ this.textBoxXLon.Size = new System.Drawing.Size(128, 21);
+ this.textBoxXLon.TabIndex = 2;
+ this.textBoxXLon.TextChanged += new System.EventHandler(this.textBoxXLon_TextChanged);
+ //
+ // labelLat
+ //
+ this.labelLat.AutoSize = true;
+ this.labelLat.BackColor = System.Drawing.Color.Transparent;
+ this.labelLat.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLat.Location = new System.Drawing.Point(183, 9);
+ this.labelLat.Name = "labelLat";
+ this.labelLat.Size = new System.Drawing.Size(41, 12);
+ this.labelLat.TabIndex = 1;
+ this.labelLat.Text = "纬度:";
+ //
+ // groupPanel3
+ //
+ this.groupPanel3.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel3.Controls.Add(this.textBox7);
+ this.groupPanel3.Controls.Add(this.textBox2);
+ this.groupPanel3.Controls.Add(this.textBoxX4);
+ this.groupPanel3.Controls.Add(this.textBoxX1);
+ this.groupPanel3.Controls.Add(this.textBoxXLat);
+ this.groupPanel3.Controls.Add(this.textBoxXLon);
+ this.groupPanel3.Controls.Add(this.label22);
+ this.groupPanel3.Controls.Add(this.label5);
+ this.groupPanel3.Controls.Add(this.label21);
+ this.groupPanel3.Controls.Add(this.labelLat);
+ this.groupPanel3.Controls.Add(this.label20);
+ this.groupPanel3.Controls.Add(this.labelLon);
+ this.groupPanel3.Location = new System.Drawing.Point(12, 5);
+ this.groupPanel3.Name = "groupPanel3";
+ this.groupPanel3.Size = new System.Drawing.Size(591, 59);
+ //
+ //
+ //
+ this.groupPanel3.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel3.Style.BackColorGradientAngle = 90;
+ this.groupPanel3.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel3.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderBottomWidth = 1;
+ this.groupPanel3.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel3.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderLeftWidth = 1;
+ this.groupPanel3.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderRightWidth = 1;
+ this.groupPanel3.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel3.Style.BorderTopWidth = 1;
+ this.groupPanel3.Style.Class = "";
+ this.groupPanel3.Style.CornerDiameter = 4;
+ this.groupPanel3.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel3.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel3.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel3.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseDown.Class = "";
+ this.groupPanel3.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel3.StyleMouseOver.Class = "";
+ this.groupPanel3.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel3.TabIndex = 20;
+ //
+ // textBox7
+ //
+ this.textBox7.Location = new System.Drawing.Point(46, 29);
+ this.textBox7.Name = "textBox7";
+ this.textBox7.Size = new System.Drawing.Size(128, 21);
+ this.textBox7.TabIndex = 0;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(229, 28);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(128, 21);
+ this.textBox2.TabIndex = 0;
+ //
+ // textBoxX4
+ //
+ //
+ //
+ //
+ this.textBoxX4.Border.Class = "TextBoxBorder";
+ this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX4.Location = new System.Drawing.Point(451, 27);
+ this.textBoxX4.Name = "textBoxX4";
+ this.textBoxX4.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX4.TabIndex = 3;
+ this.textBoxX4.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // textBoxX1
+ //
+ //
+ //
+ //
+ this.textBoxX1.Border.Class = "TextBoxBorder";
+ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.textBoxX1.Location = new System.Drawing.Point(451, 2);
+ this.textBoxX1.Name = "textBoxX1";
+ this.textBoxX1.Size = new System.Drawing.Size(128, 21);
+ this.textBoxX1.TabIndex = 3;
+ this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxXLat_TextChanged);
+ //
+ // label22
+ //
+ this.label22.AutoSize = true;
+ this.label22.BackColor = System.Drawing.Color.Transparent;
+ this.label22.Font = new System.Drawing.Font("宋体", 9F);
+ this.label22.Location = new System.Drawing.Point(380, 30);
+ this.label22.Name = "label22";
+ this.label22.Size = new System.Drawing.Size(65, 12);
+ this.label22.TabIndex = 1;
+ this.label22.Text = "标识埋深:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.Transparent;
+ this.label5.Font = new System.Drawing.Font("宋体", 9F);
+ this.label5.Location = new System.Drawing.Point(380, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 1;
+ this.label5.Text = "地面高程:";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.BackColor = System.Drawing.Color.Transparent;
+ this.label21.Font = new System.Drawing.Font("宋体", 9F);
+ this.label21.Location = new System.Drawing.Point(183, 31);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(47, 12);
+ this.label21.TabIndex = 1;
+ this.label21.Text = "Y坐标:";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.BackColor = System.Drawing.Color.Transparent;
+ this.label20.Font = new System.Drawing.Font("宋体", 9F);
+ this.label20.Location = new System.Drawing.Point(3, 33);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 12);
+ this.label20.TabIndex = 1;
+ this.label20.Text = "X坐标:";
+ //
+ // labelLon
+ //
+ this.labelLon.AutoSize = true;
+ this.labelLon.BackColor = System.Drawing.Color.Transparent;
+ this.labelLon.Font = new System.Drawing.Font("宋体", 9F);
+ this.labelLon.Location = new System.Drawing.Point(3, 9);
+ this.labelLon.Name = "labelLon";
+ this.labelLon.Size = new System.Drawing.Size(41, 12);
+ this.labelLon.TabIndex = 1;
+ this.labelLon.Text = "经度:";
+ //
+ // groupPanel2
+ //
+ this.groupPanel2.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanel2.Controls.Add(this.panel1);
+ this.groupPanel2.Location = new System.Drawing.Point(12, 222);
+ this.groupPanel2.Name = "groupPanel2";
+ this.groupPanel2.Size = new System.Drawing.Size(271, 277);
+ //
+ //
+ //
+ this.groupPanel2.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanel2.Style.BackColorGradientAngle = 90;
+ this.groupPanel2.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanel2.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderBottomWidth = 1;
+ this.groupPanel2.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanel2.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderLeftWidth = 1;
+ this.groupPanel2.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderRightWidth = 1;
+ this.groupPanel2.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanel2.Style.BorderTopWidth = 1;
+ this.groupPanel2.Style.Class = "";
+ this.groupPanel2.Style.CornerDiameter = 4;
+ this.groupPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanel2.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanel2.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanel2.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseDown.Class = "";
+ this.groupPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupPanel2.StyleMouseOver.Class = "";
+ this.groupPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupPanel2.TabIndex = 21;
+ this.groupPanel2.Text = "模型预览";
+ //
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(265, 253);
+ this.panel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.dateTimePicker1);
+ this.groupBox1.Controls.Add(this.comboBox2);
+ this.groupBox1.Controls.Add(this.comboBox1);
+ this.groupBox1.Controls.Add(this.comboBox3);
+ this.groupBox1.Controls.Add(this.textBox16);
+ this.groupBox1.Controls.Add(this.textBox15);
+ this.groupBox1.Controls.Add(this.textBox14);
+ this.groupBox1.Controls.Add(this.textBox13);
+ this.groupBox1.Controls.Add(this.textBox12);
+ this.groupBox1.Controls.Add(this.label19);
+ this.groupBox1.Controls.Add(this.textBox11);
+ this.groupBox1.Controls.Add(this.textBox10);
+ this.groupBox1.Controls.Add(this.textBox9);
+ this.groupBox1.Controls.Add(this.textBox6);
+ this.groupBox1.Controls.Add(this.textBox5);
+ this.groupBox1.Controls.Add(this.textBox4);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Controls.Add(this.textBox3);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Controls.Add(this.label18);
+ this.groupBox1.Controls.Add(this.label17);
+ this.groupBox1.Controls.Add(this.label16);
+ this.groupBox1.Controls.Add(this.label15);
+ this.groupBox1.Controls.Add(this.label14);
+ this.groupBox1.Controls.Add(this.label13);
+ this.groupBox1.Controls.Add(this.label12);
+ this.groupBox1.Controls.Add(this.label11);
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Location = new System.Drawing.Point(304, 70);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(299, 480);
+ this.groupBox1.TabIndex = 22;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "标识属性";
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(94, 185);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
+ this.dateTimePicker1.TabIndex = 23;
+ this.dateTimePicker1.Value = new System.DateTime(2014, 4, 4, 8, 25, 0, 0);
+ //
+ // comboBox2
+ //
+ this.comboBox2.FormattingEnabled = true;
+ this.comboBox2.Location = new System.Drawing.Point(93, 215);
+ this.comboBox2.Name = "comboBox2";
+ this.comboBox2.Size = new System.Drawing.Size(186, 20);
+ this.comboBox2.TabIndex = 5;
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(94, 79);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(186, 20);
+ this.comboBox1.TabIndex = 5;
+ //
+ // comboBox3
+ //
+ this.comboBox3.FormattingEnabled = true;
+ this.comboBox3.Location = new System.Drawing.Point(95, 241);
+ this.comboBox3.Name = "comboBox3";
+ this.comboBox3.Size = new System.Drawing.Size(185, 20);
+ this.comboBox3.TabIndex = 5;
+ //
+ // textBox16
+ //
+ this.textBox16.Location = new System.Drawing.Point(96, 446);
+ this.textBox16.Name = "textBox16";
+ this.textBox16.Size = new System.Drawing.Size(184, 21);
+ this.textBox16.TabIndex = 3;
+ //
+ // textBox15
+ //
+ this.textBox15.Location = new System.Drawing.Point(96, 419);
+ this.textBox15.Name = "textBox15";
+ this.textBox15.Size = new System.Drawing.Size(184, 21);
+ this.textBox15.TabIndex = 3;
+ //
+ // textBox14
+ //
+ this.textBox14.Location = new System.Drawing.Point(96, 395);
+ this.textBox14.Name = "textBox14";
+ this.textBox14.Size = new System.Drawing.Size(184, 21);
+ this.textBox14.TabIndex = 3;
+ //
+ // textBox13
+ //
+ this.textBox13.Location = new System.Drawing.Point(95, 370);
+ this.textBox13.Name = "textBox13";
+ this.textBox13.Size = new System.Drawing.Size(185, 21);
+ this.textBox13.TabIndex = 3;
+ //
+ // textBox12
+ //
+ this.textBox12.Location = new System.Drawing.Point(96, 346);
+ this.textBox12.Name = "textBox12";
+ this.textBox12.Size = new System.Drawing.Size(184, 21);
+ this.textBox12.TabIndex = 3;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Location = new System.Drawing.Point(19, 451);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(41, 12);
+ this.label19.TabIndex = 2;
+ this.label19.Text = "备注:";
+ //
+ // textBox11
+ //
+ this.textBox11.Location = new System.Drawing.Point(96, 321);
+ this.textBox11.Name = "textBox11";
+ this.textBox11.Size = new System.Drawing.Size(184, 21);
+ this.textBox11.TabIndex = 3;
+ //
+ // textBox10
+ //
+ this.textBox10.Location = new System.Drawing.Point(96, 294);
+ this.textBox10.Name = "textBox10";
+ this.textBox10.Size = new System.Drawing.Size(184, 21);
+ this.textBox10.TabIndex = 3;
+ //
+ // textBox9
+ //
+ this.textBox9.Location = new System.Drawing.Point(95, 267);
+ this.textBox9.Name = "textBox9";
+ this.textBox9.Size = new System.Drawing.Size(185, 21);
+ this.textBox9.TabIndex = 3;
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(95, 158);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(185, 21);
+ this.textBox6.TabIndex = 3;
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(95, 132);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(185, 21);
+ this.textBox5.TabIndex = 3;
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(95, 105);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(185, 21);
+ this.textBox4.TabIndex = 3;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(94, 47);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(186, 21);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(94, 18);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(186, 21);
+ this.textBox3.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(15, 54);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(77, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "标识器ID号:";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Location = new System.Drawing.Point(16, 426);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(77, 12);
+ this.label18.TabIndex = 2;
+ this.label18.Text = "监理责任人:";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Location = new System.Drawing.Point(16, 401);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(65, 12);
+ this.label17.TabIndex = 2;
+ this.label17.Text = "施工监理:";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(16, 375);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(77, 12);
+ this.label16.TabIndex = 2;
+ this.label16.Text = "施工责任人:";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(16, 353);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(65, 12);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "施工单位:";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(16, 328);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(77, 12);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "设计人姓名:";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(16, 301);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(65, 12);
+ this.label13.TabIndex = 2;
+ this.label13.Text = "设计单位:";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(16, 271);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(65, 12);
+ this.label12.TabIndex = 2;
+ this.label12.Text = "权属单位:";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(15, 245);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(65, 12);
+ this.label11.TabIndex = 2;
+ this.label11.Text = "使用状态:";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(15, 218);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(65, 12);
+ this.label10.TabIndex = 2;
+ this.label10.Text = "所属道路:";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(16, 192);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(65, 12);
+ this.label9.TabIndex = 2;
+ this.label9.Text = "埋设时间:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(16, 164);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(65, 12);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "对象名称:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(16, 139);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 2;
+ this.label6.Text = "对象类型:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(15, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 2;
+ this.label4.Text = "对象编号:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(15, 85);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(77, 12);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "标识器型号:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(15, 24);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(41, 12);
+ this.label7.TabIndex = 2;
+ this.label7.Text = "编号:";
+ //
+ // FrmAddSinMark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
+ this.ClientSize = new System.Drawing.Size(606, 556);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupPanel2);
+ this.Controls.Add(this.groupPanel3);
+ this.Controls.Add(this.groupPanel1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "FrmAddSinMark";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "单个标识器添加";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddSinMark_FormClosing);
+ this.Load += new System.EventHandler(this.FrmAddSinMark_Load);
+ this.groupPanel1.ResumeLayout(false);
+ this.groupPanel1.PerformLayout();
+ this.groupPanel3.ResumeLayout(false);
+ this.groupPanel3.PerformLayout();
+ this.groupPanel2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private DevComponents.DotNetBar.ButtonX btnAdd;
+ private System.Windows.Forms.ListBox listBoxSize;
+ private System.Windows.Forms.Label label2;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLat;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxXLon;
+ private System.Windows.Forms.Label labelLat;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3;
+ private System.Windows.Forms.Label labelLon;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanel2;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label7;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox9;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox textBox15;
+ private System.Windows.Forms.TextBox textBox14;
+ private System.Windows.Forms.TextBox textBox13;
+ private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox textBox10;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.TextBox textBox16;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4;
+ private System.Windows.Forms.Label label22;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox7;
+ private System.Windows.Forms.ComboBox comboBox2;
+
+ }
+}
\ No newline at end of file
diff --git a/FrmAddSinMark.resx b/FrmAddSinMark.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/FrmAddSinMark.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+