diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/FrmMultiPipelineModelDB.Designer.cs b/FrmMultiPipelineModelDB.Designer.cs
deleted file mode 100644
index 8aa77b0..0000000
--- a/FrmMultiPipelineModelDB.Designer.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-namespace Cyberpipe
-{
- partial class FrmMultiPipelineModelDB
- {
- ///
- /// 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.label7 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBoxCornerSliceAngle = new System.Windows.Forms.TextBox();
- this.numericUpDownLineOpaque = new System.Windows.Forms.NumericUpDown();
- this.txtSlice = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.cmbRadius = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.cmbTo = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbFrom = new System.Windows.Forms.ComboBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.btnClose = new System.Windows.Forms.Button();
- this.btnCreateModel = new System.Windows.Forms.Button();
- this.textBoxNewLayerName = new System.Windows.Forms.TextBox();
- this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxShpLayerList = new System.Windows.Forms.ComboBox();
- this.colorDialog1 = new System.Windows.Forms.ColorDialog();
- this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.cmbID = new System.Windows.Forms.ComboBox();
- this.label11 = new System.Windows.Forms.Label();
- this.chkDeep = new System.Windows.Forms.CheckBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.cmbReference = new System.Windows.Forms.ComboBox();
- this.cmbWidthNum = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.cmbHeightNum = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.numOpaqueRect = new System.Windows.Forms.NumericUpDown();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.btnRectColor = new System.Windows.Forms.Button();
- this.pipelineTypeCbo = new DevComponents.DotNetBar.Controls.ComboBoxEx();
- this.label17 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).BeginInit();
- this.SuspendLayout();
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Location = new System.Drawing.Point(360, 395);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(17, 12);
- this.label7.TabIndex = 71;
- this.label7.Text = "度";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.BackColor = System.Drawing.Color.Transparent;
- this.label9.Location = new System.Drawing.Point(21, 393);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(77, 12);
- this.label9.TabIndex = 70;
- this.label9.Text = "拐弯平滑度:";
- //
- // textBoxCornerSliceAngle
- //
- this.textBoxCornerSliceAngle.Location = new System.Drawing.Point(131, 390);
- this.textBoxCornerSliceAngle.Name = "textBoxCornerSliceAngle";
- this.textBoxCornerSliceAngle.Size = new System.Drawing.Size(225, 21);
- this.textBoxCornerSliceAngle.TabIndex = 69;
- this.textBoxCornerSliceAngle.Text = "10";
- //
- // numericUpDownLineOpaque
- //
- this.numericUpDownLineOpaque.Location = new System.Drawing.Point(131, 334);
- this.numericUpDownLineOpaque.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numericUpDownLineOpaque.Name = "numericUpDownLineOpaque";
- this.numericUpDownLineOpaque.Size = new System.Drawing.Size(225, 21);
- this.numericUpDownLineOpaque.TabIndex = 68;
- this.numericUpDownLineOpaque.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- //
- // txtSlice
- //
- this.txtSlice.Location = new System.Drawing.Point(131, 362);
- this.txtSlice.Name = "txtSlice";
- this.txtSlice.Size = new System.Drawing.Size(224, 21);
- this.txtSlice.TabIndex = 67;
- this.txtSlice.Text = "24";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(20, 365);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(77, 12);
- this.label8.TabIndex = 65;
- this.label8.Text = "截面分段数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.BackColor = System.Drawing.Color.Transparent;
- this.label10.Location = new System.Drawing.Point(21, 336);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(53, 12);
- this.label10.TabIndex = 66;
- this.label10.Text = "透明度:";
- //
- // cmbRadius
- //
- this.cmbRadius.FormattingEnabled = true;
- this.cmbRadius.Location = new System.Drawing.Point(130, 196);
- this.cmbRadius.Name = "cmbRadius";
- this.cmbRadius.Size = new System.Drawing.Size(226, 20);
- this.cmbRadius.TabIndex = 64;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(20, 309);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 62;
- this.label6.Text = "管道颜色:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(20, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 63;
- this.label5.Text = "管径字段:";
- //
- // cmbTo
- //
- this.cmbTo.FormattingEnabled = true;
- this.cmbTo.Location = new System.Drawing.Point(130, 125);
- this.cmbTo.Name = "cmbTo";
- this.cmbTo.Size = new System.Drawing.Size(226, 20);
- this.cmbTo.TabIndex = 61;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(24, 132);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 60;
- this.label4.Text = "终点埋深:";
- //
- // cmbFrom
- //
- this.cmbFrom.FormattingEnabled = true;
- this.cmbFrom.Location = new System.Drawing.Point(129, 97);
- this.cmbFrom.Name = "cmbFrom";
- this.cmbFrom.Size = new System.Drawing.Size(226, 20);
- this.cmbFrom.TabIndex = 59;
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(14, 479);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(380, 2);
- this.groupBox1.TabIndex = 58;
- this.groupBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 103);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 12);
- this.label3.TabIndex = 55;
- this.label3.Text = "起点埋深:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(20, 72);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(89, 12);
- this.label2.TabIndex = 56;
- this.label2.Text = "管线图层名称:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(20, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(95, 12);
- this.label1.TabIndex = 57;
- this.label1.Text = "Shapefile图层:";
- //
- // btnClose
- //
- this.btnClose.Location = new System.Drawing.Point(282, 490);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 53;
- this.btnClose.Text = "关闭(&C)";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // btnCreateModel
- //
- this.btnCreateModel.Location = new System.Drawing.Point(199, 490);
- this.btnCreateModel.Name = "btnCreateModel";
- this.btnCreateModel.Size = new System.Drawing.Size(74, 23);
- this.btnCreateModel.TabIndex = 54;
- this.btnCreateModel.Text = "建模(&M)";
- this.btnCreateModel.UseVisualStyleBackColor = true;
- this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
- //
- // textBoxNewLayerName
- //
- this.textBoxNewLayerName.Location = new System.Drawing.Point(129, 67);
- this.textBoxNewLayerName.Name = "textBoxNewLayerName";
- this.textBoxNewLayerName.Size = new System.Drawing.Size(226, 21);
- this.textBoxNewLayerName.TabIndex = 51;
- //
- // btnPipelineColor
- //
- this.btnPipelineColor.BackColor = System.Drawing.Color.Gainsboro;
- this.btnPipelineColor.Location = new System.Drawing.Point(130, 304);
- this.btnPipelineColor.Name = "btnPipelineColor";
- this.btnPipelineColor.Size = new System.Drawing.Size(226, 23);
- this.btnPipelineColor.TabIndex = 48;
- this.btnPipelineColor.UseVisualStyleBackColor = false;
- this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
- //
- // comboBoxShpLayerList
- //
- this.comboBoxShpLayerList.FormattingEnabled = true;
- this.comboBoxShpLayerList.Location = new System.Drawing.Point(129, 11);
- this.comboBoxShpLayerList.Name = "comboBoxShpLayerList";
- this.comboBoxShpLayerList.Size = new System.Drawing.Size(226, 20);
- this.comboBoxShpLayerList.TabIndex = 72;
- this.comboBoxShpLayerList.SelectedIndexChanged += new System.EventHandler(this.cmbLayer_SelectedIndexChanged);
- //
- // cmbID
- //
- this.cmbID.FormattingEnabled = true;
- this.cmbID.Location = new System.Drawing.Point(130, 223);
- this.cmbID.Name = "cmbID";
- this.cmbID.Size = new System.Drawing.Size(226, 20);
- this.cmbID.TabIndex = 74;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(22, 227);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 73;
- this.label11.Text = "ID字段:";
- //
- // chkDeep
- //
- this.chkDeep.AutoSize = true;
- this.chkDeep.Location = new System.Drawing.Point(130, 150);
- this.chkDeep.Name = "chkDeep";
- this.chkDeep.Size = new System.Drawing.Size(144, 16);
- this.chkDeep.TabIndex = 75;
- this.chkDeep.Text = "埋深是否转换为相反数";
- this.chkDeep.UseVisualStyleBackColor = true;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(359, 200);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(29, 12);
- this.label12.TabIndex = 76;
- this.label12.Text = "毫米";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(20, 172);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(77, 12);
- this.label13.TabIndex = 63;
- this.label13.Text = "埋深参考点:";
- //
- // cmbReference
- //
- this.cmbReference.FormattingEnabled = true;
- this.cmbReference.Items.AddRange(new object[] {
- "管底",
- "管顶"});
- this.cmbReference.Location = new System.Drawing.Point(130, 168);
- this.cmbReference.Name = "cmbReference";
- this.cmbReference.Size = new System.Drawing.Size(226, 20);
- this.cmbReference.TabIndex = 64;
- //
- // cmbWidthNum
- //
- this.cmbWidthNum.FormattingEnabled = true;
- this.cmbWidthNum.Location = new System.Drawing.Point(131, 250);
- this.cmbWidthNum.Name = "cmbWidthNum";
- this.cmbWidthNum.Size = new System.Drawing.Size(226, 20);
- this.cmbWidthNum.TabIndex = 78;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(22, 254);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 77;
- this.label14.Text = "横向个数字段:";
- //
- // cmbHeightNum
- //
- this.cmbHeightNum.FormattingEnabled = true;
- this.cmbHeightNum.Location = new System.Drawing.Point(131, 277);
- this.cmbHeightNum.Name = "cmbHeightNum";
- this.cmbHeightNum.Size = new System.Drawing.Size(226, 20);
- this.cmbHeightNum.TabIndex = 80;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(22, 280);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(89, 12);
- this.label15.TabIndex = 79;
- this.label15.Text = "纵向个数字段:";
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(430, 246);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 81;
- this.label16.Text = "间距字段:";
- //
- // numOpaqueRect
- //
- this.numOpaqueRect.Location = new System.Drawing.Point(132, 451);
- this.numOpaqueRect.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numOpaqueRect.Name = "numOpaqueRect";
- this.numOpaqueRect.Size = new System.Drawing.Size(225, 21);
- this.numOpaqueRect.TabIndex = 88;
- this.numOpaqueRect.Value = new decimal(new int[] {
- 125,
- 0,
- 0,
- 0});
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Location = new System.Drawing.Point(24, 455);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(53, 12);
- this.label21.TabIndex = 87;
- this.label21.Text = "透明度:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(22, 424);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(65, 12);
- this.label22.TabIndex = 84;
- this.label22.Text = "管沟颜色:";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(430, 291);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(77, 12);
- this.label23.TabIndex = 85;
- this.label23.Text = "管沟宽字段:";
- //
- // btnRectColor
- //
- this.btnRectColor.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.btnRectColor.Location = new System.Drawing.Point(131, 419);
- this.btnRectColor.Name = "btnRectColor";
- this.btnRectColor.Size = new System.Drawing.Size(226, 23);
- this.btnRectColor.TabIndex = 83;
- this.btnRectColor.UseVisualStyleBackColor = false;
- //
- // pipelineTypeCbo
- //
- this.pipelineTypeCbo.DisplayMember = "Text";
- this.pipelineTypeCbo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.pipelineTypeCbo.FormattingEnabled = true;
- this.pipelineTypeCbo.ItemHeight = 15;
- this.pipelineTypeCbo.Location = new System.Drawing.Point(129, 40);
- this.pipelineTypeCbo.Name = "pipelineTypeCbo";
- this.pipelineTypeCbo.Size = new System.Drawing.Size(226, 21);
- this.pipelineTypeCbo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.pipelineTypeCbo.TabIndex = 126;
- this.pipelineTypeCbo.SelectedIndexChanged += new System.EventHandler(this.pipelineTypeCbo_SelectedIndexChanged);
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(20, 46);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(89, 12);
- this.label17.TabIndex = 125;
- this.label17.Text = "管线图层类型:";
- //
- // FrmMultiPipelineModelDB
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(406, 522);
- this.Controls.Add(this.pipelineTypeCbo);
- this.Controls.Add(this.label17);
- this.Controls.Add(this.numOpaqueRect);
- this.Controls.Add(this.label21);
- this.Controls.Add(this.label22);
- this.Controls.Add(this.label23);
- this.Controls.Add(this.btnRectColor);
- this.Controls.Add(this.label16);
- this.Controls.Add(this.cmbHeightNum);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.cmbWidthNum);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.chkDeep);
- this.Controls.Add(this.cmbID);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.comboBoxShpLayerList);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.textBoxCornerSliceAngle);
- this.Controls.Add(this.numericUpDownLineOpaque);
- this.Controls.Add(this.txtSlice);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.cmbReference);
- this.Controls.Add(this.cmbRadius);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.cmbTo);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.cmbFrom);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.btnCreateModel);
- this.Controls.Add(this.textBoxNewLayerName);
- this.Controls.Add(this.btnPipelineColor);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.Name = "FrmMultiPipelineModelDB";
- this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "管孔方沟入库";
- this.Load += new System.EventHandler(this.FrmMultiPipelineModelDB_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBoxCornerSliceAngle;
- private System.Windows.Forms.NumericUpDown numericUpDownLineOpaque;
- private System.Windows.Forms.TextBox txtSlice;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ComboBox cmbRadius;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.ComboBox cmbTo;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.ComboBox cmbFrom;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.Button btnCreateModel;
- private System.Windows.Forms.TextBox textBoxNewLayerName;
- private System.Windows.Forms.Button btnPipelineColor;
- private System.Windows.Forms.ComboBox comboBoxShpLayerList;
- private System.Windows.Forms.ColorDialog colorDialog1;
- private System.Windows.Forms.SaveFileDialog saveFileDialog1;
- private System.Windows.Forms.ComboBox cmbID;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.CheckBox chkDeep;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.ComboBox cmbReference;
- private System.Windows.Forms.ComboBox cmbWidthNum;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.ComboBox cmbHeightNum;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.NumericUpDown numOpaqueRect;
- private System.Windows.Forms.Label label21;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.Button btnRectColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx pipelineTypeCbo;
- private System.Windows.Forms.Label label17;
- }
-}
\ No newline at end of file
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/FrmMultiPipelineModelDB.Designer.cs b/FrmMultiPipelineModelDB.Designer.cs
deleted file mode 100644
index 8aa77b0..0000000
--- a/FrmMultiPipelineModelDB.Designer.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-namespace Cyberpipe
-{
- partial class FrmMultiPipelineModelDB
- {
- ///
- /// 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.label7 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBoxCornerSliceAngle = new System.Windows.Forms.TextBox();
- this.numericUpDownLineOpaque = new System.Windows.Forms.NumericUpDown();
- this.txtSlice = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.cmbRadius = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.cmbTo = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbFrom = new System.Windows.Forms.ComboBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.btnClose = new System.Windows.Forms.Button();
- this.btnCreateModel = new System.Windows.Forms.Button();
- this.textBoxNewLayerName = new System.Windows.Forms.TextBox();
- this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxShpLayerList = new System.Windows.Forms.ComboBox();
- this.colorDialog1 = new System.Windows.Forms.ColorDialog();
- this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.cmbID = new System.Windows.Forms.ComboBox();
- this.label11 = new System.Windows.Forms.Label();
- this.chkDeep = new System.Windows.Forms.CheckBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.cmbReference = new System.Windows.Forms.ComboBox();
- this.cmbWidthNum = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.cmbHeightNum = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.numOpaqueRect = new System.Windows.Forms.NumericUpDown();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.btnRectColor = new System.Windows.Forms.Button();
- this.pipelineTypeCbo = new DevComponents.DotNetBar.Controls.ComboBoxEx();
- this.label17 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).BeginInit();
- this.SuspendLayout();
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Location = new System.Drawing.Point(360, 395);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(17, 12);
- this.label7.TabIndex = 71;
- this.label7.Text = "度";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.BackColor = System.Drawing.Color.Transparent;
- this.label9.Location = new System.Drawing.Point(21, 393);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(77, 12);
- this.label9.TabIndex = 70;
- this.label9.Text = "拐弯平滑度:";
- //
- // textBoxCornerSliceAngle
- //
- this.textBoxCornerSliceAngle.Location = new System.Drawing.Point(131, 390);
- this.textBoxCornerSliceAngle.Name = "textBoxCornerSliceAngle";
- this.textBoxCornerSliceAngle.Size = new System.Drawing.Size(225, 21);
- this.textBoxCornerSliceAngle.TabIndex = 69;
- this.textBoxCornerSliceAngle.Text = "10";
- //
- // numericUpDownLineOpaque
- //
- this.numericUpDownLineOpaque.Location = new System.Drawing.Point(131, 334);
- this.numericUpDownLineOpaque.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numericUpDownLineOpaque.Name = "numericUpDownLineOpaque";
- this.numericUpDownLineOpaque.Size = new System.Drawing.Size(225, 21);
- this.numericUpDownLineOpaque.TabIndex = 68;
- this.numericUpDownLineOpaque.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- //
- // txtSlice
- //
- this.txtSlice.Location = new System.Drawing.Point(131, 362);
- this.txtSlice.Name = "txtSlice";
- this.txtSlice.Size = new System.Drawing.Size(224, 21);
- this.txtSlice.TabIndex = 67;
- this.txtSlice.Text = "24";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(20, 365);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(77, 12);
- this.label8.TabIndex = 65;
- this.label8.Text = "截面分段数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.BackColor = System.Drawing.Color.Transparent;
- this.label10.Location = new System.Drawing.Point(21, 336);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(53, 12);
- this.label10.TabIndex = 66;
- this.label10.Text = "透明度:";
- //
- // cmbRadius
- //
- this.cmbRadius.FormattingEnabled = true;
- this.cmbRadius.Location = new System.Drawing.Point(130, 196);
- this.cmbRadius.Name = "cmbRadius";
- this.cmbRadius.Size = new System.Drawing.Size(226, 20);
- this.cmbRadius.TabIndex = 64;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(20, 309);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 62;
- this.label6.Text = "管道颜色:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(20, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 63;
- this.label5.Text = "管径字段:";
- //
- // cmbTo
- //
- this.cmbTo.FormattingEnabled = true;
- this.cmbTo.Location = new System.Drawing.Point(130, 125);
- this.cmbTo.Name = "cmbTo";
- this.cmbTo.Size = new System.Drawing.Size(226, 20);
- this.cmbTo.TabIndex = 61;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(24, 132);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 60;
- this.label4.Text = "终点埋深:";
- //
- // cmbFrom
- //
- this.cmbFrom.FormattingEnabled = true;
- this.cmbFrom.Location = new System.Drawing.Point(129, 97);
- this.cmbFrom.Name = "cmbFrom";
- this.cmbFrom.Size = new System.Drawing.Size(226, 20);
- this.cmbFrom.TabIndex = 59;
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(14, 479);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(380, 2);
- this.groupBox1.TabIndex = 58;
- this.groupBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 103);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 12);
- this.label3.TabIndex = 55;
- this.label3.Text = "起点埋深:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(20, 72);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(89, 12);
- this.label2.TabIndex = 56;
- this.label2.Text = "管线图层名称:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(20, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(95, 12);
- this.label1.TabIndex = 57;
- this.label1.Text = "Shapefile图层:";
- //
- // btnClose
- //
- this.btnClose.Location = new System.Drawing.Point(282, 490);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 53;
- this.btnClose.Text = "关闭(&C)";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // btnCreateModel
- //
- this.btnCreateModel.Location = new System.Drawing.Point(199, 490);
- this.btnCreateModel.Name = "btnCreateModel";
- this.btnCreateModel.Size = new System.Drawing.Size(74, 23);
- this.btnCreateModel.TabIndex = 54;
- this.btnCreateModel.Text = "建模(&M)";
- this.btnCreateModel.UseVisualStyleBackColor = true;
- this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
- //
- // textBoxNewLayerName
- //
- this.textBoxNewLayerName.Location = new System.Drawing.Point(129, 67);
- this.textBoxNewLayerName.Name = "textBoxNewLayerName";
- this.textBoxNewLayerName.Size = new System.Drawing.Size(226, 21);
- this.textBoxNewLayerName.TabIndex = 51;
- //
- // btnPipelineColor
- //
- this.btnPipelineColor.BackColor = System.Drawing.Color.Gainsboro;
- this.btnPipelineColor.Location = new System.Drawing.Point(130, 304);
- this.btnPipelineColor.Name = "btnPipelineColor";
- this.btnPipelineColor.Size = new System.Drawing.Size(226, 23);
- this.btnPipelineColor.TabIndex = 48;
- this.btnPipelineColor.UseVisualStyleBackColor = false;
- this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
- //
- // comboBoxShpLayerList
- //
- this.comboBoxShpLayerList.FormattingEnabled = true;
- this.comboBoxShpLayerList.Location = new System.Drawing.Point(129, 11);
- this.comboBoxShpLayerList.Name = "comboBoxShpLayerList";
- this.comboBoxShpLayerList.Size = new System.Drawing.Size(226, 20);
- this.comboBoxShpLayerList.TabIndex = 72;
- this.comboBoxShpLayerList.SelectedIndexChanged += new System.EventHandler(this.cmbLayer_SelectedIndexChanged);
- //
- // cmbID
- //
- this.cmbID.FormattingEnabled = true;
- this.cmbID.Location = new System.Drawing.Point(130, 223);
- this.cmbID.Name = "cmbID";
- this.cmbID.Size = new System.Drawing.Size(226, 20);
- this.cmbID.TabIndex = 74;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(22, 227);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 73;
- this.label11.Text = "ID字段:";
- //
- // chkDeep
- //
- this.chkDeep.AutoSize = true;
- this.chkDeep.Location = new System.Drawing.Point(130, 150);
- this.chkDeep.Name = "chkDeep";
- this.chkDeep.Size = new System.Drawing.Size(144, 16);
- this.chkDeep.TabIndex = 75;
- this.chkDeep.Text = "埋深是否转换为相反数";
- this.chkDeep.UseVisualStyleBackColor = true;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(359, 200);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(29, 12);
- this.label12.TabIndex = 76;
- this.label12.Text = "毫米";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(20, 172);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(77, 12);
- this.label13.TabIndex = 63;
- this.label13.Text = "埋深参考点:";
- //
- // cmbReference
- //
- this.cmbReference.FormattingEnabled = true;
- this.cmbReference.Items.AddRange(new object[] {
- "管底",
- "管顶"});
- this.cmbReference.Location = new System.Drawing.Point(130, 168);
- this.cmbReference.Name = "cmbReference";
- this.cmbReference.Size = new System.Drawing.Size(226, 20);
- this.cmbReference.TabIndex = 64;
- //
- // cmbWidthNum
- //
- this.cmbWidthNum.FormattingEnabled = true;
- this.cmbWidthNum.Location = new System.Drawing.Point(131, 250);
- this.cmbWidthNum.Name = "cmbWidthNum";
- this.cmbWidthNum.Size = new System.Drawing.Size(226, 20);
- this.cmbWidthNum.TabIndex = 78;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(22, 254);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 77;
- this.label14.Text = "横向个数字段:";
- //
- // cmbHeightNum
- //
- this.cmbHeightNum.FormattingEnabled = true;
- this.cmbHeightNum.Location = new System.Drawing.Point(131, 277);
- this.cmbHeightNum.Name = "cmbHeightNum";
- this.cmbHeightNum.Size = new System.Drawing.Size(226, 20);
- this.cmbHeightNum.TabIndex = 80;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(22, 280);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(89, 12);
- this.label15.TabIndex = 79;
- this.label15.Text = "纵向个数字段:";
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(430, 246);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 81;
- this.label16.Text = "间距字段:";
- //
- // numOpaqueRect
- //
- this.numOpaqueRect.Location = new System.Drawing.Point(132, 451);
- this.numOpaqueRect.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numOpaqueRect.Name = "numOpaqueRect";
- this.numOpaqueRect.Size = new System.Drawing.Size(225, 21);
- this.numOpaqueRect.TabIndex = 88;
- this.numOpaqueRect.Value = new decimal(new int[] {
- 125,
- 0,
- 0,
- 0});
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Location = new System.Drawing.Point(24, 455);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(53, 12);
- this.label21.TabIndex = 87;
- this.label21.Text = "透明度:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(22, 424);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(65, 12);
- this.label22.TabIndex = 84;
- this.label22.Text = "管沟颜色:";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(430, 291);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(77, 12);
- this.label23.TabIndex = 85;
- this.label23.Text = "管沟宽字段:";
- //
- // btnRectColor
- //
- this.btnRectColor.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.btnRectColor.Location = new System.Drawing.Point(131, 419);
- this.btnRectColor.Name = "btnRectColor";
- this.btnRectColor.Size = new System.Drawing.Size(226, 23);
- this.btnRectColor.TabIndex = 83;
- this.btnRectColor.UseVisualStyleBackColor = false;
- //
- // pipelineTypeCbo
- //
- this.pipelineTypeCbo.DisplayMember = "Text";
- this.pipelineTypeCbo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.pipelineTypeCbo.FormattingEnabled = true;
- this.pipelineTypeCbo.ItemHeight = 15;
- this.pipelineTypeCbo.Location = new System.Drawing.Point(129, 40);
- this.pipelineTypeCbo.Name = "pipelineTypeCbo";
- this.pipelineTypeCbo.Size = new System.Drawing.Size(226, 21);
- this.pipelineTypeCbo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.pipelineTypeCbo.TabIndex = 126;
- this.pipelineTypeCbo.SelectedIndexChanged += new System.EventHandler(this.pipelineTypeCbo_SelectedIndexChanged);
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(20, 46);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(89, 12);
- this.label17.TabIndex = 125;
- this.label17.Text = "管线图层类型:";
- //
- // FrmMultiPipelineModelDB
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(406, 522);
- this.Controls.Add(this.pipelineTypeCbo);
- this.Controls.Add(this.label17);
- this.Controls.Add(this.numOpaqueRect);
- this.Controls.Add(this.label21);
- this.Controls.Add(this.label22);
- this.Controls.Add(this.label23);
- this.Controls.Add(this.btnRectColor);
- this.Controls.Add(this.label16);
- this.Controls.Add(this.cmbHeightNum);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.cmbWidthNum);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.chkDeep);
- this.Controls.Add(this.cmbID);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.comboBoxShpLayerList);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.textBoxCornerSliceAngle);
- this.Controls.Add(this.numericUpDownLineOpaque);
- this.Controls.Add(this.txtSlice);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.cmbReference);
- this.Controls.Add(this.cmbRadius);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.cmbTo);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.cmbFrom);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.btnCreateModel);
- this.Controls.Add(this.textBoxNewLayerName);
- this.Controls.Add(this.btnPipelineColor);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.Name = "FrmMultiPipelineModelDB";
- this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "管孔方沟入库";
- this.Load += new System.EventHandler(this.FrmMultiPipelineModelDB_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBoxCornerSliceAngle;
- private System.Windows.Forms.NumericUpDown numericUpDownLineOpaque;
- private System.Windows.Forms.TextBox txtSlice;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ComboBox cmbRadius;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.ComboBox cmbTo;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.ComboBox cmbFrom;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.Button btnCreateModel;
- private System.Windows.Forms.TextBox textBoxNewLayerName;
- private System.Windows.Forms.Button btnPipelineColor;
- private System.Windows.Forms.ComboBox comboBoxShpLayerList;
- private System.Windows.Forms.ColorDialog colorDialog1;
- private System.Windows.Forms.SaveFileDialog saveFileDialog1;
- private System.Windows.Forms.ComboBox cmbID;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.CheckBox chkDeep;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.ComboBox cmbReference;
- private System.Windows.Forms.ComboBox cmbWidthNum;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.ComboBox cmbHeightNum;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.NumericUpDown numOpaqueRect;
- private System.Windows.Forms.Label label21;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.Button btnRectColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx pipelineTypeCbo;
- private System.Windows.Forms.Label label17;
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.cs b/FrmMultiPipelineModelDB.cs
deleted file mode 100644
index 0a0516a..0000000
--- a/FrmMultiPipelineModelDB.cs
+++ /dev/null
@@ -1,814 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using DevComponents.DotNetBar;
-using GeoScene.Globe;
-using GeoScene.Engine;
-using GeoScene.Data;
-using System.IO;
-using System.Collections;
-using System.Xml;
-
-namespace Cyberpipe
-{
- public partial class FrmMultiPipelineModelDB : Office2007Form
- {
- private GeoScene.Globe.GSOGlobeControl globeControl1;
- GSODataSource ds = null;
- public GSOLayer rukuLayer = null;
- private Hashtable en_cns = new Hashtable();
- private Hashtable fields_types = new Hashtable();
-
- public FrmMultiPipelineModelDB(GSOGlobeControl _globeControl,GSODataSource _ds)
- {
- globeControl1 = _globeControl;
- ds = _ds;
- InitializeComponent();
-
- cmbReference.Text = "管顶";
- chkDeep.Checked = true;
- }
-
- private void FrmMultiPipelineModelDB_Load(object sender, EventArgs e)
- {
- string pipelinetype = Utility.pipelinetype;
- string[] pipelinetypes = pipelinetype.Split(',');
- for (int i = 0; i < pipelinetypes.Length; i++)
- {
- pipelineTypeCbo.Items.Add(pipelinetypes[i]);
- }
-
- comboBoxShpLayerList.Items.Clear();
-
- for (int i = 0; i < globeControl1.Globe.Layers.Count; i++)
- {
- GSOLayer layer = globeControl1.Globe.Layers[i];
- if (layer != null && layer.Name.ToLower().EndsWith(".shp"))
- {
- comboBoxShpLayerList.Items.Add(layer.Caption);
- }
- }
-
- string filename = Application.StartupPath + "\\FormText.xml";
- if (File.Exists(filename))
- {
- XmlTextReader XmlReader = new XmlTextReader(filename);
- try
- {
- while (XmlReader.Read())
- {
- if (XmlReader.Name == "Field")
- {
- string str1 = XmlReader["label"];
- string str3 = XmlReader["type"];
- string str2 = XmlReader.ReadElementString();
- en_cns.Add(str1, str2);
- fields_types.Add(str1, str3);
- }
- }
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- }
-
- private void cmbLayer_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- return;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- return;
- }
- string txtMessage = valiPipeData(layer);
- if (txtMessage != "")
- {
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(comboBoxShpLayerList.SelectedItem.ToString().Trim(), txtMessage);
- showErrorMessage.ShowDialog();
- return;
- }
- else
- {
- textBoxNewLayerName.Text = layer.Caption;
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- return;
-
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- for (int i = 0; i < features[0].GetFieldCount(); i++)
- {
- cmbFrom.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbTo.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbRadius.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbID.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbWidthNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbHeightNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- }
- cmbFrom.SelectedItem = "Deep1";
- cmbTo.SelectedItem = "Deep2";
- cmbRadius.SelectedItem = "Diameter";
- cmbWidthNum.SelectedItem = "Hor_Num";// "Weight";
- cmbHeightNum.SelectedItem = "Ver_Num";// "Height";
- cmbID.SelectedItem = "Handle";
- }
-
- }
-
- private void btnPipelineColor_Click(object sender, EventArgs e)
- {
- colorDialog1.Color = btnPipelineColor.BackColor;
-
- if (colorDialog1.ShowDialog() == DialogResult.OK)
- {
- btnPipelineColor.BackColor = colorDialog1.Color;
- }
- }
-
- private void btnCreateModel_Click(object sender, EventArgs e)
- {
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return;
- }
- if (string.IsNullOrEmpty(textBoxNewLayerName.Text))
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return;
- }
- if (ds.GetDatasetByName(textBoxNewLayerName.Text) != null)
- {
- MessageBox.Show("图层名称已存在!", "提示");
- return;
- }
- try
- {
- GSOLayer ShpSourceLayer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- GSOFeatureDataset pipeline = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim());
- if (pipeline == null)
- {
- MessageBox.Show("输入的图层名称不符合要求!", "提示");
- return;
- }
- pipeline.Open();
- GSOFeatureDataset pipelineRect = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim() + "_Rect");
- if (pipelineRect == null)
- {
- return;
- }
- pipelineRect.Open();
-
- GSOFeatures features = ShpSourceLayer.GetAllFeatures();
- string message = "";
- for (int j = 0; j < features.Length; j++)
- {
- GSOFeature f = features[j];
-
- GSOFeature newFeature = pipeline.CreateFeature();
-
- GSOPipeLineStyle3D style = new GSOPipeLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numericUpDownLineOpaque.Value), btnPipelineColor.BackColor);
-
- double radius = 0;
- if (cmbRadius.SelectedItem == null)
- {
- cmbRadius.SelectedIndex = 0;
- }
- GSOFieldDefn diameterfield = (GSOFieldDefn)f.GetFieldDefn(cmbRadius.SelectedItem.ToString());
- string fieldText = f.GetFieldAsString(cmbRadius.SelectedItem.ToString());
- if (diameterfield.Type == EnumFieldType.Text)
- {
- if (double.TryParse(fieldText, out radius))
- {
- radius = radius / 2000;
- }
- else
- {
- message += "ID为" + f.ID + "的对象的管径字段值不符合要求!\r\n";
- continue;
- }
- }
- else
- {
- radius = f.GetFieldAsDouble(cmbRadius.SelectedItem.ToString()) / 2000; // 探测数据的单位一般是毫米,需换算为米; 管径一般是 直径, 这个需要半径, 所有除以2000
- }
-
- if (cmbID.SelectedItem == null)
- {
- cmbID.SelectedIndex = 0;
- }
- if (cmbWidthNum.SelectedItem == null)
- {
- cmbWidthNum.SelectedIndex = 0;
- }
- if (cmbHeightNum.SelectedItem == null)
- {
- cmbHeightNum.SelectedIndex = 0;
- }
- string eventid = f.GetFieldAsString(cmbID.SelectedItem.ToString());
- double interval = radius * 2;
- int num_width = 0;
- int num_height = 0;
- if (!int.TryParse(f.GetFieldAsString(cmbWidthNum.SelectedItem.ToString()), out num_width))
- {
- message += "ID为" + f.ID + "的对象的宽度字段值不符合要求!\r\n";
- continue;
- }
- if (!int.TryParse(f.GetFieldAsString(cmbHeightNum.SelectedItem.ToString()), out num_height))
- {
- message += "ID为" + f.ID + "的对象的高度字段值不符合要求!\r\n";
- continue;
- }
-
- double rectWidth = Math.Round( radius * 2.0 * num_width + 0.08,5);// 两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- if (radius == 0)
- {
- message += "ID为" + f.ID + "的对象的管径字段值为0!\r\n";
- continue;
- }
-
- int intSlice = 0;
- double cornerSliceAngle = 0;
- if (!int.TryParse(txtSlice.Text.Trim(), out intSlice))
- {
- message += "ID为" + f.ID + "的对象的截面分段数字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(textBoxCornerSliceAngle.Text.Trim(), out cornerSliceAngle))
- {
- message += "ID为" + f.ID + "的对象的拐弯平滑度字段值不符合要求!\r\n";
- continue;
- }
- style.Radius = radius;
- style.Slice = intSlice;
- style.CornerSliceAngle = cornerSliceAngle;
-
- f.Geometry.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- GSOGeoPolyline3D line = f.Geometry as GSOGeoPolyline3D;
- if (line == null)
- {
- message += "ID为" + f.ID + "的对象不是一个线对象!\r\n";
- continue;
- }
-
- if (cmbFrom.SelectedItem == null)
- {
- cmbFrom.SelectedIndex = 0;
- }
- if (cmbTo.SelectedItem == null)
- {
- cmbTo.SelectedIndex = 0;
- }
- double deep1 = 0;
- double deep2 = 0;
- if (!double.TryParse(f.GetFieldAsString(cmbFrom.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep1))
- {
- message += "ID为" + f.ID + "的对象的起点埋深字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(f.GetFieldAsString(cmbTo.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep2))
- {
- message += "ID为" + f.ID + "的对象的终点埋深字段值不符合要求!\r\n";
- continue;
- }
-
- if (chkDeep.Checked)
- {
- deep1 = 0 - deep1;
- deep2 = 0 - deep2;
- }
-
- if (cmbReference.SelectedIndex == 0) //管底
- {
- deep1 = deep1 + radius * 2;
- deep2 = deep2 + radius * 2;
- }
- else if (cmbReference.SelectedIndex == 1) //管顶
- {
- deep1 = deep1 - radius * 2;
- deep2 = deep2 - radius * 2;
- }
- GSOPoint3ds ps = line[0];
- for (int n = 0; n < ps.Count; n++)
- {
- GSOPoint3d pt3d = ps[n];
- int pointcount = ps.Count;
- double radio = Math.Sqrt(Math.Pow(pt3d.Y - ps[0].Y, 2) + Math.Pow(pt3d.X - ps[0].X, 2)) / Math.Sqrt(Math.Pow(ps[pointcount - 1].Y - ps[0].Y, 2) + Math.Pow(ps[pointcount - 1].X - ps[0].X, 2));
- pt3d.Z = deep1 + (deep2 - deep1) * radio;
-
- if (double.IsInfinity(pt3d.Z))
- {
- pt3d.Z = deep2;
- }
- ps[n] = pt3d;
- }
- line[0] = ps;
- if (num_height == 0 || num_width == 0) // 直埋
- {
- newFeature.Geometry = line;
- newFeature.Geometry.Style = style;
- //newFeature.Name = eventid;
- newFeature.Name = en_cns.ContainsKey(eventid) == true ? en_cns[eventid].ToString() : eventid;
- SetFields(f, newFeature);
-
- pipeline.AddFeature(newFeature);
- }
- else
- {
- GSOFeature rectfeat = pipelineRect.CreateFeature();
- rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
- if (rectfeat != null)
- {
- SetFields(f, rectfeat);
- pipelineRect.AddFeature(rectfeat);
- }
- one2Multi(line, num_width, num_height, interval, style, pipeline, eventid, f);
- }
- }
-
- pipeline.Save();
- pipelineRect.Save();
- string strMessage = "shp文件中共" + features.Length + "个对象,实际入库" + pipeline.GetAllFeatures().Length + "个对象!\r\n";
- pipeline.Close();
- pipelineRect.Close();
- globeControl1.Refresh();
-
- GSOLayer layerRuku = globeControl1.Globe.Layers.Add(textBoxNewLayerName.Text);
- rukuLayer = layerRuku;
-
- if (message == "")
- {
- MessageBox.Show(strMessage, "提示");
- }
- else
- {
- //FrmMessageShow frm = new FrmMessageShow(strMessage + message);
- //frm.ShowDialog();
- MessageBox.Show(strMessage + message, "提示");
- }
-
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- catch (Exception ex)
- {
- //Log.PublishTxt(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- private void SetFields(GSOFeature oldfeat, GSOFeature newFeature)
- {
- for (int i = 0; i < oldfeat.GetFieldCount(); i++)
- {
- GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(oldfeat.GetFieldDefn(i));
-
- object fieldvalue = oldfeat.GetValue(fielddef.Name);
- if (fieldvalue == null)
- continue;
- string fieldName = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- newFeature.SetValue(fieldName, fieldvalue);
- }
- }
-
- private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
- {
- GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;
- GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
- if (style == null)
- {
- return null;
- }
- cloneline.Style = style;
- return cloneline;
- }
-
- private GSOExtendSectionLineStyle3D createRectStyle(double width, double height)
- {
- GSOExtendSectionLineStyle3D style = new GSOExtendSectionLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numOpaqueRect.Value), btnRectColor.BackColor);
- if (width == 0 || height == 0)
- {
- return null;
- }
- GSOPoint3ds sectionpts = new GSOPoint3ds();
- sectionpts.Add(new GSOPoint3d(width / -2, height / 2, 0));
- sectionpts.Add(new GSOPoint3d(width / -2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / 2, 0));
-
- style.SetSectionPoints(sectionpts);
- style.IsClosed = true;
- style.SetAnchorByAlign(EnumAlign.MiddleCenter);
-
- return style;
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOFeatureDataset layer,string name,GSOFeature oldfeat)
- {
- line = LatLon2Coord_Line(line);
-
- double width_all = interval * (num_width-1);
- double height_all = interval * (num_height-1);
-
- GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3d p1 = line[0][0];
- GSOPoint3d p2 = line[0][1];
- double daltaX = p2.X-p1.X;
- double daltaY = p2.Y-p1.Y;
- double agree = Math.Atan(daltaY/daltaX);
- GSOPoint2d point = new GSOPoint2d((-0.5*width_all-interval)*Math.Sin(agree),(0.5*width_all+interval)*Math.Cos(agree));
- line.MoveXY(point.X,point.Y);
- line.MoveZ(height_all / -2);
-
- for (int i = 0; i < num_width; i++)
- {
- for (int j = 0; j < num_height; j++)
- {
- GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;
- point = new GSOPoint2d((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));
- templine.MoveXY(point.X,point.Y);
- templine.MoveZ(interval*j);
- templine = Coord2LatLon_Line(templine);
- GSOFeature feat = layer.CreateFeature();
- feat.Geometry = templine;
- feat.Geometry.Style = style;
- feat.Name = name;
- SetFields(oldfeat, feat);
- layer.AddFeature(feat);
- }
- }
- }
-
- private GSOGeoPolyline3D LatLon2Coord_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = LatLon2Coord(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOGeoPolyline3D Coord2LatLon_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = Coord2LatLon(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOPoint2d LatLon2Coord(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, id);
- return result;
- }
-
- private GSOPoint2d Coord2LatLon(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, id);
- return result;
- //+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs
- }
-
- private GSOFeatureDataset CreateDBFeatureDataset(string name)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return null;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- MessageBox.Show("Shp图层为空!", "提示");
- return null;
- }
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- {
- MessageBox.Show("图层要素个数为0!", "提示");
- return null;
- }
- GSOFeatureDataset featureDataset = layer.Dataset as GSOFeatureDataset;
- if (featureDataset == null)
- {
- MessageBox.Show("Shp图层不是矢量图层!", "提示");
- return null;
- }
-
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return null ;
- }
- GSOFeatureDataset newFeatureDataset = ds.CreateFeatureDataset(name);
- if (newFeatureDataset != null)
- {
- for (int i = 0; i < featureDataset.FieldCount; i++)
- {
- GeoScene.Data.GSOFieldAttr fielddef = featureDataset.GetField(i);
-
- GSOFieldAttr field = new GSOFieldAttr();
- //field.Name = fielddef.Name;
- field.Name = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- field.Type = fielddef.Type;
- field.Width = fielddef.Width;
- field.Precision = fielddef.Precision;
- bool res = newFeatureDataset.AddField(field);
- }
- newFeatureDataset.Save();
- }
- return newFeatureDataset;
- }
-
- private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
- {
- if ((pipelineTypeCbo.Text != "给水") && (pipelineTypeCbo.Text != "天然气") &&
- (pipelineTypeCbo.Text != "燃气") && (pipelineTypeCbo.Text != "中水"))
- {
- cmbReference.Text = "管底";
- }
- else
- {
- cmbReference.Text = "管顶";
- }
-
- if (pipelineTypeCbo.Text == "给水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 255);
- }
- else if (pipelineTypeCbo.Text == "供电")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 100, 150);
- }
- else if (pipelineTypeCbo.Text == "雨水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(230, 120, 0);
- }
- else if (pipelineTypeCbo.Text == "污水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(128, 64, 0);
- }
- else if (pipelineTypeCbo.Text == "天然气")
- {
- btnPipelineColor.BackColor = Color.FromArgb(215, 0, 64);
- }
- else if (pipelineTypeCbo.Text == "共通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "电通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "有线电视")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "监控")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "交通信号")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "路灯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 0, 150);
- }
- else if (pipelineTypeCbo.Text == "通讯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 0);
- }
- }
-
- private object convertFieldValue(string fieldname, object obj)
- {
- if (obj == null)
- return null;
-
- try
- {
- string type = fields_types[fieldname].ToString();
- switch (type)
- {
- case "string":
- return obj.ToString();
- case "int":
- //return 101;
- int intResult;
- if (int.TryParse(obj.ToString(), out intResult))
- return intResult;
- else
- return null;
- case "double":
- //return 202.5;
- double doubleResult;
- if (double.TryParse(obj.ToString(), out doubleResult))
- return doubleResult;
- else
- return null;
- case "date":
- DateTime dtResult;
- if (DateTime.TryParse(obj.ToString(), out dtResult))
- return dtResult;
- else
- return null;
- }
- return null;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- return null;
- }
- }
-
- ///
- /// 验证shp格式文件
- ///
- ///
- ///
- private string valiPipeData(GSOLayer layer) //验证shp格式文件
- {
- 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 (fields_types.ContainsKey(fieldName))
- {
- string fieldType = fields_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("Deep1"))
- {
- txtMessage += "Deep1字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep1");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep1字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Deep2"))
- {
- txtMessage += "Deep2字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep2");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep2字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Diameter"))
- {
- txtMessage += "Diameter字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Diameter");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Diameter字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Handle"))
- {
- txtMessage += "Handle字段不存在!\r\n";
- }
- List lstHandle = new List();
- 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 (fields_types.ContainsKey(fieldName))
- {
- if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
- {
- txtMessage += "ID为" + f.ID + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
- }
- }
- }
- if (f.GetFieldAsFloat("Diameter") <= 0)
- {
- txtMessage += "ID为" + f.ID + "\"Diameter\"字段中的值必须大于0 \r\n";
- }
- if (!lstHandle.Contains(f.GetFieldAsString("Handle")))
- {
- lstHandle.Add(f.GetFieldAsString("Handle"));
- }
- else
- {
- txtMessage += "ID为" + f.ID + "的\"Handle\"字段中的值重复\r\n";
- }
- }
- }
- return txtMessage;
- }
-
- }
-}
\ No newline at end of file
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/FrmMultiPipelineModelDB.Designer.cs b/FrmMultiPipelineModelDB.Designer.cs
deleted file mode 100644
index 8aa77b0..0000000
--- a/FrmMultiPipelineModelDB.Designer.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-namespace Cyberpipe
-{
- partial class FrmMultiPipelineModelDB
- {
- ///
- /// 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.label7 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBoxCornerSliceAngle = new System.Windows.Forms.TextBox();
- this.numericUpDownLineOpaque = new System.Windows.Forms.NumericUpDown();
- this.txtSlice = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.cmbRadius = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.cmbTo = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbFrom = new System.Windows.Forms.ComboBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.btnClose = new System.Windows.Forms.Button();
- this.btnCreateModel = new System.Windows.Forms.Button();
- this.textBoxNewLayerName = new System.Windows.Forms.TextBox();
- this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxShpLayerList = new System.Windows.Forms.ComboBox();
- this.colorDialog1 = new System.Windows.Forms.ColorDialog();
- this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.cmbID = new System.Windows.Forms.ComboBox();
- this.label11 = new System.Windows.Forms.Label();
- this.chkDeep = new System.Windows.Forms.CheckBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.cmbReference = new System.Windows.Forms.ComboBox();
- this.cmbWidthNum = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.cmbHeightNum = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.numOpaqueRect = new System.Windows.Forms.NumericUpDown();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.btnRectColor = new System.Windows.Forms.Button();
- this.pipelineTypeCbo = new DevComponents.DotNetBar.Controls.ComboBoxEx();
- this.label17 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).BeginInit();
- this.SuspendLayout();
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Location = new System.Drawing.Point(360, 395);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(17, 12);
- this.label7.TabIndex = 71;
- this.label7.Text = "度";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.BackColor = System.Drawing.Color.Transparent;
- this.label9.Location = new System.Drawing.Point(21, 393);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(77, 12);
- this.label9.TabIndex = 70;
- this.label9.Text = "拐弯平滑度:";
- //
- // textBoxCornerSliceAngle
- //
- this.textBoxCornerSliceAngle.Location = new System.Drawing.Point(131, 390);
- this.textBoxCornerSliceAngle.Name = "textBoxCornerSliceAngle";
- this.textBoxCornerSliceAngle.Size = new System.Drawing.Size(225, 21);
- this.textBoxCornerSliceAngle.TabIndex = 69;
- this.textBoxCornerSliceAngle.Text = "10";
- //
- // numericUpDownLineOpaque
- //
- this.numericUpDownLineOpaque.Location = new System.Drawing.Point(131, 334);
- this.numericUpDownLineOpaque.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numericUpDownLineOpaque.Name = "numericUpDownLineOpaque";
- this.numericUpDownLineOpaque.Size = new System.Drawing.Size(225, 21);
- this.numericUpDownLineOpaque.TabIndex = 68;
- this.numericUpDownLineOpaque.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- //
- // txtSlice
- //
- this.txtSlice.Location = new System.Drawing.Point(131, 362);
- this.txtSlice.Name = "txtSlice";
- this.txtSlice.Size = new System.Drawing.Size(224, 21);
- this.txtSlice.TabIndex = 67;
- this.txtSlice.Text = "24";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(20, 365);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(77, 12);
- this.label8.TabIndex = 65;
- this.label8.Text = "截面分段数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.BackColor = System.Drawing.Color.Transparent;
- this.label10.Location = new System.Drawing.Point(21, 336);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(53, 12);
- this.label10.TabIndex = 66;
- this.label10.Text = "透明度:";
- //
- // cmbRadius
- //
- this.cmbRadius.FormattingEnabled = true;
- this.cmbRadius.Location = new System.Drawing.Point(130, 196);
- this.cmbRadius.Name = "cmbRadius";
- this.cmbRadius.Size = new System.Drawing.Size(226, 20);
- this.cmbRadius.TabIndex = 64;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(20, 309);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 62;
- this.label6.Text = "管道颜色:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(20, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 63;
- this.label5.Text = "管径字段:";
- //
- // cmbTo
- //
- this.cmbTo.FormattingEnabled = true;
- this.cmbTo.Location = new System.Drawing.Point(130, 125);
- this.cmbTo.Name = "cmbTo";
- this.cmbTo.Size = new System.Drawing.Size(226, 20);
- this.cmbTo.TabIndex = 61;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(24, 132);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 60;
- this.label4.Text = "终点埋深:";
- //
- // cmbFrom
- //
- this.cmbFrom.FormattingEnabled = true;
- this.cmbFrom.Location = new System.Drawing.Point(129, 97);
- this.cmbFrom.Name = "cmbFrom";
- this.cmbFrom.Size = new System.Drawing.Size(226, 20);
- this.cmbFrom.TabIndex = 59;
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(14, 479);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(380, 2);
- this.groupBox1.TabIndex = 58;
- this.groupBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 103);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 12);
- this.label3.TabIndex = 55;
- this.label3.Text = "起点埋深:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(20, 72);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(89, 12);
- this.label2.TabIndex = 56;
- this.label2.Text = "管线图层名称:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(20, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(95, 12);
- this.label1.TabIndex = 57;
- this.label1.Text = "Shapefile图层:";
- //
- // btnClose
- //
- this.btnClose.Location = new System.Drawing.Point(282, 490);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 53;
- this.btnClose.Text = "关闭(&C)";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // btnCreateModel
- //
- this.btnCreateModel.Location = new System.Drawing.Point(199, 490);
- this.btnCreateModel.Name = "btnCreateModel";
- this.btnCreateModel.Size = new System.Drawing.Size(74, 23);
- this.btnCreateModel.TabIndex = 54;
- this.btnCreateModel.Text = "建模(&M)";
- this.btnCreateModel.UseVisualStyleBackColor = true;
- this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
- //
- // textBoxNewLayerName
- //
- this.textBoxNewLayerName.Location = new System.Drawing.Point(129, 67);
- this.textBoxNewLayerName.Name = "textBoxNewLayerName";
- this.textBoxNewLayerName.Size = new System.Drawing.Size(226, 21);
- this.textBoxNewLayerName.TabIndex = 51;
- //
- // btnPipelineColor
- //
- this.btnPipelineColor.BackColor = System.Drawing.Color.Gainsboro;
- this.btnPipelineColor.Location = new System.Drawing.Point(130, 304);
- this.btnPipelineColor.Name = "btnPipelineColor";
- this.btnPipelineColor.Size = new System.Drawing.Size(226, 23);
- this.btnPipelineColor.TabIndex = 48;
- this.btnPipelineColor.UseVisualStyleBackColor = false;
- this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
- //
- // comboBoxShpLayerList
- //
- this.comboBoxShpLayerList.FormattingEnabled = true;
- this.comboBoxShpLayerList.Location = new System.Drawing.Point(129, 11);
- this.comboBoxShpLayerList.Name = "comboBoxShpLayerList";
- this.comboBoxShpLayerList.Size = new System.Drawing.Size(226, 20);
- this.comboBoxShpLayerList.TabIndex = 72;
- this.comboBoxShpLayerList.SelectedIndexChanged += new System.EventHandler(this.cmbLayer_SelectedIndexChanged);
- //
- // cmbID
- //
- this.cmbID.FormattingEnabled = true;
- this.cmbID.Location = new System.Drawing.Point(130, 223);
- this.cmbID.Name = "cmbID";
- this.cmbID.Size = new System.Drawing.Size(226, 20);
- this.cmbID.TabIndex = 74;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(22, 227);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 73;
- this.label11.Text = "ID字段:";
- //
- // chkDeep
- //
- this.chkDeep.AutoSize = true;
- this.chkDeep.Location = new System.Drawing.Point(130, 150);
- this.chkDeep.Name = "chkDeep";
- this.chkDeep.Size = new System.Drawing.Size(144, 16);
- this.chkDeep.TabIndex = 75;
- this.chkDeep.Text = "埋深是否转换为相反数";
- this.chkDeep.UseVisualStyleBackColor = true;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(359, 200);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(29, 12);
- this.label12.TabIndex = 76;
- this.label12.Text = "毫米";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(20, 172);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(77, 12);
- this.label13.TabIndex = 63;
- this.label13.Text = "埋深参考点:";
- //
- // cmbReference
- //
- this.cmbReference.FormattingEnabled = true;
- this.cmbReference.Items.AddRange(new object[] {
- "管底",
- "管顶"});
- this.cmbReference.Location = new System.Drawing.Point(130, 168);
- this.cmbReference.Name = "cmbReference";
- this.cmbReference.Size = new System.Drawing.Size(226, 20);
- this.cmbReference.TabIndex = 64;
- //
- // cmbWidthNum
- //
- this.cmbWidthNum.FormattingEnabled = true;
- this.cmbWidthNum.Location = new System.Drawing.Point(131, 250);
- this.cmbWidthNum.Name = "cmbWidthNum";
- this.cmbWidthNum.Size = new System.Drawing.Size(226, 20);
- this.cmbWidthNum.TabIndex = 78;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(22, 254);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 77;
- this.label14.Text = "横向个数字段:";
- //
- // cmbHeightNum
- //
- this.cmbHeightNum.FormattingEnabled = true;
- this.cmbHeightNum.Location = new System.Drawing.Point(131, 277);
- this.cmbHeightNum.Name = "cmbHeightNum";
- this.cmbHeightNum.Size = new System.Drawing.Size(226, 20);
- this.cmbHeightNum.TabIndex = 80;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(22, 280);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(89, 12);
- this.label15.TabIndex = 79;
- this.label15.Text = "纵向个数字段:";
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(430, 246);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 81;
- this.label16.Text = "间距字段:";
- //
- // numOpaqueRect
- //
- this.numOpaqueRect.Location = new System.Drawing.Point(132, 451);
- this.numOpaqueRect.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numOpaqueRect.Name = "numOpaqueRect";
- this.numOpaqueRect.Size = new System.Drawing.Size(225, 21);
- this.numOpaqueRect.TabIndex = 88;
- this.numOpaqueRect.Value = new decimal(new int[] {
- 125,
- 0,
- 0,
- 0});
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Location = new System.Drawing.Point(24, 455);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(53, 12);
- this.label21.TabIndex = 87;
- this.label21.Text = "透明度:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(22, 424);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(65, 12);
- this.label22.TabIndex = 84;
- this.label22.Text = "管沟颜色:";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(430, 291);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(77, 12);
- this.label23.TabIndex = 85;
- this.label23.Text = "管沟宽字段:";
- //
- // btnRectColor
- //
- this.btnRectColor.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.btnRectColor.Location = new System.Drawing.Point(131, 419);
- this.btnRectColor.Name = "btnRectColor";
- this.btnRectColor.Size = new System.Drawing.Size(226, 23);
- this.btnRectColor.TabIndex = 83;
- this.btnRectColor.UseVisualStyleBackColor = false;
- //
- // pipelineTypeCbo
- //
- this.pipelineTypeCbo.DisplayMember = "Text";
- this.pipelineTypeCbo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.pipelineTypeCbo.FormattingEnabled = true;
- this.pipelineTypeCbo.ItemHeight = 15;
- this.pipelineTypeCbo.Location = new System.Drawing.Point(129, 40);
- this.pipelineTypeCbo.Name = "pipelineTypeCbo";
- this.pipelineTypeCbo.Size = new System.Drawing.Size(226, 21);
- this.pipelineTypeCbo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.pipelineTypeCbo.TabIndex = 126;
- this.pipelineTypeCbo.SelectedIndexChanged += new System.EventHandler(this.pipelineTypeCbo_SelectedIndexChanged);
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(20, 46);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(89, 12);
- this.label17.TabIndex = 125;
- this.label17.Text = "管线图层类型:";
- //
- // FrmMultiPipelineModelDB
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(406, 522);
- this.Controls.Add(this.pipelineTypeCbo);
- this.Controls.Add(this.label17);
- this.Controls.Add(this.numOpaqueRect);
- this.Controls.Add(this.label21);
- this.Controls.Add(this.label22);
- this.Controls.Add(this.label23);
- this.Controls.Add(this.btnRectColor);
- this.Controls.Add(this.label16);
- this.Controls.Add(this.cmbHeightNum);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.cmbWidthNum);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.chkDeep);
- this.Controls.Add(this.cmbID);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.comboBoxShpLayerList);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.textBoxCornerSliceAngle);
- this.Controls.Add(this.numericUpDownLineOpaque);
- this.Controls.Add(this.txtSlice);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.cmbReference);
- this.Controls.Add(this.cmbRadius);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.cmbTo);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.cmbFrom);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.btnCreateModel);
- this.Controls.Add(this.textBoxNewLayerName);
- this.Controls.Add(this.btnPipelineColor);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.Name = "FrmMultiPipelineModelDB";
- this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "管孔方沟入库";
- this.Load += new System.EventHandler(this.FrmMultiPipelineModelDB_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBoxCornerSliceAngle;
- private System.Windows.Forms.NumericUpDown numericUpDownLineOpaque;
- private System.Windows.Forms.TextBox txtSlice;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ComboBox cmbRadius;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.ComboBox cmbTo;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.ComboBox cmbFrom;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.Button btnCreateModel;
- private System.Windows.Forms.TextBox textBoxNewLayerName;
- private System.Windows.Forms.Button btnPipelineColor;
- private System.Windows.Forms.ComboBox comboBoxShpLayerList;
- private System.Windows.Forms.ColorDialog colorDialog1;
- private System.Windows.Forms.SaveFileDialog saveFileDialog1;
- private System.Windows.Forms.ComboBox cmbID;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.CheckBox chkDeep;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.ComboBox cmbReference;
- private System.Windows.Forms.ComboBox cmbWidthNum;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.ComboBox cmbHeightNum;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.NumericUpDown numOpaqueRect;
- private System.Windows.Forms.Label label21;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.Button btnRectColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx pipelineTypeCbo;
- private System.Windows.Forms.Label label17;
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.cs b/FrmMultiPipelineModelDB.cs
deleted file mode 100644
index 0a0516a..0000000
--- a/FrmMultiPipelineModelDB.cs
+++ /dev/null
@@ -1,814 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using DevComponents.DotNetBar;
-using GeoScene.Globe;
-using GeoScene.Engine;
-using GeoScene.Data;
-using System.IO;
-using System.Collections;
-using System.Xml;
-
-namespace Cyberpipe
-{
- public partial class FrmMultiPipelineModelDB : Office2007Form
- {
- private GeoScene.Globe.GSOGlobeControl globeControl1;
- GSODataSource ds = null;
- public GSOLayer rukuLayer = null;
- private Hashtable en_cns = new Hashtable();
- private Hashtable fields_types = new Hashtable();
-
- public FrmMultiPipelineModelDB(GSOGlobeControl _globeControl,GSODataSource _ds)
- {
- globeControl1 = _globeControl;
- ds = _ds;
- InitializeComponent();
-
- cmbReference.Text = "管顶";
- chkDeep.Checked = true;
- }
-
- private void FrmMultiPipelineModelDB_Load(object sender, EventArgs e)
- {
- string pipelinetype = Utility.pipelinetype;
- string[] pipelinetypes = pipelinetype.Split(',');
- for (int i = 0; i < pipelinetypes.Length; i++)
- {
- pipelineTypeCbo.Items.Add(pipelinetypes[i]);
- }
-
- comboBoxShpLayerList.Items.Clear();
-
- for (int i = 0; i < globeControl1.Globe.Layers.Count; i++)
- {
- GSOLayer layer = globeControl1.Globe.Layers[i];
- if (layer != null && layer.Name.ToLower().EndsWith(".shp"))
- {
- comboBoxShpLayerList.Items.Add(layer.Caption);
- }
- }
-
- string filename = Application.StartupPath + "\\FormText.xml";
- if (File.Exists(filename))
- {
- XmlTextReader XmlReader = new XmlTextReader(filename);
- try
- {
- while (XmlReader.Read())
- {
- if (XmlReader.Name == "Field")
- {
- string str1 = XmlReader["label"];
- string str3 = XmlReader["type"];
- string str2 = XmlReader.ReadElementString();
- en_cns.Add(str1, str2);
- fields_types.Add(str1, str3);
- }
- }
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- }
-
- private void cmbLayer_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- return;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- return;
- }
- string txtMessage = valiPipeData(layer);
- if (txtMessage != "")
- {
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(comboBoxShpLayerList.SelectedItem.ToString().Trim(), txtMessage);
- showErrorMessage.ShowDialog();
- return;
- }
- else
- {
- textBoxNewLayerName.Text = layer.Caption;
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- return;
-
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- for (int i = 0; i < features[0].GetFieldCount(); i++)
- {
- cmbFrom.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbTo.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbRadius.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbID.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbWidthNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbHeightNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- }
- cmbFrom.SelectedItem = "Deep1";
- cmbTo.SelectedItem = "Deep2";
- cmbRadius.SelectedItem = "Diameter";
- cmbWidthNum.SelectedItem = "Hor_Num";// "Weight";
- cmbHeightNum.SelectedItem = "Ver_Num";// "Height";
- cmbID.SelectedItem = "Handle";
- }
-
- }
-
- private void btnPipelineColor_Click(object sender, EventArgs e)
- {
- colorDialog1.Color = btnPipelineColor.BackColor;
-
- if (colorDialog1.ShowDialog() == DialogResult.OK)
- {
- btnPipelineColor.BackColor = colorDialog1.Color;
- }
- }
-
- private void btnCreateModel_Click(object sender, EventArgs e)
- {
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return;
- }
- if (string.IsNullOrEmpty(textBoxNewLayerName.Text))
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return;
- }
- if (ds.GetDatasetByName(textBoxNewLayerName.Text) != null)
- {
- MessageBox.Show("图层名称已存在!", "提示");
- return;
- }
- try
- {
- GSOLayer ShpSourceLayer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- GSOFeatureDataset pipeline = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim());
- if (pipeline == null)
- {
- MessageBox.Show("输入的图层名称不符合要求!", "提示");
- return;
- }
- pipeline.Open();
- GSOFeatureDataset pipelineRect = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim() + "_Rect");
- if (pipelineRect == null)
- {
- return;
- }
- pipelineRect.Open();
-
- GSOFeatures features = ShpSourceLayer.GetAllFeatures();
- string message = "";
- for (int j = 0; j < features.Length; j++)
- {
- GSOFeature f = features[j];
-
- GSOFeature newFeature = pipeline.CreateFeature();
-
- GSOPipeLineStyle3D style = new GSOPipeLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numericUpDownLineOpaque.Value), btnPipelineColor.BackColor);
-
- double radius = 0;
- if (cmbRadius.SelectedItem == null)
- {
- cmbRadius.SelectedIndex = 0;
- }
- GSOFieldDefn diameterfield = (GSOFieldDefn)f.GetFieldDefn(cmbRadius.SelectedItem.ToString());
- string fieldText = f.GetFieldAsString(cmbRadius.SelectedItem.ToString());
- if (diameterfield.Type == EnumFieldType.Text)
- {
- if (double.TryParse(fieldText, out radius))
- {
- radius = radius / 2000;
- }
- else
- {
- message += "ID为" + f.ID + "的对象的管径字段值不符合要求!\r\n";
- continue;
- }
- }
- else
- {
- radius = f.GetFieldAsDouble(cmbRadius.SelectedItem.ToString()) / 2000; // 探测数据的单位一般是毫米,需换算为米; 管径一般是 直径, 这个需要半径, 所有除以2000
- }
-
- if (cmbID.SelectedItem == null)
- {
- cmbID.SelectedIndex = 0;
- }
- if (cmbWidthNum.SelectedItem == null)
- {
- cmbWidthNum.SelectedIndex = 0;
- }
- if (cmbHeightNum.SelectedItem == null)
- {
- cmbHeightNum.SelectedIndex = 0;
- }
- string eventid = f.GetFieldAsString(cmbID.SelectedItem.ToString());
- double interval = radius * 2;
- int num_width = 0;
- int num_height = 0;
- if (!int.TryParse(f.GetFieldAsString(cmbWidthNum.SelectedItem.ToString()), out num_width))
- {
- message += "ID为" + f.ID + "的对象的宽度字段值不符合要求!\r\n";
- continue;
- }
- if (!int.TryParse(f.GetFieldAsString(cmbHeightNum.SelectedItem.ToString()), out num_height))
- {
- message += "ID为" + f.ID + "的对象的高度字段值不符合要求!\r\n";
- continue;
- }
-
- double rectWidth = Math.Round( radius * 2.0 * num_width + 0.08,5);// 两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- if (radius == 0)
- {
- message += "ID为" + f.ID + "的对象的管径字段值为0!\r\n";
- continue;
- }
-
- int intSlice = 0;
- double cornerSliceAngle = 0;
- if (!int.TryParse(txtSlice.Text.Trim(), out intSlice))
- {
- message += "ID为" + f.ID + "的对象的截面分段数字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(textBoxCornerSliceAngle.Text.Trim(), out cornerSliceAngle))
- {
- message += "ID为" + f.ID + "的对象的拐弯平滑度字段值不符合要求!\r\n";
- continue;
- }
- style.Radius = radius;
- style.Slice = intSlice;
- style.CornerSliceAngle = cornerSliceAngle;
-
- f.Geometry.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- GSOGeoPolyline3D line = f.Geometry as GSOGeoPolyline3D;
- if (line == null)
- {
- message += "ID为" + f.ID + "的对象不是一个线对象!\r\n";
- continue;
- }
-
- if (cmbFrom.SelectedItem == null)
- {
- cmbFrom.SelectedIndex = 0;
- }
- if (cmbTo.SelectedItem == null)
- {
- cmbTo.SelectedIndex = 0;
- }
- double deep1 = 0;
- double deep2 = 0;
- if (!double.TryParse(f.GetFieldAsString(cmbFrom.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep1))
- {
- message += "ID为" + f.ID + "的对象的起点埋深字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(f.GetFieldAsString(cmbTo.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep2))
- {
- message += "ID为" + f.ID + "的对象的终点埋深字段值不符合要求!\r\n";
- continue;
- }
-
- if (chkDeep.Checked)
- {
- deep1 = 0 - deep1;
- deep2 = 0 - deep2;
- }
-
- if (cmbReference.SelectedIndex == 0) //管底
- {
- deep1 = deep1 + radius * 2;
- deep2 = deep2 + radius * 2;
- }
- else if (cmbReference.SelectedIndex == 1) //管顶
- {
- deep1 = deep1 - radius * 2;
- deep2 = deep2 - radius * 2;
- }
- GSOPoint3ds ps = line[0];
- for (int n = 0; n < ps.Count; n++)
- {
- GSOPoint3d pt3d = ps[n];
- int pointcount = ps.Count;
- double radio = Math.Sqrt(Math.Pow(pt3d.Y - ps[0].Y, 2) + Math.Pow(pt3d.X - ps[0].X, 2)) / Math.Sqrt(Math.Pow(ps[pointcount - 1].Y - ps[0].Y, 2) + Math.Pow(ps[pointcount - 1].X - ps[0].X, 2));
- pt3d.Z = deep1 + (deep2 - deep1) * radio;
-
- if (double.IsInfinity(pt3d.Z))
- {
- pt3d.Z = deep2;
- }
- ps[n] = pt3d;
- }
- line[0] = ps;
- if (num_height == 0 || num_width == 0) // 直埋
- {
- newFeature.Geometry = line;
- newFeature.Geometry.Style = style;
- //newFeature.Name = eventid;
- newFeature.Name = en_cns.ContainsKey(eventid) == true ? en_cns[eventid].ToString() : eventid;
- SetFields(f, newFeature);
-
- pipeline.AddFeature(newFeature);
- }
- else
- {
- GSOFeature rectfeat = pipelineRect.CreateFeature();
- rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
- if (rectfeat != null)
- {
- SetFields(f, rectfeat);
- pipelineRect.AddFeature(rectfeat);
- }
- one2Multi(line, num_width, num_height, interval, style, pipeline, eventid, f);
- }
- }
-
- pipeline.Save();
- pipelineRect.Save();
- string strMessage = "shp文件中共" + features.Length + "个对象,实际入库" + pipeline.GetAllFeatures().Length + "个对象!\r\n";
- pipeline.Close();
- pipelineRect.Close();
- globeControl1.Refresh();
-
- GSOLayer layerRuku = globeControl1.Globe.Layers.Add(textBoxNewLayerName.Text);
- rukuLayer = layerRuku;
-
- if (message == "")
- {
- MessageBox.Show(strMessage, "提示");
- }
- else
- {
- //FrmMessageShow frm = new FrmMessageShow(strMessage + message);
- //frm.ShowDialog();
- MessageBox.Show(strMessage + message, "提示");
- }
-
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- catch (Exception ex)
- {
- //Log.PublishTxt(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- private void SetFields(GSOFeature oldfeat, GSOFeature newFeature)
- {
- for (int i = 0; i < oldfeat.GetFieldCount(); i++)
- {
- GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(oldfeat.GetFieldDefn(i));
-
- object fieldvalue = oldfeat.GetValue(fielddef.Name);
- if (fieldvalue == null)
- continue;
- string fieldName = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- newFeature.SetValue(fieldName, fieldvalue);
- }
- }
-
- private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
- {
- GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;
- GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
- if (style == null)
- {
- return null;
- }
- cloneline.Style = style;
- return cloneline;
- }
-
- private GSOExtendSectionLineStyle3D createRectStyle(double width, double height)
- {
- GSOExtendSectionLineStyle3D style = new GSOExtendSectionLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numOpaqueRect.Value), btnRectColor.BackColor);
- if (width == 0 || height == 0)
- {
- return null;
- }
- GSOPoint3ds sectionpts = new GSOPoint3ds();
- sectionpts.Add(new GSOPoint3d(width / -2, height / 2, 0));
- sectionpts.Add(new GSOPoint3d(width / -2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / 2, 0));
-
- style.SetSectionPoints(sectionpts);
- style.IsClosed = true;
- style.SetAnchorByAlign(EnumAlign.MiddleCenter);
-
- return style;
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOFeatureDataset layer,string name,GSOFeature oldfeat)
- {
- line = LatLon2Coord_Line(line);
-
- double width_all = interval * (num_width-1);
- double height_all = interval * (num_height-1);
-
- GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3d p1 = line[0][0];
- GSOPoint3d p2 = line[0][1];
- double daltaX = p2.X-p1.X;
- double daltaY = p2.Y-p1.Y;
- double agree = Math.Atan(daltaY/daltaX);
- GSOPoint2d point = new GSOPoint2d((-0.5*width_all-interval)*Math.Sin(agree),(0.5*width_all+interval)*Math.Cos(agree));
- line.MoveXY(point.X,point.Y);
- line.MoveZ(height_all / -2);
-
- for (int i = 0; i < num_width; i++)
- {
- for (int j = 0; j < num_height; j++)
- {
- GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;
- point = new GSOPoint2d((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));
- templine.MoveXY(point.X,point.Y);
- templine.MoveZ(interval*j);
- templine = Coord2LatLon_Line(templine);
- GSOFeature feat = layer.CreateFeature();
- feat.Geometry = templine;
- feat.Geometry.Style = style;
- feat.Name = name;
- SetFields(oldfeat, feat);
- layer.AddFeature(feat);
- }
- }
- }
-
- private GSOGeoPolyline3D LatLon2Coord_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = LatLon2Coord(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOGeoPolyline3D Coord2LatLon_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = Coord2LatLon(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOPoint2d LatLon2Coord(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, id);
- return result;
- }
-
- private GSOPoint2d Coord2LatLon(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, id);
- return result;
- //+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs
- }
-
- private GSOFeatureDataset CreateDBFeatureDataset(string name)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return null;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- MessageBox.Show("Shp图层为空!", "提示");
- return null;
- }
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- {
- MessageBox.Show("图层要素个数为0!", "提示");
- return null;
- }
- GSOFeatureDataset featureDataset = layer.Dataset as GSOFeatureDataset;
- if (featureDataset == null)
- {
- MessageBox.Show("Shp图层不是矢量图层!", "提示");
- return null;
- }
-
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return null ;
- }
- GSOFeatureDataset newFeatureDataset = ds.CreateFeatureDataset(name);
- if (newFeatureDataset != null)
- {
- for (int i = 0; i < featureDataset.FieldCount; i++)
- {
- GeoScene.Data.GSOFieldAttr fielddef = featureDataset.GetField(i);
-
- GSOFieldAttr field = new GSOFieldAttr();
- //field.Name = fielddef.Name;
- field.Name = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- field.Type = fielddef.Type;
- field.Width = fielddef.Width;
- field.Precision = fielddef.Precision;
- bool res = newFeatureDataset.AddField(field);
- }
- newFeatureDataset.Save();
- }
- return newFeatureDataset;
- }
-
- private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
- {
- if ((pipelineTypeCbo.Text != "给水") && (pipelineTypeCbo.Text != "天然气") &&
- (pipelineTypeCbo.Text != "燃气") && (pipelineTypeCbo.Text != "中水"))
- {
- cmbReference.Text = "管底";
- }
- else
- {
- cmbReference.Text = "管顶";
- }
-
- if (pipelineTypeCbo.Text == "给水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 255);
- }
- else if (pipelineTypeCbo.Text == "供电")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 100, 150);
- }
- else if (pipelineTypeCbo.Text == "雨水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(230, 120, 0);
- }
- else if (pipelineTypeCbo.Text == "污水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(128, 64, 0);
- }
- else if (pipelineTypeCbo.Text == "天然气")
- {
- btnPipelineColor.BackColor = Color.FromArgb(215, 0, 64);
- }
- else if (pipelineTypeCbo.Text == "共通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "电通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "有线电视")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "监控")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "交通信号")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "路灯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 0, 150);
- }
- else if (pipelineTypeCbo.Text == "通讯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 0);
- }
- }
-
- private object convertFieldValue(string fieldname, object obj)
- {
- if (obj == null)
- return null;
-
- try
- {
- string type = fields_types[fieldname].ToString();
- switch (type)
- {
- case "string":
- return obj.ToString();
- case "int":
- //return 101;
- int intResult;
- if (int.TryParse(obj.ToString(), out intResult))
- return intResult;
- else
- return null;
- case "double":
- //return 202.5;
- double doubleResult;
- if (double.TryParse(obj.ToString(), out doubleResult))
- return doubleResult;
- else
- return null;
- case "date":
- DateTime dtResult;
- if (DateTime.TryParse(obj.ToString(), out dtResult))
- return dtResult;
- else
- return null;
- }
- return null;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- return null;
- }
- }
-
- ///
- /// 验证shp格式文件
- ///
- ///
- ///
- private string valiPipeData(GSOLayer layer) //验证shp格式文件
- {
- 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 (fields_types.ContainsKey(fieldName))
- {
- string fieldType = fields_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("Deep1"))
- {
- txtMessage += "Deep1字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep1");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep1字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Deep2"))
- {
- txtMessage += "Deep2字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep2");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep2字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Diameter"))
- {
- txtMessage += "Diameter字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Diameter");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Diameter字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Handle"))
- {
- txtMessage += "Handle字段不存在!\r\n";
- }
- List lstHandle = new List();
- 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 (fields_types.ContainsKey(fieldName))
- {
- if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
- {
- txtMessage += "ID为" + f.ID + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
- }
- }
- }
- if (f.GetFieldAsFloat("Diameter") <= 0)
- {
- txtMessage += "ID为" + f.ID + "\"Diameter\"字段中的值必须大于0 \r\n";
- }
- if (!lstHandle.Contains(f.GetFieldAsString("Handle")))
- {
- lstHandle.Add(f.GetFieldAsString("Handle"));
- }
- else
- {
- txtMessage += "ID为" + f.ID + "的\"Handle\"字段中的值重复\r\n";
- }
- }
- }
- return txtMessage;
- }
-
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.resx b/FrmMultiPipelineModelDB.resx
deleted file mode 100644
index 1d40cb6..0000000
--- a/FrmMultiPipelineModelDB.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
-
-
- 156, 16
-
-
- 25
-
-
\ No newline at end of file
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/FrmMultiPipelineModelDB.Designer.cs b/FrmMultiPipelineModelDB.Designer.cs
deleted file mode 100644
index 8aa77b0..0000000
--- a/FrmMultiPipelineModelDB.Designer.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-namespace Cyberpipe
-{
- partial class FrmMultiPipelineModelDB
- {
- ///
- /// 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.label7 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBoxCornerSliceAngle = new System.Windows.Forms.TextBox();
- this.numericUpDownLineOpaque = new System.Windows.Forms.NumericUpDown();
- this.txtSlice = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.cmbRadius = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.cmbTo = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbFrom = new System.Windows.Forms.ComboBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.btnClose = new System.Windows.Forms.Button();
- this.btnCreateModel = new System.Windows.Forms.Button();
- this.textBoxNewLayerName = new System.Windows.Forms.TextBox();
- this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxShpLayerList = new System.Windows.Forms.ComboBox();
- this.colorDialog1 = new System.Windows.Forms.ColorDialog();
- this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.cmbID = new System.Windows.Forms.ComboBox();
- this.label11 = new System.Windows.Forms.Label();
- this.chkDeep = new System.Windows.Forms.CheckBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.cmbReference = new System.Windows.Forms.ComboBox();
- this.cmbWidthNum = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.cmbHeightNum = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.numOpaqueRect = new System.Windows.Forms.NumericUpDown();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.btnRectColor = new System.Windows.Forms.Button();
- this.pipelineTypeCbo = new DevComponents.DotNetBar.Controls.ComboBoxEx();
- this.label17 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).BeginInit();
- this.SuspendLayout();
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Location = new System.Drawing.Point(360, 395);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(17, 12);
- this.label7.TabIndex = 71;
- this.label7.Text = "度";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.BackColor = System.Drawing.Color.Transparent;
- this.label9.Location = new System.Drawing.Point(21, 393);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(77, 12);
- this.label9.TabIndex = 70;
- this.label9.Text = "拐弯平滑度:";
- //
- // textBoxCornerSliceAngle
- //
- this.textBoxCornerSliceAngle.Location = new System.Drawing.Point(131, 390);
- this.textBoxCornerSliceAngle.Name = "textBoxCornerSliceAngle";
- this.textBoxCornerSliceAngle.Size = new System.Drawing.Size(225, 21);
- this.textBoxCornerSliceAngle.TabIndex = 69;
- this.textBoxCornerSliceAngle.Text = "10";
- //
- // numericUpDownLineOpaque
- //
- this.numericUpDownLineOpaque.Location = new System.Drawing.Point(131, 334);
- this.numericUpDownLineOpaque.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numericUpDownLineOpaque.Name = "numericUpDownLineOpaque";
- this.numericUpDownLineOpaque.Size = new System.Drawing.Size(225, 21);
- this.numericUpDownLineOpaque.TabIndex = 68;
- this.numericUpDownLineOpaque.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- //
- // txtSlice
- //
- this.txtSlice.Location = new System.Drawing.Point(131, 362);
- this.txtSlice.Name = "txtSlice";
- this.txtSlice.Size = new System.Drawing.Size(224, 21);
- this.txtSlice.TabIndex = 67;
- this.txtSlice.Text = "24";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(20, 365);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(77, 12);
- this.label8.TabIndex = 65;
- this.label8.Text = "截面分段数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.BackColor = System.Drawing.Color.Transparent;
- this.label10.Location = new System.Drawing.Point(21, 336);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(53, 12);
- this.label10.TabIndex = 66;
- this.label10.Text = "透明度:";
- //
- // cmbRadius
- //
- this.cmbRadius.FormattingEnabled = true;
- this.cmbRadius.Location = new System.Drawing.Point(130, 196);
- this.cmbRadius.Name = "cmbRadius";
- this.cmbRadius.Size = new System.Drawing.Size(226, 20);
- this.cmbRadius.TabIndex = 64;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(20, 309);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 62;
- this.label6.Text = "管道颜色:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(20, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 63;
- this.label5.Text = "管径字段:";
- //
- // cmbTo
- //
- this.cmbTo.FormattingEnabled = true;
- this.cmbTo.Location = new System.Drawing.Point(130, 125);
- this.cmbTo.Name = "cmbTo";
- this.cmbTo.Size = new System.Drawing.Size(226, 20);
- this.cmbTo.TabIndex = 61;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(24, 132);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 60;
- this.label4.Text = "终点埋深:";
- //
- // cmbFrom
- //
- this.cmbFrom.FormattingEnabled = true;
- this.cmbFrom.Location = new System.Drawing.Point(129, 97);
- this.cmbFrom.Name = "cmbFrom";
- this.cmbFrom.Size = new System.Drawing.Size(226, 20);
- this.cmbFrom.TabIndex = 59;
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(14, 479);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(380, 2);
- this.groupBox1.TabIndex = 58;
- this.groupBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 103);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 12);
- this.label3.TabIndex = 55;
- this.label3.Text = "起点埋深:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(20, 72);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(89, 12);
- this.label2.TabIndex = 56;
- this.label2.Text = "管线图层名称:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(20, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(95, 12);
- this.label1.TabIndex = 57;
- this.label1.Text = "Shapefile图层:";
- //
- // btnClose
- //
- this.btnClose.Location = new System.Drawing.Point(282, 490);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 53;
- this.btnClose.Text = "关闭(&C)";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // btnCreateModel
- //
- this.btnCreateModel.Location = new System.Drawing.Point(199, 490);
- this.btnCreateModel.Name = "btnCreateModel";
- this.btnCreateModel.Size = new System.Drawing.Size(74, 23);
- this.btnCreateModel.TabIndex = 54;
- this.btnCreateModel.Text = "建模(&M)";
- this.btnCreateModel.UseVisualStyleBackColor = true;
- this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
- //
- // textBoxNewLayerName
- //
- this.textBoxNewLayerName.Location = new System.Drawing.Point(129, 67);
- this.textBoxNewLayerName.Name = "textBoxNewLayerName";
- this.textBoxNewLayerName.Size = new System.Drawing.Size(226, 21);
- this.textBoxNewLayerName.TabIndex = 51;
- //
- // btnPipelineColor
- //
- this.btnPipelineColor.BackColor = System.Drawing.Color.Gainsboro;
- this.btnPipelineColor.Location = new System.Drawing.Point(130, 304);
- this.btnPipelineColor.Name = "btnPipelineColor";
- this.btnPipelineColor.Size = new System.Drawing.Size(226, 23);
- this.btnPipelineColor.TabIndex = 48;
- this.btnPipelineColor.UseVisualStyleBackColor = false;
- this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
- //
- // comboBoxShpLayerList
- //
- this.comboBoxShpLayerList.FormattingEnabled = true;
- this.comboBoxShpLayerList.Location = new System.Drawing.Point(129, 11);
- this.comboBoxShpLayerList.Name = "comboBoxShpLayerList";
- this.comboBoxShpLayerList.Size = new System.Drawing.Size(226, 20);
- this.comboBoxShpLayerList.TabIndex = 72;
- this.comboBoxShpLayerList.SelectedIndexChanged += new System.EventHandler(this.cmbLayer_SelectedIndexChanged);
- //
- // cmbID
- //
- this.cmbID.FormattingEnabled = true;
- this.cmbID.Location = new System.Drawing.Point(130, 223);
- this.cmbID.Name = "cmbID";
- this.cmbID.Size = new System.Drawing.Size(226, 20);
- this.cmbID.TabIndex = 74;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(22, 227);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 73;
- this.label11.Text = "ID字段:";
- //
- // chkDeep
- //
- this.chkDeep.AutoSize = true;
- this.chkDeep.Location = new System.Drawing.Point(130, 150);
- this.chkDeep.Name = "chkDeep";
- this.chkDeep.Size = new System.Drawing.Size(144, 16);
- this.chkDeep.TabIndex = 75;
- this.chkDeep.Text = "埋深是否转换为相反数";
- this.chkDeep.UseVisualStyleBackColor = true;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(359, 200);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(29, 12);
- this.label12.TabIndex = 76;
- this.label12.Text = "毫米";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(20, 172);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(77, 12);
- this.label13.TabIndex = 63;
- this.label13.Text = "埋深参考点:";
- //
- // cmbReference
- //
- this.cmbReference.FormattingEnabled = true;
- this.cmbReference.Items.AddRange(new object[] {
- "管底",
- "管顶"});
- this.cmbReference.Location = new System.Drawing.Point(130, 168);
- this.cmbReference.Name = "cmbReference";
- this.cmbReference.Size = new System.Drawing.Size(226, 20);
- this.cmbReference.TabIndex = 64;
- //
- // cmbWidthNum
- //
- this.cmbWidthNum.FormattingEnabled = true;
- this.cmbWidthNum.Location = new System.Drawing.Point(131, 250);
- this.cmbWidthNum.Name = "cmbWidthNum";
- this.cmbWidthNum.Size = new System.Drawing.Size(226, 20);
- this.cmbWidthNum.TabIndex = 78;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(22, 254);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 77;
- this.label14.Text = "横向个数字段:";
- //
- // cmbHeightNum
- //
- this.cmbHeightNum.FormattingEnabled = true;
- this.cmbHeightNum.Location = new System.Drawing.Point(131, 277);
- this.cmbHeightNum.Name = "cmbHeightNum";
- this.cmbHeightNum.Size = new System.Drawing.Size(226, 20);
- this.cmbHeightNum.TabIndex = 80;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(22, 280);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(89, 12);
- this.label15.TabIndex = 79;
- this.label15.Text = "纵向个数字段:";
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(430, 246);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 81;
- this.label16.Text = "间距字段:";
- //
- // numOpaqueRect
- //
- this.numOpaqueRect.Location = new System.Drawing.Point(132, 451);
- this.numOpaqueRect.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numOpaqueRect.Name = "numOpaqueRect";
- this.numOpaqueRect.Size = new System.Drawing.Size(225, 21);
- this.numOpaqueRect.TabIndex = 88;
- this.numOpaqueRect.Value = new decimal(new int[] {
- 125,
- 0,
- 0,
- 0});
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Location = new System.Drawing.Point(24, 455);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(53, 12);
- this.label21.TabIndex = 87;
- this.label21.Text = "透明度:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(22, 424);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(65, 12);
- this.label22.TabIndex = 84;
- this.label22.Text = "管沟颜色:";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(430, 291);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(77, 12);
- this.label23.TabIndex = 85;
- this.label23.Text = "管沟宽字段:";
- //
- // btnRectColor
- //
- this.btnRectColor.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.btnRectColor.Location = new System.Drawing.Point(131, 419);
- this.btnRectColor.Name = "btnRectColor";
- this.btnRectColor.Size = new System.Drawing.Size(226, 23);
- this.btnRectColor.TabIndex = 83;
- this.btnRectColor.UseVisualStyleBackColor = false;
- //
- // pipelineTypeCbo
- //
- this.pipelineTypeCbo.DisplayMember = "Text";
- this.pipelineTypeCbo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.pipelineTypeCbo.FormattingEnabled = true;
- this.pipelineTypeCbo.ItemHeight = 15;
- this.pipelineTypeCbo.Location = new System.Drawing.Point(129, 40);
- this.pipelineTypeCbo.Name = "pipelineTypeCbo";
- this.pipelineTypeCbo.Size = new System.Drawing.Size(226, 21);
- this.pipelineTypeCbo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.pipelineTypeCbo.TabIndex = 126;
- this.pipelineTypeCbo.SelectedIndexChanged += new System.EventHandler(this.pipelineTypeCbo_SelectedIndexChanged);
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(20, 46);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(89, 12);
- this.label17.TabIndex = 125;
- this.label17.Text = "管线图层类型:";
- //
- // FrmMultiPipelineModelDB
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(406, 522);
- this.Controls.Add(this.pipelineTypeCbo);
- this.Controls.Add(this.label17);
- this.Controls.Add(this.numOpaqueRect);
- this.Controls.Add(this.label21);
- this.Controls.Add(this.label22);
- this.Controls.Add(this.label23);
- this.Controls.Add(this.btnRectColor);
- this.Controls.Add(this.label16);
- this.Controls.Add(this.cmbHeightNum);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.cmbWidthNum);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.chkDeep);
- this.Controls.Add(this.cmbID);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.comboBoxShpLayerList);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.textBoxCornerSliceAngle);
- this.Controls.Add(this.numericUpDownLineOpaque);
- this.Controls.Add(this.txtSlice);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.cmbReference);
- this.Controls.Add(this.cmbRadius);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.cmbTo);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.cmbFrom);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.btnCreateModel);
- this.Controls.Add(this.textBoxNewLayerName);
- this.Controls.Add(this.btnPipelineColor);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.Name = "FrmMultiPipelineModelDB";
- this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "管孔方沟入库";
- this.Load += new System.EventHandler(this.FrmMultiPipelineModelDB_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBoxCornerSliceAngle;
- private System.Windows.Forms.NumericUpDown numericUpDownLineOpaque;
- private System.Windows.Forms.TextBox txtSlice;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ComboBox cmbRadius;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.ComboBox cmbTo;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.ComboBox cmbFrom;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.Button btnCreateModel;
- private System.Windows.Forms.TextBox textBoxNewLayerName;
- private System.Windows.Forms.Button btnPipelineColor;
- private System.Windows.Forms.ComboBox comboBoxShpLayerList;
- private System.Windows.Forms.ColorDialog colorDialog1;
- private System.Windows.Forms.SaveFileDialog saveFileDialog1;
- private System.Windows.Forms.ComboBox cmbID;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.CheckBox chkDeep;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.ComboBox cmbReference;
- private System.Windows.Forms.ComboBox cmbWidthNum;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.ComboBox cmbHeightNum;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.NumericUpDown numOpaqueRect;
- private System.Windows.Forms.Label label21;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.Button btnRectColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx pipelineTypeCbo;
- private System.Windows.Forms.Label label17;
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.cs b/FrmMultiPipelineModelDB.cs
deleted file mode 100644
index 0a0516a..0000000
--- a/FrmMultiPipelineModelDB.cs
+++ /dev/null
@@ -1,814 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using DevComponents.DotNetBar;
-using GeoScene.Globe;
-using GeoScene.Engine;
-using GeoScene.Data;
-using System.IO;
-using System.Collections;
-using System.Xml;
-
-namespace Cyberpipe
-{
- public partial class FrmMultiPipelineModelDB : Office2007Form
- {
- private GeoScene.Globe.GSOGlobeControl globeControl1;
- GSODataSource ds = null;
- public GSOLayer rukuLayer = null;
- private Hashtable en_cns = new Hashtable();
- private Hashtable fields_types = new Hashtable();
-
- public FrmMultiPipelineModelDB(GSOGlobeControl _globeControl,GSODataSource _ds)
- {
- globeControl1 = _globeControl;
- ds = _ds;
- InitializeComponent();
-
- cmbReference.Text = "管顶";
- chkDeep.Checked = true;
- }
-
- private void FrmMultiPipelineModelDB_Load(object sender, EventArgs e)
- {
- string pipelinetype = Utility.pipelinetype;
- string[] pipelinetypes = pipelinetype.Split(',');
- for (int i = 0; i < pipelinetypes.Length; i++)
- {
- pipelineTypeCbo.Items.Add(pipelinetypes[i]);
- }
-
- comboBoxShpLayerList.Items.Clear();
-
- for (int i = 0; i < globeControl1.Globe.Layers.Count; i++)
- {
- GSOLayer layer = globeControl1.Globe.Layers[i];
- if (layer != null && layer.Name.ToLower().EndsWith(".shp"))
- {
- comboBoxShpLayerList.Items.Add(layer.Caption);
- }
- }
-
- string filename = Application.StartupPath + "\\FormText.xml";
- if (File.Exists(filename))
- {
- XmlTextReader XmlReader = new XmlTextReader(filename);
- try
- {
- while (XmlReader.Read())
- {
- if (XmlReader.Name == "Field")
- {
- string str1 = XmlReader["label"];
- string str3 = XmlReader["type"];
- string str2 = XmlReader.ReadElementString();
- en_cns.Add(str1, str2);
- fields_types.Add(str1, str3);
- }
- }
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- }
-
- private void cmbLayer_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- return;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- return;
- }
- string txtMessage = valiPipeData(layer);
- if (txtMessage != "")
- {
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(comboBoxShpLayerList.SelectedItem.ToString().Trim(), txtMessage);
- showErrorMessage.ShowDialog();
- return;
- }
- else
- {
- textBoxNewLayerName.Text = layer.Caption;
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- return;
-
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- for (int i = 0; i < features[0].GetFieldCount(); i++)
- {
- cmbFrom.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbTo.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbRadius.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbID.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbWidthNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbHeightNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- }
- cmbFrom.SelectedItem = "Deep1";
- cmbTo.SelectedItem = "Deep2";
- cmbRadius.SelectedItem = "Diameter";
- cmbWidthNum.SelectedItem = "Hor_Num";// "Weight";
- cmbHeightNum.SelectedItem = "Ver_Num";// "Height";
- cmbID.SelectedItem = "Handle";
- }
-
- }
-
- private void btnPipelineColor_Click(object sender, EventArgs e)
- {
- colorDialog1.Color = btnPipelineColor.BackColor;
-
- if (colorDialog1.ShowDialog() == DialogResult.OK)
- {
- btnPipelineColor.BackColor = colorDialog1.Color;
- }
- }
-
- private void btnCreateModel_Click(object sender, EventArgs e)
- {
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return;
- }
- if (string.IsNullOrEmpty(textBoxNewLayerName.Text))
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return;
- }
- if (ds.GetDatasetByName(textBoxNewLayerName.Text) != null)
- {
- MessageBox.Show("图层名称已存在!", "提示");
- return;
- }
- try
- {
- GSOLayer ShpSourceLayer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- GSOFeatureDataset pipeline = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim());
- if (pipeline == null)
- {
- MessageBox.Show("输入的图层名称不符合要求!", "提示");
- return;
- }
- pipeline.Open();
- GSOFeatureDataset pipelineRect = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim() + "_Rect");
- if (pipelineRect == null)
- {
- return;
- }
- pipelineRect.Open();
-
- GSOFeatures features = ShpSourceLayer.GetAllFeatures();
- string message = "";
- for (int j = 0; j < features.Length; j++)
- {
- GSOFeature f = features[j];
-
- GSOFeature newFeature = pipeline.CreateFeature();
-
- GSOPipeLineStyle3D style = new GSOPipeLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numericUpDownLineOpaque.Value), btnPipelineColor.BackColor);
-
- double radius = 0;
- if (cmbRadius.SelectedItem == null)
- {
- cmbRadius.SelectedIndex = 0;
- }
- GSOFieldDefn diameterfield = (GSOFieldDefn)f.GetFieldDefn(cmbRadius.SelectedItem.ToString());
- string fieldText = f.GetFieldAsString(cmbRadius.SelectedItem.ToString());
- if (diameterfield.Type == EnumFieldType.Text)
- {
- if (double.TryParse(fieldText, out radius))
- {
- radius = radius / 2000;
- }
- else
- {
- message += "ID为" + f.ID + "的对象的管径字段值不符合要求!\r\n";
- continue;
- }
- }
- else
- {
- radius = f.GetFieldAsDouble(cmbRadius.SelectedItem.ToString()) / 2000; // 探测数据的单位一般是毫米,需换算为米; 管径一般是 直径, 这个需要半径, 所有除以2000
- }
-
- if (cmbID.SelectedItem == null)
- {
- cmbID.SelectedIndex = 0;
- }
- if (cmbWidthNum.SelectedItem == null)
- {
- cmbWidthNum.SelectedIndex = 0;
- }
- if (cmbHeightNum.SelectedItem == null)
- {
- cmbHeightNum.SelectedIndex = 0;
- }
- string eventid = f.GetFieldAsString(cmbID.SelectedItem.ToString());
- double interval = radius * 2;
- int num_width = 0;
- int num_height = 0;
- if (!int.TryParse(f.GetFieldAsString(cmbWidthNum.SelectedItem.ToString()), out num_width))
- {
- message += "ID为" + f.ID + "的对象的宽度字段值不符合要求!\r\n";
- continue;
- }
- if (!int.TryParse(f.GetFieldAsString(cmbHeightNum.SelectedItem.ToString()), out num_height))
- {
- message += "ID为" + f.ID + "的对象的高度字段值不符合要求!\r\n";
- continue;
- }
-
- double rectWidth = Math.Round( radius * 2.0 * num_width + 0.08,5);// 两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- if (radius == 0)
- {
- message += "ID为" + f.ID + "的对象的管径字段值为0!\r\n";
- continue;
- }
-
- int intSlice = 0;
- double cornerSliceAngle = 0;
- if (!int.TryParse(txtSlice.Text.Trim(), out intSlice))
- {
- message += "ID为" + f.ID + "的对象的截面分段数字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(textBoxCornerSliceAngle.Text.Trim(), out cornerSliceAngle))
- {
- message += "ID为" + f.ID + "的对象的拐弯平滑度字段值不符合要求!\r\n";
- continue;
- }
- style.Radius = radius;
- style.Slice = intSlice;
- style.CornerSliceAngle = cornerSliceAngle;
-
- f.Geometry.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- GSOGeoPolyline3D line = f.Geometry as GSOGeoPolyline3D;
- if (line == null)
- {
- message += "ID为" + f.ID + "的对象不是一个线对象!\r\n";
- continue;
- }
-
- if (cmbFrom.SelectedItem == null)
- {
- cmbFrom.SelectedIndex = 0;
- }
- if (cmbTo.SelectedItem == null)
- {
- cmbTo.SelectedIndex = 0;
- }
- double deep1 = 0;
- double deep2 = 0;
- if (!double.TryParse(f.GetFieldAsString(cmbFrom.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep1))
- {
- message += "ID为" + f.ID + "的对象的起点埋深字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(f.GetFieldAsString(cmbTo.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep2))
- {
- message += "ID为" + f.ID + "的对象的终点埋深字段值不符合要求!\r\n";
- continue;
- }
-
- if (chkDeep.Checked)
- {
- deep1 = 0 - deep1;
- deep2 = 0 - deep2;
- }
-
- if (cmbReference.SelectedIndex == 0) //管底
- {
- deep1 = deep1 + radius * 2;
- deep2 = deep2 + radius * 2;
- }
- else if (cmbReference.SelectedIndex == 1) //管顶
- {
- deep1 = deep1 - radius * 2;
- deep2 = deep2 - radius * 2;
- }
- GSOPoint3ds ps = line[0];
- for (int n = 0; n < ps.Count; n++)
- {
- GSOPoint3d pt3d = ps[n];
- int pointcount = ps.Count;
- double radio = Math.Sqrt(Math.Pow(pt3d.Y - ps[0].Y, 2) + Math.Pow(pt3d.X - ps[0].X, 2)) / Math.Sqrt(Math.Pow(ps[pointcount - 1].Y - ps[0].Y, 2) + Math.Pow(ps[pointcount - 1].X - ps[0].X, 2));
- pt3d.Z = deep1 + (deep2 - deep1) * radio;
-
- if (double.IsInfinity(pt3d.Z))
- {
- pt3d.Z = deep2;
- }
- ps[n] = pt3d;
- }
- line[0] = ps;
- if (num_height == 0 || num_width == 0) // 直埋
- {
- newFeature.Geometry = line;
- newFeature.Geometry.Style = style;
- //newFeature.Name = eventid;
- newFeature.Name = en_cns.ContainsKey(eventid) == true ? en_cns[eventid].ToString() : eventid;
- SetFields(f, newFeature);
-
- pipeline.AddFeature(newFeature);
- }
- else
- {
- GSOFeature rectfeat = pipelineRect.CreateFeature();
- rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
- if (rectfeat != null)
- {
- SetFields(f, rectfeat);
- pipelineRect.AddFeature(rectfeat);
- }
- one2Multi(line, num_width, num_height, interval, style, pipeline, eventid, f);
- }
- }
-
- pipeline.Save();
- pipelineRect.Save();
- string strMessage = "shp文件中共" + features.Length + "个对象,实际入库" + pipeline.GetAllFeatures().Length + "个对象!\r\n";
- pipeline.Close();
- pipelineRect.Close();
- globeControl1.Refresh();
-
- GSOLayer layerRuku = globeControl1.Globe.Layers.Add(textBoxNewLayerName.Text);
- rukuLayer = layerRuku;
-
- if (message == "")
- {
- MessageBox.Show(strMessage, "提示");
- }
- else
- {
- //FrmMessageShow frm = new FrmMessageShow(strMessage + message);
- //frm.ShowDialog();
- MessageBox.Show(strMessage + message, "提示");
- }
-
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- catch (Exception ex)
- {
- //Log.PublishTxt(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- private void SetFields(GSOFeature oldfeat, GSOFeature newFeature)
- {
- for (int i = 0; i < oldfeat.GetFieldCount(); i++)
- {
- GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(oldfeat.GetFieldDefn(i));
-
- object fieldvalue = oldfeat.GetValue(fielddef.Name);
- if (fieldvalue == null)
- continue;
- string fieldName = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- newFeature.SetValue(fieldName, fieldvalue);
- }
- }
-
- private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
- {
- GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;
- GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
- if (style == null)
- {
- return null;
- }
- cloneline.Style = style;
- return cloneline;
- }
-
- private GSOExtendSectionLineStyle3D createRectStyle(double width, double height)
- {
- GSOExtendSectionLineStyle3D style = new GSOExtendSectionLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numOpaqueRect.Value), btnRectColor.BackColor);
- if (width == 0 || height == 0)
- {
- return null;
- }
- GSOPoint3ds sectionpts = new GSOPoint3ds();
- sectionpts.Add(new GSOPoint3d(width / -2, height / 2, 0));
- sectionpts.Add(new GSOPoint3d(width / -2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / 2, 0));
-
- style.SetSectionPoints(sectionpts);
- style.IsClosed = true;
- style.SetAnchorByAlign(EnumAlign.MiddleCenter);
-
- return style;
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOFeatureDataset layer,string name,GSOFeature oldfeat)
- {
- line = LatLon2Coord_Line(line);
-
- double width_all = interval * (num_width-1);
- double height_all = interval * (num_height-1);
-
- GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3d p1 = line[0][0];
- GSOPoint3d p2 = line[0][1];
- double daltaX = p2.X-p1.X;
- double daltaY = p2.Y-p1.Y;
- double agree = Math.Atan(daltaY/daltaX);
- GSOPoint2d point = new GSOPoint2d((-0.5*width_all-interval)*Math.Sin(agree),(0.5*width_all+interval)*Math.Cos(agree));
- line.MoveXY(point.X,point.Y);
- line.MoveZ(height_all / -2);
-
- for (int i = 0; i < num_width; i++)
- {
- for (int j = 0; j < num_height; j++)
- {
- GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;
- point = new GSOPoint2d((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));
- templine.MoveXY(point.X,point.Y);
- templine.MoveZ(interval*j);
- templine = Coord2LatLon_Line(templine);
- GSOFeature feat = layer.CreateFeature();
- feat.Geometry = templine;
- feat.Geometry.Style = style;
- feat.Name = name;
- SetFields(oldfeat, feat);
- layer.AddFeature(feat);
- }
- }
- }
-
- private GSOGeoPolyline3D LatLon2Coord_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = LatLon2Coord(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOGeoPolyline3D Coord2LatLon_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = Coord2LatLon(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOPoint2d LatLon2Coord(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, id);
- return result;
- }
-
- private GSOPoint2d Coord2LatLon(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, id);
- return result;
- //+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs
- }
-
- private GSOFeatureDataset CreateDBFeatureDataset(string name)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return null;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- MessageBox.Show("Shp图层为空!", "提示");
- return null;
- }
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- {
- MessageBox.Show("图层要素个数为0!", "提示");
- return null;
- }
- GSOFeatureDataset featureDataset = layer.Dataset as GSOFeatureDataset;
- if (featureDataset == null)
- {
- MessageBox.Show("Shp图层不是矢量图层!", "提示");
- return null;
- }
-
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return null ;
- }
- GSOFeatureDataset newFeatureDataset = ds.CreateFeatureDataset(name);
- if (newFeatureDataset != null)
- {
- for (int i = 0; i < featureDataset.FieldCount; i++)
- {
- GeoScene.Data.GSOFieldAttr fielddef = featureDataset.GetField(i);
-
- GSOFieldAttr field = new GSOFieldAttr();
- //field.Name = fielddef.Name;
- field.Name = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- field.Type = fielddef.Type;
- field.Width = fielddef.Width;
- field.Precision = fielddef.Precision;
- bool res = newFeatureDataset.AddField(field);
- }
- newFeatureDataset.Save();
- }
- return newFeatureDataset;
- }
-
- private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
- {
- if ((pipelineTypeCbo.Text != "给水") && (pipelineTypeCbo.Text != "天然气") &&
- (pipelineTypeCbo.Text != "燃气") && (pipelineTypeCbo.Text != "中水"))
- {
- cmbReference.Text = "管底";
- }
- else
- {
- cmbReference.Text = "管顶";
- }
-
- if (pipelineTypeCbo.Text == "给水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 255);
- }
- else if (pipelineTypeCbo.Text == "供电")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 100, 150);
- }
- else if (pipelineTypeCbo.Text == "雨水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(230, 120, 0);
- }
- else if (pipelineTypeCbo.Text == "污水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(128, 64, 0);
- }
- else if (pipelineTypeCbo.Text == "天然气")
- {
- btnPipelineColor.BackColor = Color.FromArgb(215, 0, 64);
- }
- else if (pipelineTypeCbo.Text == "共通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "电通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "有线电视")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "监控")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "交通信号")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "路灯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 0, 150);
- }
- else if (pipelineTypeCbo.Text == "通讯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 0);
- }
- }
-
- private object convertFieldValue(string fieldname, object obj)
- {
- if (obj == null)
- return null;
-
- try
- {
- string type = fields_types[fieldname].ToString();
- switch (type)
- {
- case "string":
- return obj.ToString();
- case "int":
- //return 101;
- int intResult;
- if (int.TryParse(obj.ToString(), out intResult))
- return intResult;
- else
- return null;
- case "double":
- //return 202.5;
- double doubleResult;
- if (double.TryParse(obj.ToString(), out doubleResult))
- return doubleResult;
- else
- return null;
- case "date":
- DateTime dtResult;
- if (DateTime.TryParse(obj.ToString(), out dtResult))
- return dtResult;
- else
- return null;
- }
- return null;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- return null;
- }
- }
-
- ///
- /// 验证shp格式文件
- ///
- ///
- ///
- private string valiPipeData(GSOLayer layer) //验证shp格式文件
- {
- 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 (fields_types.ContainsKey(fieldName))
- {
- string fieldType = fields_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("Deep1"))
- {
- txtMessage += "Deep1字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep1");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep1字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Deep2"))
- {
- txtMessage += "Deep2字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep2");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep2字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Diameter"))
- {
- txtMessage += "Diameter字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Diameter");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Diameter字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Handle"))
- {
- txtMessage += "Handle字段不存在!\r\n";
- }
- List lstHandle = new List();
- 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 (fields_types.ContainsKey(fieldName))
- {
- if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
- {
- txtMessage += "ID为" + f.ID + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
- }
- }
- }
- if (f.GetFieldAsFloat("Diameter") <= 0)
- {
- txtMessage += "ID为" + f.ID + "\"Diameter\"字段中的值必须大于0 \r\n";
- }
- if (!lstHandle.Contains(f.GetFieldAsString("Handle")))
- {
- lstHandle.Add(f.GetFieldAsString("Handle"));
- }
- else
- {
- txtMessage += "ID为" + f.ID + "的\"Handle\"字段中的值重复\r\n";
- }
- }
- }
- return txtMessage;
- }
-
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.resx b/FrmMultiPipelineModelDB.resx
deleted file mode 100644
index 1d40cb6..0000000
--- a/FrmMultiPipelineModelDB.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
-
-
- 156, 16
-
-
- 25
-
-
\ No newline at end of file
diff --git a/MainFrm.cs b/MainFrm.cs
index 30a34a5..8e37fde 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -6324,9 +6324,6 @@
buttonItemSH4.Checked = globeControl1.Globe.StatusBar.Visible;
globeControl1.Globe.Refresh();
}
-
-
-
///
/// 添加指定路径下的数据 功能
///
@@ -6368,7 +6365,6 @@
node.SelectedImageIndex = 0;
node.Checked = terrain.Visible;
// 注意用insert不要用add,因为后加入的图层在上层
- // terrainManagerNode.Nodes.Add(node);
layerManagerNode.Nodes.Insert(0, node);
}
newlayername = terrain.Caption;
@@ -8386,9 +8382,6 @@
}
}
}
-
-
-
///
/// 管线自动缩进 菜单
///
@@ -8399,71 +8392,6 @@
FrmPipelineIndented frm = new FrmPipelineIndented(globeControl1, m_PipelineLayerNames, workwellLayerNames);
frm.ShowDialog(this);
}
-
- private void btnExportCADs_Click(object sender, EventArgs e)
- {
-
- }
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 统计指定图层在指定范围内的所有feature对象
///
@@ -8576,17 +8504,19 @@
try
{
-
string dbIp = Utility.sgdbip;
string database = Utility.sgdbname;
string user = Utility.sgdbuser;
string pass = Utility.sgdbpwd;
- shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "", user, pass);
+ shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "",
+ user, pass);
if (shds == null)
{
MessageBox.Show("数据库连接失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+
+ //Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+ Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -8598,7 +8528,6 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
}
///
@@ -11196,137 +11125,6 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
///
/// 数据质量检查
///
@@ -12463,7 +12261,6 @@
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
//zhanshi = false;
@@ -12646,231 +12443,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
-
private void btn_check_history_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_check_history.Text);
@@ -12973,18 +12545,6 @@
LogManager.saveLog(Utility.userName, this.btn_document_info.Text);
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //FormDocumentManager frm = new FormDocumentManager();
- //frm.ShowDialog();
-
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //new FormDocumentManager().ShowDialog();
if (FormDocumentManager.IS_OPEN)
{
return;
@@ -13121,31 +12681,7 @@
FrmChangePassword frm = new FrmChangePassword();
frm.ShowDialog();
}
- ///
- /// 多孔管线入库
- ///
- ///
- ///
- private void buttonItem9_Click(object sender, EventArgs e)
- {
- //保存日志
- LogManager.saveLog(Utility.userName, this.buttonItemSJGL4_2.Text);
-
- if (ds == null)
- {
- MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- ConnectDB(null, null);
- }
- if (ds == null)
- return;
-
- FrmMultiPipelineModelDB frm = new FrmMultiPipelineModelDB(globeControl1, ds);
- if (frm.ShowDialog() == DialogResult.OK)
- {
- addNodeToLayerManagerNode(frm.rukuLayer);
- }
- //frm.Show();
- }
+
private void 导出CADToolStripMenuItem1_Click(object sender, EventArgs e)
{
TreeNode node = layerNodeContexMenu.Tag as TreeNode;
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/FrmMultiPipelineModelDB.Designer.cs b/FrmMultiPipelineModelDB.Designer.cs
deleted file mode 100644
index 8aa77b0..0000000
--- a/FrmMultiPipelineModelDB.Designer.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-namespace Cyberpipe
-{
- partial class FrmMultiPipelineModelDB
- {
- ///
- /// 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.label7 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBoxCornerSliceAngle = new System.Windows.Forms.TextBox();
- this.numericUpDownLineOpaque = new System.Windows.Forms.NumericUpDown();
- this.txtSlice = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.cmbRadius = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.cmbTo = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbFrom = new System.Windows.Forms.ComboBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.btnClose = new System.Windows.Forms.Button();
- this.btnCreateModel = new System.Windows.Forms.Button();
- this.textBoxNewLayerName = new System.Windows.Forms.TextBox();
- this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxShpLayerList = new System.Windows.Forms.ComboBox();
- this.colorDialog1 = new System.Windows.Forms.ColorDialog();
- this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.cmbID = new System.Windows.Forms.ComboBox();
- this.label11 = new System.Windows.Forms.Label();
- this.chkDeep = new System.Windows.Forms.CheckBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.cmbReference = new System.Windows.Forms.ComboBox();
- this.cmbWidthNum = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.cmbHeightNum = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.numOpaqueRect = new System.Windows.Forms.NumericUpDown();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.btnRectColor = new System.Windows.Forms.Button();
- this.pipelineTypeCbo = new DevComponents.DotNetBar.Controls.ComboBoxEx();
- this.label17 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).BeginInit();
- this.SuspendLayout();
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Location = new System.Drawing.Point(360, 395);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(17, 12);
- this.label7.TabIndex = 71;
- this.label7.Text = "度";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.BackColor = System.Drawing.Color.Transparent;
- this.label9.Location = new System.Drawing.Point(21, 393);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(77, 12);
- this.label9.TabIndex = 70;
- this.label9.Text = "拐弯平滑度:";
- //
- // textBoxCornerSliceAngle
- //
- this.textBoxCornerSliceAngle.Location = new System.Drawing.Point(131, 390);
- this.textBoxCornerSliceAngle.Name = "textBoxCornerSliceAngle";
- this.textBoxCornerSliceAngle.Size = new System.Drawing.Size(225, 21);
- this.textBoxCornerSliceAngle.TabIndex = 69;
- this.textBoxCornerSliceAngle.Text = "10";
- //
- // numericUpDownLineOpaque
- //
- this.numericUpDownLineOpaque.Location = new System.Drawing.Point(131, 334);
- this.numericUpDownLineOpaque.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numericUpDownLineOpaque.Name = "numericUpDownLineOpaque";
- this.numericUpDownLineOpaque.Size = new System.Drawing.Size(225, 21);
- this.numericUpDownLineOpaque.TabIndex = 68;
- this.numericUpDownLineOpaque.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- //
- // txtSlice
- //
- this.txtSlice.Location = new System.Drawing.Point(131, 362);
- this.txtSlice.Name = "txtSlice";
- this.txtSlice.Size = new System.Drawing.Size(224, 21);
- this.txtSlice.TabIndex = 67;
- this.txtSlice.Text = "24";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(20, 365);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(77, 12);
- this.label8.TabIndex = 65;
- this.label8.Text = "截面分段数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.BackColor = System.Drawing.Color.Transparent;
- this.label10.Location = new System.Drawing.Point(21, 336);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(53, 12);
- this.label10.TabIndex = 66;
- this.label10.Text = "透明度:";
- //
- // cmbRadius
- //
- this.cmbRadius.FormattingEnabled = true;
- this.cmbRadius.Location = new System.Drawing.Point(130, 196);
- this.cmbRadius.Name = "cmbRadius";
- this.cmbRadius.Size = new System.Drawing.Size(226, 20);
- this.cmbRadius.TabIndex = 64;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(20, 309);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 62;
- this.label6.Text = "管道颜色:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(20, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 63;
- this.label5.Text = "管径字段:";
- //
- // cmbTo
- //
- this.cmbTo.FormattingEnabled = true;
- this.cmbTo.Location = new System.Drawing.Point(130, 125);
- this.cmbTo.Name = "cmbTo";
- this.cmbTo.Size = new System.Drawing.Size(226, 20);
- this.cmbTo.TabIndex = 61;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(24, 132);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 60;
- this.label4.Text = "终点埋深:";
- //
- // cmbFrom
- //
- this.cmbFrom.FormattingEnabled = true;
- this.cmbFrom.Location = new System.Drawing.Point(129, 97);
- this.cmbFrom.Name = "cmbFrom";
- this.cmbFrom.Size = new System.Drawing.Size(226, 20);
- this.cmbFrom.TabIndex = 59;
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(14, 479);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(380, 2);
- this.groupBox1.TabIndex = 58;
- this.groupBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 103);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 12);
- this.label3.TabIndex = 55;
- this.label3.Text = "起点埋深:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(20, 72);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(89, 12);
- this.label2.TabIndex = 56;
- this.label2.Text = "管线图层名称:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(20, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(95, 12);
- this.label1.TabIndex = 57;
- this.label1.Text = "Shapefile图层:";
- //
- // btnClose
- //
- this.btnClose.Location = new System.Drawing.Point(282, 490);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 53;
- this.btnClose.Text = "关闭(&C)";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // btnCreateModel
- //
- this.btnCreateModel.Location = new System.Drawing.Point(199, 490);
- this.btnCreateModel.Name = "btnCreateModel";
- this.btnCreateModel.Size = new System.Drawing.Size(74, 23);
- this.btnCreateModel.TabIndex = 54;
- this.btnCreateModel.Text = "建模(&M)";
- this.btnCreateModel.UseVisualStyleBackColor = true;
- this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
- //
- // textBoxNewLayerName
- //
- this.textBoxNewLayerName.Location = new System.Drawing.Point(129, 67);
- this.textBoxNewLayerName.Name = "textBoxNewLayerName";
- this.textBoxNewLayerName.Size = new System.Drawing.Size(226, 21);
- this.textBoxNewLayerName.TabIndex = 51;
- //
- // btnPipelineColor
- //
- this.btnPipelineColor.BackColor = System.Drawing.Color.Gainsboro;
- this.btnPipelineColor.Location = new System.Drawing.Point(130, 304);
- this.btnPipelineColor.Name = "btnPipelineColor";
- this.btnPipelineColor.Size = new System.Drawing.Size(226, 23);
- this.btnPipelineColor.TabIndex = 48;
- this.btnPipelineColor.UseVisualStyleBackColor = false;
- this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
- //
- // comboBoxShpLayerList
- //
- this.comboBoxShpLayerList.FormattingEnabled = true;
- this.comboBoxShpLayerList.Location = new System.Drawing.Point(129, 11);
- this.comboBoxShpLayerList.Name = "comboBoxShpLayerList";
- this.comboBoxShpLayerList.Size = new System.Drawing.Size(226, 20);
- this.comboBoxShpLayerList.TabIndex = 72;
- this.comboBoxShpLayerList.SelectedIndexChanged += new System.EventHandler(this.cmbLayer_SelectedIndexChanged);
- //
- // cmbID
- //
- this.cmbID.FormattingEnabled = true;
- this.cmbID.Location = new System.Drawing.Point(130, 223);
- this.cmbID.Name = "cmbID";
- this.cmbID.Size = new System.Drawing.Size(226, 20);
- this.cmbID.TabIndex = 74;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(22, 227);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 73;
- this.label11.Text = "ID字段:";
- //
- // chkDeep
- //
- this.chkDeep.AutoSize = true;
- this.chkDeep.Location = new System.Drawing.Point(130, 150);
- this.chkDeep.Name = "chkDeep";
- this.chkDeep.Size = new System.Drawing.Size(144, 16);
- this.chkDeep.TabIndex = 75;
- this.chkDeep.Text = "埋深是否转换为相反数";
- this.chkDeep.UseVisualStyleBackColor = true;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(359, 200);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(29, 12);
- this.label12.TabIndex = 76;
- this.label12.Text = "毫米";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(20, 172);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(77, 12);
- this.label13.TabIndex = 63;
- this.label13.Text = "埋深参考点:";
- //
- // cmbReference
- //
- this.cmbReference.FormattingEnabled = true;
- this.cmbReference.Items.AddRange(new object[] {
- "管底",
- "管顶"});
- this.cmbReference.Location = new System.Drawing.Point(130, 168);
- this.cmbReference.Name = "cmbReference";
- this.cmbReference.Size = new System.Drawing.Size(226, 20);
- this.cmbReference.TabIndex = 64;
- //
- // cmbWidthNum
- //
- this.cmbWidthNum.FormattingEnabled = true;
- this.cmbWidthNum.Location = new System.Drawing.Point(131, 250);
- this.cmbWidthNum.Name = "cmbWidthNum";
- this.cmbWidthNum.Size = new System.Drawing.Size(226, 20);
- this.cmbWidthNum.TabIndex = 78;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(22, 254);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 77;
- this.label14.Text = "横向个数字段:";
- //
- // cmbHeightNum
- //
- this.cmbHeightNum.FormattingEnabled = true;
- this.cmbHeightNum.Location = new System.Drawing.Point(131, 277);
- this.cmbHeightNum.Name = "cmbHeightNum";
- this.cmbHeightNum.Size = new System.Drawing.Size(226, 20);
- this.cmbHeightNum.TabIndex = 80;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(22, 280);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(89, 12);
- this.label15.TabIndex = 79;
- this.label15.Text = "纵向个数字段:";
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(430, 246);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 81;
- this.label16.Text = "间距字段:";
- //
- // numOpaqueRect
- //
- this.numOpaqueRect.Location = new System.Drawing.Point(132, 451);
- this.numOpaqueRect.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numOpaqueRect.Name = "numOpaqueRect";
- this.numOpaqueRect.Size = new System.Drawing.Size(225, 21);
- this.numOpaqueRect.TabIndex = 88;
- this.numOpaqueRect.Value = new decimal(new int[] {
- 125,
- 0,
- 0,
- 0});
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Location = new System.Drawing.Point(24, 455);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(53, 12);
- this.label21.TabIndex = 87;
- this.label21.Text = "透明度:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(22, 424);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(65, 12);
- this.label22.TabIndex = 84;
- this.label22.Text = "管沟颜色:";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(430, 291);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(77, 12);
- this.label23.TabIndex = 85;
- this.label23.Text = "管沟宽字段:";
- //
- // btnRectColor
- //
- this.btnRectColor.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.btnRectColor.Location = new System.Drawing.Point(131, 419);
- this.btnRectColor.Name = "btnRectColor";
- this.btnRectColor.Size = new System.Drawing.Size(226, 23);
- this.btnRectColor.TabIndex = 83;
- this.btnRectColor.UseVisualStyleBackColor = false;
- //
- // pipelineTypeCbo
- //
- this.pipelineTypeCbo.DisplayMember = "Text";
- this.pipelineTypeCbo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.pipelineTypeCbo.FormattingEnabled = true;
- this.pipelineTypeCbo.ItemHeight = 15;
- this.pipelineTypeCbo.Location = new System.Drawing.Point(129, 40);
- this.pipelineTypeCbo.Name = "pipelineTypeCbo";
- this.pipelineTypeCbo.Size = new System.Drawing.Size(226, 21);
- this.pipelineTypeCbo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.pipelineTypeCbo.TabIndex = 126;
- this.pipelineTypeCbo.SelectedIndexChanged += new System.EventHandler(this.pipelineTypeCbo_SelectedIndexChanged);
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(20, 46);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(89, 12);
- this.label17.TabIndex = 125;
- this.label17.Text = "管线图层类型:";
- //
- // FrmMultiPipelineModelDB
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(406, 522);
- this.Controls.Add(this.pipelineTypeCbo);
- this.Controls.Add(this.label17);
- this.Controls.Add(this.numOpaqueRect);
- this.Controls.Add(this.label21);
- this.Controls.Add(this.label22);
- this.Controls.Add(this.label23);
- this.Controls.Add(this.btnRectColor);
- this.Controls.Add(this.label16);
- this.Controls.Add(this.cmbHeightNum);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.cmbWidthNum);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.chkDeep);
- this.Controls.Add(this.cmbID);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.comboBoxShpLayerList);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.textBoxCornerSliceAngle);
- this.Controls.Add(this.numericUpDownLineOpaque);
- this.Controls.Add(this.txtSlice);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.cmbReference);
- this.Controls.Add(this.cmbRadius);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.cmbTo);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.cmbFrom);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.btnCreateModel);
- this.Controls.Add(this.textBoxNewLayerName);
- this.Controls.Add(this.btnPipelineColor);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.Name = "FrmMultiPipelineModelDB";
- this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "管孔方沟入库";
- this.Load += new System.EventHandler(this.FrmMultiPipelineModelDB_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBoxCornerSliceAngle;
- private System.Windows.Forms.NumericUpDown numericUpDownLineOpaque;
- private System.Windows.Forms.TextBox txtSlice;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ComboBox cmbRadius;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.ComboBox cmbTo;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.ComboBox cmbFrom;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.Button btnCreateModel;
- private System.Windows.Forms.TextBox textBoxNewLayerName;
- private System.Windows.Forms.Button btnPipelineColor;
- private System.Windows.Forms.ComboBox comboBoxShpLayerList;
- private System.Windows.Forms.ColorDialog colorDialog1;
- private System.Windows.Forms.SaveFileDialog saveFileDialog1;
- private System.Windows.Forms.ComboBox cmbID;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.CheckBox chkDeep;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.ComboBox cmbReference;
- private System.Windows.Forms.ComboBox cmbWidthNum;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.ComboBox cmbHeightNum;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.NumericUpDown numOpaqueRect;
- private System.Windows.Forms.Label label21;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.Button btnRectColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx pipelineTypeCbo;
- private System.Windows.Forms.Label label17;
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.cs b/FrmMultiPipelineModelDB.cs
deleted file mode 100644
index 0a0516a..0000000
--- a/FrmMultiPipelineModelDB.cs
+++ /dev/null
@@ -1,814 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using DevComponents.DotNetBar;
-using GeoScene.Globe;
-using GeoScene.Engine;
-using GeoScene.Data;
-using System.IO;
-using System.Collections;
-using System.Xml;
-
-namespace Cyberpipe
-{
- public partial class FrmMultiPipelineModelDB : Office2007Form
- {
- private GeoScene.Globe.GSOGlobeControl globeControl1;
- GSODataSource ds = null;
- public GSOLayer rukuLayer = null;
- private Hashtable en_cns = new Hashtable();
- private Hashtable fields_types = new Hashtable();
-
- public FrmMultiPipelineModelDB(GSOGlobeControl _globeControl,GSODataSource _ds)
- {
- globeControl1 = _globeControl;
- ds = _ds;
- InitializeComponent();
-
- cmbReference.Text = "管顶";
- chkDeep.Checked = true;
- }
-
- private void FrmMultiPipelineModelDB_Load(object sender, EventArgs e)
- {
- string pipelinetype = Utility.pipelinetype;
- string[] pipelinetypes = pipelinetype.Split(',');
- for (int i = 0; i < pipelinetypes.Length; i++)
- {
- pipelineTypeCbo.Items.Add(pipelinetypes[i]);
- }
-
- comboBoxShpLayerList.Items.Clear();
-
- for (int i = 0; i < globeControl1.Globe.Layers.Count; i++)
- {
- GSOLayer layer = globeControl1.Globe.Layers[i];
- if (layer != null && layer.Name.ToLower().EndsWith(".shp"))
- {
- comboBoxShpLayerList.Items.Add(layer.Caption);
- }
- }
-
- string filename = Application.StartupPath + "\\FormText.xml";
- if (File.Exists(filename))
- {
- XmlTextReader XmlReader = new XmlTextReader(filename);
- try
- {
- while (XmlReader.Read())
- {
- if (XmlReader.Name == "Field")
- {
- string str1 = XmlReader["label"];
- string str3 = XmlReader["type"];
- string str2 = XmlReader.ReadElementString();
- en_cns.Add(str1, str2);
- fields_types.Add(str1, str3);
- }
- }
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- }
-
- private void cmbLayer_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- return;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- return;
- }
- string txtMessage = valiPipeData(layer);
- if (txtMessage != "")
- {
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(comboBoxShpLayerList.SelectedItem.ToString().Trim(), txtMessage);
- showErrorMessage.ShowDialog();
- return;
- }
- else
- {
- textBoxNewLayerName.Text = layer.Caption;
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- return;
-
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- for (int i = 0; i < features[0].GetFieldCount(); i++)
- {
- cmbFrom.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbTo.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbRadius.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbID.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbWidthNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbHeightNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- }
- cmbFrom.SelectedItem = "Deep1";
- cmbTo.SelectedItem = "Deep2";
- cmbRadius.SelectedItem = "Diameter";
- cmbWidthNum.SelectedItem = "Hor_Num";// "Weight";
- cmbHeightNum.SelectedItem = "Ver_Num";// "Height";
- cmbID.SelectedItem = "Handle";
- }
-
- }
-
- private void btnPipelineColor_Click(object sender, EventArgs e)
- {
- colorDialog1.Color = btnPipelineColor.BackColor;
-
- if (colorDialog1.ShowDialog() == DialogResult.OK)
- {
- btnPipelineColor.BackColor = colorDialog1.Color;
- }
- }
-
- private void btnCreateModel_Click(object sender, EventArgs e)
- {
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return;
- }
- if (string.IsNullOrEmpty(textBoxNewLayerName.Text))
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return;
- }
- if (ds.GetDatasetByName(textBoxNewLayerName.Text) != null)
- {
- MessageBox.Show("图层名称已存在!", "提示");
- return;
- }
- try
- {
- GSOLayer ShpSourceLayer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- GSOFeatureDataset pipeline = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim());
- if (pipeline == null)
- {
- MessageBox.Show("输入的图层名称不符合要求!", "提示");
- return;
- }
- pipeline.Open();
- GSOFeatureDataset pipelineRect = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim() + "_Rect");
- if (pipelineRect == null)
- {
- return;
- }
- pipelineRect.Open();
-
- GSOFeatures features = ShpSourceLayer.GetAllFeatures();
- string message = "";
- for (int j = 0; j < features.Length; j++)
- {
- GSOFeature f = features[j];
-
- GSOFeature newFeature = pipeline.CreateFeature();
-
- GSOPipeLineStyle3D style = new GSOPipeLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numericUpDownLineOpaque.Value), btnPipelineColor.BackColor);
-
- double radius = 0;
- if (cmbRadius.SelectedItem == null)
- {
- cmbRadius.SelectedIndex = 0;
- }
- GSOFieldDefn diameterfield = (GSOFieldDefn)f.GetFieldDefn(cmbRadius.SelectedItem.ToString());
- string fieldText = f.GetFieldAsString(cmbRadius.SelectedItem.ToString());
- if (diameterfield.Type == EnumFieldType.Text)
- {
- if (double.TryParse(fieldText, out radius))
- {
- radius = radius / 2000;
- }
- else
- {
- message += "ID为" + f.ID + "的对象的管径字段值不符合要求!\r\n";
- continue;
- }
- }
- else
- {
- radius = f.GetFieldAsDouble(cmbRadius.SelectedItem.ToString()) / 2000; // 探测数据的单位一般是毫米,需换算为米; 管径一般是 直径, 这个需要半径, 所有除以2000
- }
-
- if (cmbID.SelectedItem == null)
- {
- cmbID.SelectedIndex = 0;
- }
- if (cmbWidthNum.SelectedItem == null)
- {
- cmbWidthNum.SelectedIndex = 0;
- }
- if (cmbHeightNum.SelectedItem == null)
- {
- cmbHeightNum.SelectedIndex = 0;
- }
- string eventid = f.GetFieldAsString(cmbID.SelectedItem.ToString());
- double interval = radius * 2;
- int num_width = 0;
- int num_height = 0;
- if (!int.TryParse(f.GetFieldAsString(cmbWidthNum.SelectedItem.ToString()), out num_width))
- {
- message += "ID为" + f.ID + "的对象的宽度字段值不符合要求!\r\n";
- continue;
- }
- if (!int.TryParse(f.GetFieldAsString(cmbHeightNum.SelectedItem.ToString()), out num_height))
- {
- message += "ID为" + f.ID + "的对象的高度字段值不符合要求!\r\n";
- continue;
- }
-
- double rectWidth = Math.Round( radius * 2.0 * num_width + 0.08,5);// 两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- if (radius == 0)
- {
- message += "ID为" + f.ID + "的对象的管径字段值为0!\r\n";
- continue;
- }
-
- int intSlice = 0;
- double cornerSliceAngle = 0;
- if (!int.TryParse(txtSlice.Text.Trim(), out intSlice))
- {
- message += "ID为" + f.ID + "的对象的截面分段数字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(textBoxCornerSliceAngle.Text.Trim(), out cornerSliceAngle))
- {
- message += "ID为" + f.ID + "的对象的拐弯平滑度字段值不符合要求!\r\n";
- continue;
- }
- style.Radius = radius;
- style.Slice = intSlice;
- style.CornerSliceAngle = cornerSliceAngle;
-
- f.Geometry.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- GSOGeoPolyline3D line = f.Geometry as GSOGeoPolyline3D;
- if (line == null)
- {
- message += "ID为" + f.ID + "的对象不是一个线对象!\r\n";
- continue;
- }
-
- if (cmbFrom.SelectedItem == null)
- {
- cmbFrom.SelectedIndex = 0;
- }
- if (cmbTo.SelectedItem == null)
- {
- cmbTo.SelectedIndex = 0;
- }
- double deep1 = 0;
- double deep2 = 0;
- if (!double.TryParse(f.GetFieldAsString(cmbFrom.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep1))
- {
- message += "ID为" + f.ID + "的对象的起点埋深字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(f.GetFieldAsString(cmbTo.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep2))
- {
- message += "ID为" + f.ID + "的对象的终点埋深字段值不符合要求!\r\n";
- continue;
- }
-
- if (chkDeep.Checked)
- {
- deep1 = 0 - deep1;
- deep2 = 0 - deep2;
- }
-
- if (cmbReference.SelectedIndex == 0) //管底
- {
- deep1 = deep1 + radius * 2;
- deep2 = deep2 + radius * 2;
- }
- else if (cmbReference.SelectedIndex == 1) //管顶
- {
- deep1 = deep1 - radius * 2;
- deep2 = deep2 - radius * 2;
- }
- GSOPoint3ds ps = line[0];
- for (int n = 0; n < ps.Count; n++)
- {
- GSOPoint3d pt3d = ps[n];
- int pointcount = ps.Count;
- double radio = Math.Sqrt(Math.Pow(pt3d.Y - ps[0].Y, 2) + Math.Pow(pt3d.X - ps[0].X, 2)) / Math.Sqrt(Math.Pow(ps[pointcount - 1].Y - ps[0].Y, 2) + Math.Pow(ps[pointcount - 1].X - ps[0].X, 2));
- pt3d.Z = deep1 + (deep2 - deep1) * radio;
-
- if (double.IsInfinity(pt3d.Z))
- {
- pt3d.Z = deep2;
- }
- ps[n] = pt3d;
- }
- line[0] = ps;
- if (num_height == 0 || num_width == 0) // 直埋
- {
- newFeature.Geometry = line;
- newFeature.Geometry.Style = style;
- //newFeature.Name = eventid;
- newFeature.Name = en_cns.ContainsKey(eventid) == true ? en_cns[eventid].ToString() : eventid;
- SetFields(f, newFeature);
-
- pipeline.AddFeature(newFeature);
- }
- else
- {
- GSOFeature rectfeat = pipelineRect.CreateFeature();
- rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
- if (rectfeat != null)
- {
- SetFields(f, rectfeat);
- pipelineRect.AddFeature(rectfeat);
- }
- one2Multi(line, num_width, num_height, interval, style, pipeline, eventid, f);
- }
- }
-
- pipeline.Save();
- pipelineRect.Save();
- string strMessage = "shp文件中共" + features.Length + "个对象,实际入库" + pipeline.GetAllFeatures().Length + "个对象!\r\n";
- pipeline.Close();
- pipelineRect.Close();
- globeControl1.Refresh();
-
- GSOLayer layerRuku = globeControl1.Globe.Layers.Add(textBoxNewLayerName.Text);
- rukuLayer = layerRuku;
-
- if (message == "")
- {
- MessageBox.Show(strMessage, "提示");
- }
- else
- {
- //FrmMessageShow frm = new FrmMessageShow(strMessage + message);
- //frm.ShowDialog();
- MessageBox.Show(strMessage + message, "提示");
- }
-
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- catch (Exception ex)
- {
- //Log.PublishTxt(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- private void SetFields(GSOFeature oldfeat, GSOFeature newFeature)
- {
- for (int i = 0; i < oldfeat.GetFieldCount(); i++)
- {
- GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(oldfeat.GetFieldDefn(i));
-
- object fieldvalue = oldfeat.GetValue(fielddef.Name);
- if (fieldvalue == null)
- continue;
- string fieldName = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- newFeature.SetValue(fieldName, fieldvalue);
- }
- }
-
- private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
- {
- GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;
- GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
- if (style == null)
- {
- return null;
- }
- cloneline.Style = style;
- return cloneline;
- }
-
- private GSOExtendSectionLineStyle3D createRectStyle(double width, double height)
- {
- GSOExtendSectionLineStyle3D style = new GSOExtendSectionLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numOpaqueRect.Value), btnRectColor.BackColor);
- if (width == 0 || height == 0)
- {
- return null;
- }
- GSOPoint3ds sectionpts = new GSOPoint3ds();
- sectionpts.Add(new GSOPoint3d(width / -2, height / 2, 0));
- sectionpts.Add(new GSOPoint3d(width / -2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / 2, 0));
-
- style.SetSectionPoints(sectionpts);
- style.IsClosed = true;
- style.SetAnchorByAlign(EnumAlign.MiddleCenter);
-
- return style;
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOFeatureDataset layer,string name,GSOFeature oldfeat)
- {
- line = LatLon2Coord_Line(line);
-
- double width_all = interval * (num_width-1);
- double height_all = interval * (num_height-1);
-
- GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3d p1 = line[0][0];
- GSOPoint3d p2 = line[0][1];
- double daltaX = p2.X-p1.X;
- double daltaY = p2.Y-p1.Y;
- double agree = Math.Atan(daltaY/daltaX);
- GSOPoint2d point = new GSOPoint2d((-0.5*width_all-interval)*Math.Sin(agree),(0.5*width_all+interval)*Math.Cos(agree));
- line.MoveXY(point.X,point.Y);
- line.MoveZ(height_all / -2);
-
- for (int i = 0; i < num_width; i++)
- {
- for (int j = 0; j < num_height; j++)
- {
- GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;
- point = new GSOPoint2d((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));
- templine.MoveXY(point.X,point.Y);
- templine.MoveZ(interval*j);
- templine = Coord2LatLon_Line(templine);
- GSOFeature feat = layer.CreateFeature();
- feat.Geometry = templine;
- feat.Geometry.Style = style;
- feat.Name = name;
- SetFields(oldfeat, feat);
- layer.AddFeature(feat);
- }
- }
- }
-
- private GSOGeoPolyline3D LatLon2Coord_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = LatLon2Coord(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOGeoPolyline3D Coord2LatLon_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = Coord2LatLon(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOPoint2d LatLon2Coord(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, id);
- return result;
- }
-
- private GSOPoint2d Coord2LatLon(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, id);
- return result;
- //+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs
- }
-
- private GSOFeatureDataset CreateDBFeatureDataset(string name)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return null;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- MessageBox.Show("Shp图层为空!", "提示");
- return null;
- }
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- {
- MessageBox.Show("图层要素个数为0!", "提示");
- return null;
- }
- GSOFeatureDataset featureDataset = layer.Dataset as GSOFeatureDataset;
- if (featureDataset == null)
- {
- MessageBox.Show("Shp图层不是矢量图层!", "提示");
- return null;
- }
-
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return null ;
- }
- GSOFeatureDataset newFeatureDataset = ds.CreateFeatureDataset(name);
- if (newFeatureDataset != null)
- {
- for (int i = 0; i < featureDataset.FieldCount; i++)
- {
- GeoScene.Data.GSOFieldAttr fielddef = featureDataset.GetField(i);
-
- GSOFieldAttr field = new GSOFieldAttr();
- //field.Name = fielddef.Name;
- field.Name = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- field.Type = fielddef.Type;
- field.Width = fielddef.Width;
- field.Precision = fielddef.Precision;
- bool res = newFeatureDataset.AddField(field);
- }
- newFeatureDataset.Save();
- }
- return newFeatureDataset;
- }
-
- private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
- {
- if ((pipelineTypeCbo.Text != "给水") && (pipelineTypeCbo.Text != "天然气") &&
- (pipelineTypeCbo.Text != "燃气") && (pipelineTypeCbo.Text != "中水"))
- {
- cmbReference.Text = "管底";
- }
- else
- {
- cmbReference.Text = "管顶";
- }
-
- if (pipelineTypeCbo.Text == "给水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 255);
- }
- else if (pipelineTypeCbo.Text == "供电")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 100, 150);
- }
- else if (pipelineTypeCbo.Text == "雨水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(230, 120, 0);
- }
- else if (pipelineTypeCbo.Text == "污水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(128, 64, 0);
- }
- else if (pipelineTypeCbo.Text == "天然气")
- {
- btnPipelineColor.BackColor = Color.FromArgb(215, 0, 64);
- }
- else if (pipelineTypeCbo.Text == "共通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "电通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "有线电视")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "监控")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "交通信号")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "路灯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 0, 150);
- }
- else if (pipelineTypeCbo.Text == "通讯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 0);
- }
- }
-
- private object convertFieldValue(string fieldname, object obj)
- {
- if (obj == null)
- return null;
-
- try
- {
- string type = fields_types[fieldname].ToString();
- switch (type)
- {
- case "string":
- return obj.ToString();
- case "int":
- //return 101;
- int intResult;
- if (int.TryParse(obj.ToString(), out intResult))
- return intResult;
- else
- return null;
- case "double":
- //return 202.5;
- double doubleResult;
- if (double.TryParse(obj.ToString(), out doubleResult))
- return doubleResult;
- else
- return null;
- case "date":
- DateTime dtResult;
- if (DateTime.TryParse(obj.ToString(), out dtResult))
- return dtResult;
- else
- return null;
- }
- return null;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- return null;
- }
- }
-
- ///
- /// 验证shp格式文件
- ///
- ///
- ///
- private string valiPipeData(GSOLayer layer) //验证shp格式文件
- {
- 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 (fields_types.ContainsKey(fieldName))
- {
- string fieldType = fields_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("Deep1"))
- {
- txtMessage += "Deep1字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep1");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep1字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Deep2"))
- {
- txtMessage += "Deep2字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep2");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep2字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Diameter"))
- {
- txtMessage += "Diameter字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Diameter");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Diameter字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Handle"))
- {
- txtMessage += "Handle字段不存在!\r\n";
- }
- List lstHandle = new List();
- 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 (fields_types.ContainsKey(fieldName))
- {
- if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
- {
- txtMessage += "ID为" + f.ID + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
- }
- }
- }
- if (f.GetFieldAsFloat("Diameter") <= 0)
- {
- txtMessage += "ID为" + f.ID + "\"Diameter\"字段中的值必须大于0 \r\n";
- }
- if (!lstHandle.Contains(f.GetFieldAsString("Handle")))
- {
- lstHandle.Add(f.GetFieldAsString("Handle"));
- }
- else
- {
- txtMessage += "ID为" + f.ID + "的\"Handle\"字段中的值重复\r\n";
- }
- }
- }
- return txtMessage;
- }
-
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.resx b/FrmMultiPipelineModelDB.resx
deleted file mode 100644
index 1d40cb6..0000000
--- a/FrmMultiPipelineModelDB.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
-
-
- 156, 16
-
-
- 25
-
-
\ No newline at end of file
diff --git a/MainFrm.cs b/MainFrm.cs
index 30a34a5..8e37fde 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -6324,9 +6324,6 @@
buttonItemSH4.Checked = globeControl1.Globe.StatusBar.Visible;
globeControl1.Globe.Refresh();
}
-
-
-
///
/// 添加指定路径下的数据 功能
///
@@ -6368,7 +6365,6 @@
node.SelectedImageIndex = 0;
node.Checked = terrain.Visible;
// 注意用insert不要用add,因为后加入的图层在上层
- // terrainManagerNode.Nodes.Add(node);
layerManagerNode.Nodes.Insert(0, node);
}
newlayername = terrain.Caption;
@@ -8386,9 +8382,6 @@
}
}
}
-
-
-
///
/// 管线自动缩进 菜单
///
@@ -8399,71 +8392,6 @@
FrmPipelineIndented frm = new FrmPipelineIndented(globeControl1, m_PipelineLayerNames, workwellLayerNames);
frm.ShowDialog(this);
}
-
- private void btnExportCADs_Click(object sender, EventArgs e)
- {
-
- }
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 统计指定图层在指定范围内的所有feature对象
///
@@ -8576,17 +8504,19 @@
try
{
-
string dbIp = Utility.sgdbip;
string database = Utility.sgdbname;
string user = Utility.sgdbuser;
string pass = Utility.sgdbpwd;
- shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "", user, pass);
+ shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "",
+ user, pass);
if (shds == null)
{
MessageBox.Show("数据库连接失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+
+ //Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+ Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -8598,7 +8528,6 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
}
///
@@ -11196,137 +11125,6 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
///
/// 数据质量检查
///
@@ -12463,7 +12261,6 @@
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
//zhanshi = false;
@@ -12646,231 +12443,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
-
private void btn_check_history_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_check_history.Text);
@@ -12973,18 +12545,6 @@
LogManager.saveLog(Utility.userName, this.btn_document_info.Text);
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //FormDocumentManager frm = new FormDocumentManager();
- //frm.ShowDialog();
-
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //new FormDocumentManager().ShowDialog();
if (FormDocumentManager.IS_OPEN)
{
return;
@@ -13121,31 +12681,7 @@
FrmChangePassword frm = new FrmChangePassword();
frm.ShowDialog();
}
- ///
- /// 多孔管线入库
- ///
- ///
- ///
- private void buttonItem9_Click(object sender, EventArgs e)
- {
- //保存日志
- LogManager.saveLog(Utility.userName, this.buttonItemSJGL4_2.Text);
-
- if (ds == null)
- {
- MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- ConnectDB(null, null);
- }
- if (ds == null)
- return;
-
- FrmMultiPipelineModelDB frm = new FrmMultiPipelineModelDB(globeControl1, ds);
- if (frm.ShowDialog() == DialogResult.OK)
- {
- addNodeToLayerManagerNode(frm.rukuLayer);
- }
- //frm.Show();
- }
+
private void 导出CADToolStripMenuItem1_Click(object sender, EventArgs e)
{
TreeNode node = layerNodeContexMenu.Tag as TreeNode;
diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs
index 426beb3..fd0ef22 100644
--- a/MainFrm.designer.cs
+++ b/MainFrm.designer.cs
@@ -241,15 +241,6 @@
this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
- this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
- this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
- this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
- this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
- this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar();
this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem();
@@ -271,7 +262,6 @@
this.buttonItemSJGL4 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_1 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_2 = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_3 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL5 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL6 = new DevComponents.DotNetBar.ButtonItem();
@@ -419,6 +409,15 @@
this.buttonItemBZ9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ10 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ11 = new DevComponents.DotNetBar.ButtonItem();
+ this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
+ this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
+ this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
+ this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel4 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar1 = new DevComponents.DotNetBar.RibbonBar();
this.btn_document_info = new DevComponents.DotNetBar.ButtonItem();
@@ -651,8 +650,8 @@
this.contextMenuStrip3.SuspendLayout();
this.contextMenuStripDeleteLayerNode.SuspendLayout();
this.ribbonControl1.SuspendLayout();
- this.ribbonPanel2.SuspendLayout();
this.ribbonPanel15.SuspendLayout();
+ this.ribbonPanel2.SuspendLayout();
this.ribbonPanel4.SuspendLayout();
this.ribbonPanel6.SuspendLayout();
this.ribbonPanel5.SuspendLayout();
@@ -841,7 +840,7 @@
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21);
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20);
this.toolStripDropDownButton1.Text = "帮助";
this.toolStripDropDownButton1.Visible = false;
//
@@ -2362,137 +2361,6 @@
this.ribbonControl1.Text = "ribbonControl1";
this.ribbonControl1.UseCustomizeDialog = false;
//
- // ribbonPanel2
- //
- this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonPanel2.Controls.Add(this.ribbonBar3);
- this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
- this.ribbonPanel2.Name = "ribbonPanel2";
- this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
- this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
- //
- //
- //
- this.ribbonPanel2.Style.Class = "";
- this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseDown.Class = "";
- this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseOver.Class = "";
- this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonPanel2.TabIndex = 39;
- this.ribbonPanel2.Visible = false;
- //
- // ribbonBar3
- //
- this.ribbonBar3.AutoOverflowEnabled = true;
- //
- //
- //
- this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
- this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.BackgroundStyle.Class = "";
- this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.ContainerControlProcessDialogKey = true;
- this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
- this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
- this.btn_user_info,
- this.btn_role_info,
- this.btn_resc_info,
- this.btn_role_resc,
- this.btn_user_role,
- this.btn_password_edit,
- this.buttonItemPasswordReset});
- this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
- this.ribbonBar3.Name = "ribbonBar3";
- this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
- this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonBar3.TabIndex = 1;
- //
- //
- //
- this.ribbonBar3.TitleStyle.Class = "";
- this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.TitleStyleMouseOver.Class = "";
- this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.TitleVisible = false;
- //
- // btn_user_info
- //
- this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
- this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_info.Name = "btn_user_info";
- this.btn_user_info.SubItemsExpandWidth = 14;
- this.btn_user_info.Text = "用户管理";
- this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
- //
- // btn_role_info
- //
- this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
- this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_info.Name = "btn_role_info";
- this.btn_role_info.SubItemsExpandWidth = 14;
- this.btn_role_info.Text = "角色管理";
- this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
- //
- // btn_resc_info
- //
- this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
- this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_resc_info.Name = "btn_resc_info";
- this.btn_resc_info.SubItemsExpandWidth = 14;
- this.btn_resc_info.Text = "资源管理";
- this.btn_resc_info.Visible = false;
- this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
- //
- // btn_role_resc
- //
- this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
- this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_resc.Name = "btn_role_resc";
- this.btn_role_resc.SubItemsExpandWidth = 14;
- this.btn_role_resc.Text = "角色授权";
- this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
- //
- // btn_user_role
- //
- this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
- this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_role.Name = "btn_user_role";
- this.btn_user_role.SubItemsExpandWidth = 14;
- this.btn_user_role.Text = "用户授权";
- this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
- //
- // btn_password_edit
- //
- this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
- this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_password_edit.Name = "btn_password_edit";
- this.btn_password_edit.SubItemsExpandWidth = 14;
- this.btn_password_edit.Text = "密码修改";
- this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
- //
- // buttonItemPasswordReset
- //
- this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
- this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
- this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
- this.buttonItemPasswordReset.Text = "重置密码";
- this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
- //
// ribbonPanel15
//
this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -2549,7 +2417,7 @@
this.buttonItemBZ});
this.ribbonBar20.Location = new System.Drawing.Point(3, 0);
this.ribbonBar20.Name = "ribbonBar20";
- this.ribbonBar20.Size = new System.Drawing.Size(814, 59);
+ this.ribbonBar20.Size = new System.Drawing.Size(785, 59);
this.ribbonBar20.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.ribbonBar20.TabIndex = 0;
//
@@ -2711,7 +2579,6 @@
this.buttonItemSJGL4.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.buttonItemSJGL4_1,
this.buttonItemSJGL4_2,
- this.buttonItem9,
this.buttonItemSJGL4_3});
this.buttonItemSJGL4.Text = "数据批量入库";
//
@@ -2727,12 +2594,6 @@
this.buttonItemSJGL4_2.Text = "线矢量入库";
this.buttonItemSJGL4_2.Click += new System.EventHandler(this.buttonItemSJGL4_2_Click);
//
- // buttonItem9
- //
- this.buttonItem9.Name = "buttonItem9";
- this.buttonItem9.Text = "多孔入库";
- this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click);
- //
// buttonItemSJGL4_3
//
this.buttonItemSJGL4_3.Name = "buttonItemSJGL4_3";
@@ -3869,6 +3730,137 @@
this.buttonItemBZ11.Text = "标注管理";
this.buttonItemBZ11.Click += new System.EventHandler(this.buttonItemBZ11_Click);
//
+ // ribbonPanel2
+ //
+ this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonPanel2.Controls.Add(this.ribbonBar3);
+ this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
+ this.ribbonPanel2.Name = "ribbonPanel2";
+ this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
+ this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
+ //
+ //
+ //
+ this.ribbonPanel2.Style.Class = "";
+ this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseDown.Class = "";
+ this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseOver.Class = "";
+ this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonPanel2.TabIndex = 39;
+ this.ribbonPanel2.Visible = false;
+ //
+ // ribbonBar3
+ //
+ this.ribbonBar3.AutoOverflowEnabled = true;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
+ this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundStyle.Class = "";
+ this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.ContainerControlProcessDialogKey = true;
+ this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
+ this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
+ this.btn_user_info,
+ this.btn_role_info,
+ this.btn_resc_info,
+ this.btn_role_resc,
+ this.btn_user_role,
+ this.btn_password_edit,
+ this.buttonItemPasswordReset});
+ this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
+ this.ribbonBar3.Name = "ribbonBar3";
+ this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
+ this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonBar3.TabIndex = 1;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyle.Class = "";
+ this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyleMouseOver.Class = "";
+ this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.TitleVisible = false;
+ //
+ // btn_user_info
+ //
+ this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
+ this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_info.Name = "btn_user_info";
+ this.btn_user_info.SubItemsExpandWidth = 14;
+ this.btn_user_info.Text = "用户管理";
+ this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
+ //
+ // btn_role_info
+ //
+ this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
+ this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_info.Name = "btn_role_info";
+ this.btn_role_info.SubItemsExpandWidth = 14;
+ this.btn_role_info.Text = "角色管理";
+ this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
+ //
+ // btn_resc_info
+ //
+ this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
+ this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_resc_info.Name = "btn_resc_info";
+ this.btn_resc_info.SubItemsExpandWidth = 14;
+ this.btn_resc_info.Text = "资源管理";
+ this.btn_resc_info.Visible = false;
+ this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
+ //
+ // btn_role_resc
+ //
+ this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
+ this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_resc.Name = "btn_role_resc";
+ this.btn_role_resc.SubItemsExpandWidth = 14;
+ this.btn_role_resc.Text = "角色授权";
+ this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
+ //
+ // btn_user_role
+ //
+ this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
+ this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_role.Name = "btn_user_role";
+ this.btn_user_role.SubItemsExpandWidth = 14;
+ this.btn_user_role.Text = "用户授权";
+ this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
+ //
+ // btn_password_edit
+ //
+ this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
+ this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_password_edit.Name = "btn_password_edit";
+ this.btn_password_edit.SubItemsExpandWidth = 14;
+ this.btn_password_edit.Text = "密码修改";
+ this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
+ //
+ // buttonItemPasswordReset
+ //
+ this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
+ this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
+ this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
+ this.buttonItemPasswordReset.Text = "重置密码";
+ this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
+ //
// ribbonPanel4
//
this.ribbonPanel4.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -5522,7 +5514,7 @@
this.dataGridViewX2.ReadOnly = true;
this.dataGridViewX2.RowHeadersVisible = false;
this.dataGridViewX2.RowTemplate.Height = 23;
- this.dataGridViewX2.Size = new System.Drawing.Size(20389, 92);
+ this.dataGridViewX2.Size = new System.Drawing.Size(20983, 92);
this.dataGridViewX2.TabIndex = 11;
//
// dataGridViewTextBoxColumn10
@@ -5616,7 +5608,7 @@
this.dataGridViewX3.ReadOnly = true;
this.dataGridViewX3.RowHeadersVisible = false;
this.dataGridViewX3.RowTemplate.Height = 23;
- this.dataGridViewX3.Size = new System.Drawing.Size(20388, 127);
+ this.dataGridViewX3.Size = new System.Drawing.Size(20982, 127);
this.dataGridViewX3.TabIndex = 5;
this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick);
//
@@ -5874,7 +5866,7 @@
this.dataGridViewX8.ReadOnly = true;
this.dataGridViewX8.RowHeadersVisible = false;
this.dataGridViewX8.RowTemplate.Height = 23;
- this.dataGridViewX8.Size = new System.Drawing.Size(125, 92);
+ this.dataGridViewX8.Size = new System.Drawing.Size(91, 92);
this.dataGridViewX8.TabIndex = 11;
//
// dataGridViewTextBoxColumn12
@@ -5969,7 +5961,7 @@
this.dataGridViewX9.ReadOnly = true;
this.dataGridViewX9.RowHeadersVisible = false;
this.dataGridViewX9.RowTemplate.Height = 23;
- this.dataGridViewX9.Size = new System.Drawing.Size(124, 127);
+ this.dataGridViewX9.Size = new System.Drawing.Size(90, 127);
this.dataGridViewX9.TabIndex = 5;
this.dataGridViewX9.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX9_MouseDoubleClick);
//
@@ -6834,8 +6826,8 @@
this.contextMenuStripDeleteLayerNode.ResumeLayout(false);
this.ribbonControl1.ResumeLayout(false);
this.ribbonControl1.PerformLayout();
- this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel15.ResumeLayout(false);
+ this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel4.ResumeLayout(false);
this.ribbonPanel6.ResumeLayout(false);
this.ribbonPanel5.ResumeLayout(false);
@@ -7328,7 +7320,6 @@
private System.Windows.Forms.ToolStripMenuItem 定位ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem LayerFlyMenuItem;
private DevComponents.DotNetBar.ButtonItem btn_password_edit;
- private DevComponents.DotNetBar.ButtonItem buttonItem9;
private System.Windows.Forms.ToolStripMenuItem 导出CADToolStripMenuItem1;
private DevComponents.DotNetBar.ButtonItem buttonItemGBJC;
private System.Windows.Forms.ContextMenuStrip RightScreenToolMenu;
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/FrmMultiPipelineModelDB.Designer.cs b/FrmMultiPipelineModelDB.Designer.cs
deleted file mode 100644
index 8aa77b0..0000000
--- a/FrmMultiPipelineModelDB.Designer.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-namespace Cyberpipe
-{
- partial class FrmMultiPipelineModelDB
- {
- ///
- /// 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.label7 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBoxCornerSliceAngle = new System.Windows.Forms.TextBox();
- this.numericUpDownLineOpaque = new System.Windows.Forms.NumericUpDown();
- this.txtSlice = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.cmbRadius = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.cmbTo = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbFrom = new System.Windows.Forms.ComboBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.btnClose = new System.Windows.Forms.Button();
- this.btnCreateModel = new System.Windows.Forms.Button();
- this.textBoxNewLayerName = new System.Windows.Forms.TextBox();
- this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxShpLayerList = new System.Windows.Forms.ComboBox();
- this.colorDialog1 = new System.Windows.Forms.ColorDialog();
- this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.cmbID = new System.Windows.Forms.ComboBox();
- this.label11 = new System.Windows.Forms.Label();
- this.chkDeep = new System.Windows.Forms.CheckBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.cmbReference = new System.Windows.Forms.ComboBox();
- this.cmbWidthNum = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.cmbHeightNum = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.numOpaqueRect = new System.Windows.Forms.NumericUpDown();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.btnRectColor = new System.Windows.Forms.Button();
- this.pipelineTypeCbo = new DevComponents.DotNetBar.Controls.ComboBoxEx();
- this.label17 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).BeginInit();
- this.SuspendLayout();
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Location = new System.Drawing.Point(360, 395);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(17, 12);
- this.label7.TabIndex = 71;
- this.label7.Text = "度";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.BackColor = System.Drawing.Color.Transparent;
- this.label9.Location = new System.Drawing.Point(21, 393);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(77, 12);
- this.label9.TabIndex = 70;
- this.label9.Text = "拐弯平滑度:";
- //
- // textBoxCornerSliceAngle
- //
- this.textBoxCornerSliceAngle.Location = new System.Drawing.Point(131, 390);
- this.textBoxCornerSliceAngle.Name = "textBoxCornerSliceAngle";
- this.textBoxCornerSliceAngle.Size = new System.Drawing.Size(225, 21);
- this.textBoxCornerSliceAngle.TabIndex = 69;
- this.textBoxCornerSliceAngle.Text = "10";
- //
- // numericUpDownLineOpaque
- //
- this.numericUpDownLineOpaque.Location = new System.Drawing.Point(131, 334);
- this.numericUpDownLineOpaque.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numericUpDownLineOpaque.Name = "numericUpDownLineOpaque";
- this.numericUpDownLineOpaque.Size = new System.Drawing.Size(225, 21);
- this.numericUpDownLineOpaque.TabIndex = 68;
- this.numericUpDownLineOpaque.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- //
- // txtSlice
- //
- this.txtSlice.Location = new System.Drawing.Point(131, 362);
- this.txtSlice.Name = "txtSlice";
- this.txtSlice.Size = new System.Drawing.Size(224, 21);
- this.txtSlice.TabIndex = 67;
- this.txtSlice.Text = "24";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(20, 365);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(77, 12);
- this.label8.TabIndex = 65;
- this.label8.Text = "截面分段数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.BackColor = System.Drawing.Color.Transparent;
- this.label10.Location = new System.Drawing.Point(21, 336);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(53, 12);
- this.label10.TabIndex = 66;
- this.label10.Text = "透明度:";
- //
- // cmbRadius
- //
- this.cmbRadius.FormattingEnabled = true;
- this.cmbRadius.Location = new System.Drawing.Point(130, 196);
- this.cmbRadius.Name = "cmbRadius";
- this.cmbRadius.Size = new System.Drawing.Size(226, 20);
- this.cmbRadius.TabIndex = 64;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(20, 309);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 62;
- this.label6.Text = "管道颜色:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(20, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 63;
- this.label5.Text = "管径字段:";
- //
- // cmbTo
- //
- this.cmbTo.FormattingEnabled = true;
- this.cmbTo.Location = new System.Drawing.Point(130, 125);
- this.cmbTo.Name = "cmbTo";
- this.cmbTo.Size = new System.Drawing.Size(226, 20);
- this.cmbTo.TabIndex = 61;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(24, 132);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 60;
- this.label4.Text = "终点埋深:";
- //
- // cmbFrom
- //
- this.cmbFrom.FormattingEnabled = true;
- this.cmbFrom.Location = new System.Drawing.Point(129, 97);
- this.cmbFrom.Name = "cmbFrom";
- this.cmbFrom.Size = new System.Drawing.Size(226, 20);
- this.cmbFrom.TabIndex = 59;
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(14, 479);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(380, 2);
- this.groupBox1.TabIndex = 58;
- this.groupBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 103);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 12);
- this.label3.TabIndex = 55;
- this.label3.Text = "起点埋深:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(20, 72);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(89, 12);
- this.label2.TabIndex = 56;
- this.label2.Text = "管线图层名称:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(20, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(95, 12);
- this.label1.TabIndex = 57;
- this.label1.Text = "Shapefile图层:";
- //
- // btnClose
- //
- this.btnClose.Location = new System.Drawing.Point(282, 490);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 53;
- this.btnClose.Text = "关闭(&C)";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // btnCreateModel
- //
- this.btnCreateModel.Location = new System.Drawing.Point(199, 490);
- this.btnCreateModel.Name = "btnCreateModel";
- this.btnCreateModel.Size = new System.Drawing.Size(74, 23);
- this.btnCreateModel.TabIndex = 54;
- this.btnCreateModel.Text = "建模(&M)";
- this.btnCreateModel.UseVisualStyleBackColor = true;
- this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
- //
- // textBoxNewLayerName
- //
- this.textBoxNewLayerName.Location = new System.Drawing.Point(129, 67);
- this.textBoxNewLayerName.Name = "textBoxNewLayerName";
- this.textBoxNewLayerName.Size = new System.Drawing.Size(226, 21);
- this.textBoxNewLayerName.TabIndex = 51;
- //
- // btnPipelineColor
- //
- this.btnPipelineColor.BackColor = System.Drawing.Color.Gainsboro;
- this.btnPipelineColor.Location = new System.Drawing.Point(130, 304);
- this.btnPipelineColor.Name = "btnPipelineColor";
- this.btnPipelineColor.Size = new System.Drawing.Size(226, 23);
- this.btnPipelineColor.TabIndex = 48;
- this.btnPipelineColor.UseVisualStyleBackColor = false;
- this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
- //
- // comboBoxShpLayerList
- //
- this.comboBoxShpLayerList.FormattingEnabled = true;
- this.comboBoxShpLayerList.Location = new System.Drawing.Point(129, 11);
- this.comboBoxShpLayerList.Name = "comboBoxShpLayerList";
- this.comboBoxShpLayerList.Size = new System.Drawing.Size(226, 20);
- this.comboBoxShpLayerList.TabIndex = 72;
- this.comboBoxShpLayerList.SelectedIndexChanged += new System.EventHandler(this.cmbLayer_SelectedIndexChanged);
- //
- // cmbID
- //
- this.cmbID.FormattingEnabled = true;
- this.cmbID.Location = new System.Drawing.Point(130, 223);
- this.cmbID.Name = "cmbID";
- this.cmbID.Size = new System.Drawing.Size(226, 20);
- this.cmbID.TabIndex = 74;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(22, 227);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 73;
- this.label11.Text = "ID字段:";
- //
- // chkDeep
- //
- this.chkDeep.AutoSize = true;
- this.chkDeep.Location = new System.Drawing.Point(130, 150);
- this.chkDeep.Name = "chkDeep";
- this.chkDeep.Size = new System.Drawing.Size(144, 16);
- this.chkDeep.TabIndex = 75;
- this.chkDeep.Text = "埋深是否转换为相反数";
- this.chkDeep.UseVisualStyleBackColor = true;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(359, 200);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(29, 12);
- this.label12.TabIndex = 76;
- this.label12.Text = "毫米";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(20, 172);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(77, 12);
- this.label13.TabIndex = 63;
- this.label13.Text = "埋深参考点:";
- //
- // cmbReference
- //
- this.cmbReference.FormattingEnabled = true;
- this.cmbReference.Items.AddRange(new object[] {
- "管底",
- "管顶"});
- this.cmbReference.Location = new System.Drawing.Point(130, 168);
- this.cmbReference.Name = "cmbReference";
- this.cmbReference.Size = new System.Drawing.Size(226, 20);
- this.cmbReference.TabIndex = 64;
- //
- // cmbWidthNum
- //
- this.cmbWidthNum.FormattingEnabled = true;
- this.cmbWidthNum.Location = new System.Drawing.Point(131, 250);
- this.cmbWidthNum.Name = "cmbWidthNum";
- this.cmbWidthNum.Size = new System.Drawing.Size(226, 20);
- this.cmbWidthNum.TabIndex = 78;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(22, 254);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 77;
- this.label14.Text = "横向个数字段:";
- //
- // cmbHeightNum
- //
- this.cmbHeightNum.FormattingEnabled = true;
- this.cmbHeightNum.Location = new System.Drawing.Point(131, 277);
- this.cmbHeightNum.Name = "cmbHeightNum";
- this.cmbHeightNum.Size = new System.Drawing.Size(226, 20);
- this.cmbHeightNum.TabIndex = 80;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(22, 280);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(89, 12);
- this.label15.TabIndex = 79;
- this.label15.Text = "纵向个数字段:";
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(430, 246);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 81;
- this.label16.Text = "间距字段:";
- //
- // numOpaqueRect
- //
- this.numOpaqueRect.Location = new System.Drawing.Point(132, 451);
- this.numOpaqueRect.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numOpaqueRect.Name = "numOpaqueRect";
- this.numOpaqueRect.Size = new System.Drawing.Size(225, 21);
- this.numOpaqueRect.TabIndex = 88;
- this.numOpaqueRect.Value = new decimal(new int[] {
- 125,
- 0,
- 0,
- 0});
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Location = new System.Drawing.Point(24, 455);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(53, 12);
- this.label21.TabIndex = 87;
- this.label21.Text = "透明度:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(22, 424);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(65, 12);
- this.label22.TabIndex = 84;
- this.label22.Text = "管沟颜色:";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(430, 291);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(77, 12);
- this.label23.TabIndex = 85;
- this.label23.Text = "管沟宽字段:";
- //
- // btnRectColor
- //
- this.btnRectColor.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.btnRectColor.Location = new System.Drawing.Point(131, 419);
- this.btnRectColor.Name = "btnRectColor";
- this.btnRectColor.Size = new System.Drawing.Size(226, 23);
- this.btnRectColor.TabIndex = 83;
- this.btnRectColor.UseVisualStyleBackColor = false;
- //
- // pipelineTypeCbo
- //
- this.pipelineTypeCbo.DisplayMember = "Text";
- this.pipelineTypeCbo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.pipelineTypeCbo.FormattingEnabled = true;
- this.pipelineTypeCbo.ItemHeight = 15;
- this.pipelineTypeCbo.Location = new System.Drawing.Point(129, 40);
- this.pipelineTypeCbo.Name = "pipelineTypeCbo";
- this.pipelineTypeCbo.Size = new System.Drawing.Size(226, 21);
- this.pipelineTypeCbo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.pipelineTypeCbo.TabIndex = 126;
- this.pipelineTypeCbo.SelectedIndexChanged += new System.EventHandler(this.pipelineTypeCbo_SelectedIndexChanged);
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(20, 46);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(89, 12);
- this.label17.TabIndex = 125;
- this.label17.Text = "管线图层类型:";
- //
- // FrmMultiPipelineModelDB
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(406, 522);
- this.Controls.Add(this.pipelineTypeCbo);
- this.Controls.Add(this.label17);
- this.Controls.Add(this.numOpaqueRect);
- this.Controls.Add(this.label21);
- this.Controls.Add(this.label22);
- this.Controls.Add(this.label23);
- this.Controls.Add(this.btnRectColor);
- this.Controls.Add(this.label16);
- this.Controls.Add(this.cmbHeightNum);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.cmbWidthNum);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.chkDeep);
- this.Controls.Add(this.cmbID);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.comboBoxShpLayerList);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.textBoxCornerSliceAngle);
- this.Controls.Add(this.numericUpDownLineOpaque);
- this.Controls.Add(this.txtSlice);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.cmbReference);
- this.Controls.Add(this.cmbRadius);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.cmbTo);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.cmbFrom);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.btnCreateModel);
- this.Controls.Add(this.textBoxNewLayerName);
- this.Controls.Add(this.btnPipelineColor);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.Name = "FrmMultiPipelineModelDB";
- this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "管孔方沟入库";
- this.Load += new System.EventHandler(this.FrmMultiPipelineModelDB_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBoxCornerSliceAngle;
- private System.Windows.Forms.NumericUpDown numericUpDownLineOpaque;
- private System.Windows.Forms.TextBox txtSlice;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ComboBox cmbRadius;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.ComboBox cmbTo;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.ComboBox cmbFrom;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.Button btnCreateModel;
- private System.Windows.Forms.TextBox textBoxNewLayerName;
- private System.Windows.Forms.Button btnPipelineColor;
- private System.Windows.Forms.ComboBox comboBoxShpLayerList;
- private System.Windows.Forms.ColorDialog colorDialog1;
- private System.Windows.Forms.SaveFileDialog saveFileDialog1;
- private System.Windows.Forms.ComboBox cmbID;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.CheckBox chkDeep;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.ComboBox cmbReference;
- private System.Windows.Forms.ComboBox cmbWidthNum;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.ComboBox cmbHeightNum;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.NumericUpDown numOpaqueRect;
- private System.Windows.Forms.Label label21;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.Button btnRectColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx pipelineTypeCbo;
- private System.Windows.Forms.Label label17;
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.cs b/FrmMultiPipelineModelDB.cs
deleted file mode 100644
index 0a0516a..0000000
--- a/FrmMultiPipelineModelDB.cs
+++ /dev/null
@@ -1,814 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using DevComponents.DotNetBar;
-using GeoScene.Globe;
-using GeoScene.Engine;
-using GeoScene.Data;
-using System.IO;
-using System.Collections;
-using System.Xml;
-
-namespace Cyberpipe
-{
- public partial class FrmMultiPipelineModelDB : Office2007Form
- {
- private GeoScene.Globe.GSOGlobeControl globeControl1;
- GSODataSource ds = null;
- public GSOLayer rukuLayer = null;
- private Hashtable en_cns = new Hashtable();
- private Hashtable fields_types = new Hashtable();
-
- public FrmMultiPipelineModelDB(GSOGlobeControl _globeControl,GSODataSource _ds)
- {
- globeControl1 = _globeControl;
- ds = _ds;
- InitializeComponent();
-
- cmbReference.Text = "管顶";
- chkDeep.Checked = true;
- }
-
- private void FrmMultiPipelineModelDB_Load(object sender, EventArgs e)
- {
- string pipelinetype = Utility.pipelinetype;
- string[] pipelinetypes = pipelinetype.Split(',');
- for (int i = 0; i < pipelinetypes.Length; i++)
- {
- pipelineTypeCbo.Items.Add(pipelinetypes[i]);
- }
-
- comboBoxShpLayerList.Items.Clear();
-
- for (int i = 0; i < globeControl1.Globe.Layers.Count; i++)
- {
- GSOLayer layer = globeControl1.Globe.Layers[i];
- if (layer != null && layer.Name.ToLower().EndsWith(".shp"))
- {
- comboBoxShpLayerList.Items.Add(layer.Caption);
- }
- }
-
- string filename = Application.StartupPath + "\\FormText.xml";
- if (File.Exists(filename))
- {
- XmlTextReader XmlReader = new XmlTextReader(filename);
- try
- {
- while (XmlReader.Read())
- {
- if (XmlReader.Name == "Field")
- {
- string str1 = XmlReader["label"];
- string str3 = XmlReader["type"];
- string str2 = XmlReader.ReadElementString();
- en_cns.Add(str1, str2);
- fields_types.Add(str1, str3);
- }
- }
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- }
-
- private void cmbLayer_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- return;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- return;
- }
- string txtMessage = valiPipeData(layer);
- if (txtMessage != "")
- {
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(comboBoxShpLayerList.SelectedItem.ToString().Trim(), txtMessage);
- showErrorMessage.ShowDialog();
- return;
- }
- else
- {
- textBoxNewLayerName.Text = layer.Caption;
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- return;
-
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- for (int i = 0; i < features[0].GetFieldCount(); i++)
- {
- cmbFrom.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbTo.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbRadius.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbID.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbWidthNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbHeightNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- }
- cmbFrom.SelectedItem = "Deep1";
- cmbTo.SelectedItem = "Deep2";
- cmbRadius.SelectedItem = "Diameter";
- cmbWidthNum.SelectedItem = "Hor_Num";// "Weight";
- cmbHeightNum.SelectedItem = "Ver_Num";// "Height";
- cmbID.SelectedItem = "Handle";
- }
-
- }
-
- private void btnPipelineColor_Click(object sender, EventArgs e)
- {
- colorDialog1.Color = btnPipelineColor.BackColor;
-
- if (colorDialog1.ShowDialog() == DialogResult.OK)
- {
- btnPipelineColor.BackColor = colorDialog1.Color;
- }
- }
-
- private void btnCreateModel_Click(object sender, EventArgs e)
- {
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return;
- }
- if (string.IsNullOrEmpty(textBoxNewLayerName.Text))
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return;
- }
- if (ds.GetDatasetByName(textBoxNewLayerName.Text) != null)
- {
- MessageBox.Show("图层名称已存在!", "提示");
- return;
- }
- try
- {
- GSOLayer ShpSourceLayer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- GSOFeatureDataset pipeline = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim());
- if (pipeline == null)
- {
- MessageBox.Show("输入的图层名称不符合要求!", "提示");
- return;
- }
- pipeline.Open();
- GSOFeatureDataset pipelineRect = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim() + "_Rect");
- if (pipelineRect == null)
- {
- return;
- }
- pipelineRect.Open();
-
- GSOFeatures features = ShpSourceLayer.GetAllFeatures();
- string message = "";
- for (int j = 0; j < features.Length; j++)
- {
- GSOFeature f = features[j];
-
- GSOFeature newFeature = pipeline.CreateFeature();
-
- GSOPipeLineStyle3D style = new GSOPipeLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numericUpDownLineOpaque.Value), btnPipelineColor.BackColor);
-
- double radius = 0;
- if (cmbRadius.SelectedItem == null)
- {
- cmbRadius.SelectedIndex = 0;
- }
- GSOFieldDefn diameterfield = (GSOFieldDefn)f.GetFieldDefn(cmbRadius.SelectedItem.ToString());
- string fieldText = f.GetFieldAsString(cmbRadius.SelectedItem.ToString());
- if (diameterfield.Type == EnumFieldType.Text)
- {
- if (double.TryParse(fieldText, out radius))
- {
- radius = radius / 2000;
- }
- else
- {
- message += "ID为" + f.ID + "的对象的管径字段值不符合要求!\r\n";
- continue;
- }
- }
- else
- {
- radius = f.GetFieldAsDouble(cmbRadius.SelectedItem.ToString()) / 2000; // 探测数据的单位一般是毫米,需换算为米; 管径一般是 直径, 这个需要半径, 所有除以2000
- }
-
- if (cmbID.SelectedItem == null)
- {
- cmbID.SelectedIndex = 0;
- }
- if (cmbWidthNum.SelectedItem == null)
- {
- cmbWidthNum.SelectedIndex = 0;
- }
- if (cmbHeightNum.SelectedItem == null)
- {
- cmbHeightNum.SelectedIndex = 0;
- }
- string eventid = f.GetFieldAsString(cmbID.SelectedItem.ToString());
- double interval = radius * 2;
- int num_width = 0;
- int num_height = 0;
- if (!int.TryParse(f.GetFieldAsString(cmbWidthNum.SelectedItem.ToString()), out num_width))
- {
- message += "ID为" + f.ID + "的对象的宽度字段值不符合要求!\r\n";
- continue;
- }
- if (!int.TryParse(f.GetFieldAsString(cmbHeightNum.SelectedItem.ToString()), out num_height))
- {
- message += "ID为" + f.ID + "的对象的高度字段值不符合要求!\r\n";
- continue;
- }
-
- double rectWidth = Math.Round( radius * 2.0 * num_width + 0.08,5);// 两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- if (radius == 0)
- {
- message += "ID为" + f.ID + "的对象的管径字段值为0!\r\n";
- continue;
- }
-
- int intSlice = 0;
- double cornerSliceAngle = 0;
- if (!int.TryParse(txtSlice.Text.Trim(), out intSlice))
- {
- message += "ID为" + f.ID + "的对象的截面分段数字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(textBoxCornerSliceAngle.Text.Trim(), out cornerSliceAngle))
- {
- message += "ID为" + f.ID + "的对象的拐弯平滑度字段值不符合要求!\r\n";
- continue;
- }
- style.Radius = radius;
- style.Slice = intSlice;
- style.CornerSliceAngle = cornerSliceAngle;
-
- f.Geometry.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- GSOGeoPolyline3D line = f.Geometry as GSOGeoPolyline3D;
- if (line == null)
- {
- message += "ID为" + f.ID + "的对象不是一个线对象!\r\n";
- continue;
- }
-
- if (cmbFrom.SelectedItem == null)
- {
- cmbFrom.SelectedIndex = 0;
- }
- if (cmbTo.SelectedItem == null)
- {
- cmbTo.SelectedIndex = 0;
- }
- double deep1 = 0;
- double deep2 = 0;
- if (!double.TryParse(f.GetFieldAsString(cmbFrom.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep1))
- {
- message += "ID为" + f.ID + "的对象的起点埋深字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(f.GetFieldAsString(cmbTo.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep2))
- {
- message += "ID为" + f.ID + "的对象的终点埋深字段值不符合要求!\r\n";
- continue;
- }
-
- if (chkDeep.Checked)
- {
- deep1 = 0 - deep1;
- deep2 = 0 - deep2;
- }
-
- if (cmbReference.SelectedIndex == 0) //管底
- {
- deep1 = deep1 + radius * 2;
- deep2 = deep2 + radius * 2;
- }
- else if (cmbReference.SelectedIndex == 1) //管顶
- {
- deep1 = deep1 - radius * 2;
- deep2 = deep2 - radius * 2;
- }
- GSOPoint3ds ps = line[0];
- for (int n = 0; n < ps.Count; n++)
- {
- GSOPoint3d pt3d = ps[n];
- int pointcount = ps.Count;
- double radio = Math.Sqrt(Math.Pow(pt3d.Y - ps[0].Y, 2) + Math.Pow(pt3d.X - ps[0].X, 2)) / Math.Sqrt(Math.Pow(ps[pointcount - 1].Y - ps[0].Y, 2) + Math.Pow(ps[pointcount - 1].X - ps[0].X, 2));
- pt3d.Z = deep1 + (deep2 - deep1) * radio;
-
- if (double.IsInfinity(pt3d.Z))
- {
- pt3d.Z = deep2;
- }
- ps[n] = pt3d;
- }
- line[0] = ps;
- if (num_height == 0 || num_width == 0) // 直埋
- {
- newFeature.Geometry = line;
- newFeature.Geometry.Style = style;
- //newFeature.Name = eventid;
- newFeature.Name = en_cns.ContainsKey(eventid) == true ? en_cns[eventid].ToString() : eventid;
- SetFields(f, newFeature);
-
- pipeline.AddFeature(newFeature);
- }
- else
- {
- GSOFeature rectfeat = pipelineRect.CreateFeature();
- rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
- if (rectfeat != null)
- {
- SetFields(f, rectfeat);
- pipelineRect.AddFeature(rectfeat);
- }
- one2Multi(line, num_width, num_height, interval, style, pipeline, eventid, f);
- }
- }
-
- pipeline.Save();
- pipelineRect.Save();
- string strMessage = "shp文件中共" + features.Length + "个对象,实际入库" + pipeline.GetAllFeatures().Length + "个对象!\r\n";
- pipeline.Close();
- pipelineRect.Close();
- globeControl1.Refresh();
-
- GSOLayer layerRuku = globeControl1.Globe.Layers.Add(textBoxNewLayerName.Text);
- rukuLayer = layerRuku;
-
- if (message == "")
- {
- MessageBox.Show(strMessage, "提示");
- }
- else
- {
- //FrmMessageShow frm = new FrmMessageShow(strMessage + message);
- //frm.ShowDialog();
- MessageBox.Show(strMessage + message, "提示");
- }
-
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- catch (Exception ex)
- {
- //Log.PublishTxt(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- private void SetFields(GSOFeature oldfeat, GSOFeature newFeature)
- {
- for (int i = 0; i < oldfeat.GetFieldCount(); i++)
- {
- GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(oldfeat.GetFieldDefn(i));
-
- object fieldvalue = oldfeat.GetValue(fielddef.Name);
- if (fieldvalue == null)
- continue;
- string fieldName = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- newFeature.SetValue(fieldName, fieldvalue);
- }
- }
-
- private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
- {
- GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;
- GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
- if (style == null)
- {
- return null;
- }
- cloneline.Style = style;
- return cloneline;
- }
-
- private GSOExtendSectionLineStyle3D createRectStyle(double width, double height)
- {
- GSOExtendSectionLineStyle3D style = new GSOExtendSectionLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numOpaqueRect.Value), btnRectColor.BackColor);
- if (width == 0 || height == 0)
- {
- return null;
- }
- GSOPoint3ds sectionpts = new GSOPoint3ds();
- sectionpts.Add(new GSOPoint3d(width / -2, height / 2, 0));
- sectionpts.Add(new GSOPoint3d(width / -2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / 2, 0));
-
- style.SetSectionPoints(sectionpts);
- style.IsClosed = true;
- style.SetAnchorByAlign(EnumAlign.MiddleCenter);
-
- return style;
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOFeatureDataset layer,string name,GSOFeature oldfeat)
- {
- line = LatLon2Coord_Line(line);
-
- double width_all = interval * (num_width-1);
- double height_all = interval * (num_height-1);
-
- GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3d p1 = line[0][0];
- GSOPoint3d p2 = line[0][1];
- double daltaX = p2.X-p1.X;
- double daltaY = p2.Y-p1.Y;
- double agree = Math.Atan(daltaY/daltaX);
- GSOPoint2d point = new GSOPoint2d((-0.5*width_all-interval)*Math.Sin(agree),(0.5*width_all+interval)*Math.Cos(agree));
- line.MoveXY(point.X,point.Y);
- line.MoveZ(height_all / -2);
-
- for (int i = 0; i < num_width; i++)
- {
- for (int j = 0; j < num_height; j++)
- {
- GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;
- point = new GSOPoint2d((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));
- templine.MoveXY(point.X,point.Y);
- templine.MoveZ(interval*j);
- templine = Coord2LatLon_Line(templine);
- GSOFeature feat = layer.CreateFeature();
- feat.Geometry = templine;
- feat.Geometry.Style = style;
- feat.Name = name;
- SetFields(oldfeat, feat);
- layer.AddFeature(feat);
- }
- }
- }
-
- private GSOGeoPolyline3D LatLon2Coord_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = LatLon2Coord(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOGeoPolyline3D Coord2LatLon_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = Coord2LatLon(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOPoint2d LatLon2Coord(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, id);
- return result;
- }
-
- private GSOPoint2d Coord2LatLon(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, id);
- return result;
- //+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs
- }
-
- private GSOFeatureDataset CreateDBFeatureDataset(string name)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return null;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- MessageBox.Show("Shp图层为空!", "提示");
- return null;
- }
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- {
- MessageBox.Show("图层要素个数为0!", "提示");
- return null;
- }
- GSOFeatureDataset featureDataset = layer.Dataset as GSOFeatureDataset;
- if (featureDataset == null)
- {
- MessageBox.Show("Shp图层不是矢量图层!", "提示");
- return null;
- }
-
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return null ;
- }
- GSOFeatureDataset newFeatureDataset = ds.CreateFeatureDataset(name);
- if (newFeatureDataset != null)
- {
- for (int i = 0; i < featureDataset.FieldCount; i++)
- {
- GeoScene.Data.GSOFieldAttr fielddef = featureDataset.GetField(i);
-
- GSOFieldAttr field = new GSOFieldAttr();
- //field.Name = fielddef.Name;
- field.Name = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- field.Type = fielddef.Type;
- field.Width = fielddef.Width;
- field.Precision = fielddef.Precision;
- bool res = newFeatureDataset.AddField(field);
- }
- newFeatureDataset.Save();
- }
- return newFeatureDataset;
- }
-
- private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
- {
- if ((pipelineTypeCbo.Text != "给水") && (pipelineTypeCbo.Text != "天然气") &&
- (pipelineTypeCbo.Text != "燃气") && (pipelineTypeCbo.Text != "中水"))
- {
- cmbReference.Text = "管底";
- }
- else
- {
- cmbReference.Text = "管顶";
- }
-
- if (pipelineTypeCbo.Text == "给水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 255);
- }
- else if (pipelineTypeCbo.Text == "供电")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 100, 150);
- }
- else if (pipelineTypeCbo.Text == "雨水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(230, 120, 0);
- }
- else if (pipelineTypeCbo.Text == "污水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(128, 64, 0);
- }
- else if (pipelineTypeCbo.Text == "天然气")
- {
- btnPipelineColor.BackColor = Color.FromArgb(215, 0, 64);
- }
- else if (pipelineTypeCbo.Text == "共通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "电通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "有线电视")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "监控")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "交通信号")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "路灯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 0, 150);
- }
- else if (pipelineTypeCbo.Text == "通讯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 0);
- }
- }
-
- private object convertFieldValue(string fieldname, object obj)
- {
- if (obj == null)
- return null;
-
- try
- {
- string type = fields_types[fieldname].ToString();
- switch (type)
- {
- case "string":
- return obj.ToString();
- case "int":
- //return 101;
- int intResult;
- if (int.TryParse(obj.ToString(), out intResult))
- return intResult;
- else
- return null;
- case "double":
- //return 202.5;
- double doubleResult;
- if (double.TryParse(obj.ToString(), out doubleResult))
- return doubleResult;
- else
- return null;
- case "date":
- DateTime dtResult;
- if (DateTime.TryParse(obj.ToString(), out dtResult))
- return dtResult;
- else
- return null;
- }
- return null;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- return null;
- }
- }
-
- ///
- /// 验证shp格式文件
- ///
- ///
- ///
- private string valiPipeData(GSOLayer layer) //验证shp格式文件
- {
- 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 (fields_types.ContainsKey(fieldName))
- {
- string fieldType = fields_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("Deep1"))
- {
- txtMessage += "Deep1字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep1");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep1字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Deep2"))
- {
- txtMessage += "Deep2字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep2");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep2字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Diameter"))
- {
- txtMessage += "Diameter字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Diameter");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Diameter字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Handle"))
- {
- txtMessage += "Handle字段不存在!\r\n";
- }
- List lstHandle = new List();
- 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 (fields_types.ContainsKey(fieldName))
- {
- if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
- {
- txtMessage += "ID为" + f.ID + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
- }
- }
- }
- if (f.GetFieldAsFloat("Diameter") <= 0)
- {
- txtMessage += "ID为" + f.ID + "\"Diameter\"字段中的值必须大于0 \r\n";
- }
- if (!lstHandle.Contains(f.GetFieldAsString("Handle")))
- {
- lstHandle.Add(f.GetFieldAsString("Handle"));
- }
- else
- {
- txtMessage += "ID为" + f.ID + "的\"Handle\"字段中的值重复\r\n";
- }
- }
- }
- return txtMessage;
- }
-
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.resx b/FrmMultiPipelineModelDB.resx
deleted file mode 100644
index 1d40cb6..0000000
--- a/FrmMultiPipelineModelDB.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
-
-
- 156, 16
-
-
- 25
-
-
\ No newline at end of file
diff --git a/MainFrm.cs b/MainFrm.cs
index 30a34a5..8e37fde 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -6324,9 +6324,6 @@
buttonItemSH4.Checked = globeControl1.Globe.StatusBar.Visible;
globeControl1.Globe.Refresh();
}
-
-
-
///
/// 添加指定路径下的数据 功能
///
@@ -6368,7 +6365,6 @@
node.SelectedImageIndex = 0;
node.Checked = terrain.Visible;
// 注意用insert不要用add,因为后加入的图层在上层
- // terrainManagerNode.Nodes.Add(node);
layerManagerNode.Nodes.Insert(0, node);
}
newlayername = terrain.Caption;
@@ -8386,9 +8382,6 @@
}
}
}
-
-
-
///
/// 管线自动缩进 菜单
///
@@ -8399,71 +8392,6 @@
FrmPipelineIndented frm = new FrmPipelineIndented(globeControl1, m_PipelineLayerNames, workwellLayerNames);
frm.ShowDialog(this);
}
-
- private void btnExportCADs_Click(object sender, EventArgs e)
- {
-
- }
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 统计指定图层在指定范围内的所有feature对象
///
@@ -8576,17 +8504,19 @@
try
{
-
string dbIp = Utility.sgdbip;
string database = Utility.sgdbname;
string user = Utility.sgdbuser;
string pass = Utility.sgdbpwd;
- shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "", user, pass);
+ shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "",
+ user, pass);
if (shds == null)
{
MessageBox.Show("数据库连接失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+
+ //Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+ Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -8598,7 +8528,6 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
}
///
@@ -11196,137 +11125,6 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
///
/// 数据质量检查
///
@@ -12463,7 +12261,6 @@
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
//zhanshi = false;
@@ -12646,231 +12443,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
-
private void btn_check_history_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_check_history.Text);
@@ -12973,18 +12545,6 @@
LogManager.saveLog(Utility.userName, this.btn_document_info.Text);
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //FormDocumentManager frm = new FormDocumentManager();
- //frm.ShowDialog();
-
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //new FormDocumentManager().ShowDialog();
if (FormDocumentManager.IS_OPEN)
{
return;
@@ -13121,31 +12681,7 @@
FrmChangePassword frm = new FrmChangePassword();
frm.ShowDialog();
}
- ///
- /// 多孔管线入库
- ///
- ///
- ///
- private void buttonItem9_Click(object sender, EventArgs e)
- {
- //保存日志
- LogManager.saveLog(Utility.userName, this.buttonItemSJGL4_2.Text);
-
- if (ds == null)
- {
- MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- ConnectDB(null, null);
- }
- if (ds == null)
- return;
-
- FrmMultiPipelineModelDB frm = new FrmMultiPipelineModelDB(globeControl1, ds);
- if (frm.ShowDialog() == DialogResult.OK)
- {
- addNodeToLayerManagerNode(frm.rukuLayer);
- }
- //frm.Show();
- }
+
private void 导出CADToolStripMenuItem1_Click(object sender, EventArgs e)
{
TreeNode node = layerNodeContexMenu.Tag as TreeNode;
diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs
index 426beb3..fd0ef22 100644
--- a/MainFrm.designer.cs
+++ b/MainFrm.designer.cs
@@ -241,15 +241,6 @@
this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
- this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
- this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
- this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
- this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
- this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar();
this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem();
@@ -271,7 +262,6 @@
this.buttonItemSJGL4 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_1 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_2 = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_3 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL5 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL6 = new DevComponents.DotNetBar.ButtonItem();
@@ -419,6 +409,15 @@
this.buttonItemBZ9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ10 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ11 = new DevComponents.DotNetBar.ButtonItem();
+ this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
+ this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
+ this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
+ this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel4 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar1 = new DevComponents.DotNetBar.RibbonBar();
this.btn_document_info = new DevComponents.DotNetBar.ButtonItem();
@@ -651,8 +650,8 @@
this.contextMenuStrip3.SuspendLayout();
this.contextMenuStripDeleteLayerNode.SuspendLayout();
this.ribbonControl1.SuspendLayout();
- this.ribbonPanel2.SuspendLayout();
this.ribbonPanel15.SuspendLayout();
+ this.ribbonPanel2.SuspendLayout();
this.ribbonPanel4.SuspendLayout();
this.ribbonPanel6.SuspendLayout();
this.ribbonPanel5.SuspendLayout();
@@ -841,7 +840,7 @@
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21);
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20);
this.toolStripDropDownButton1.Text = "帮助";
this.toolStripDropDownButton1.Visible = false;
//
@@ -2362,137 +2361,6 @@
this.ribbonControl1.Text = "ribbonControl1";
this.ribbonControl1.UseCustomizeDialog = false;
//
- // ribbonPanel2
- //
- this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonPanel2.Controls.Add(this.ribbonBar3);
- this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
- this.ribbonPanel2.Name = "ribbonPanel2";
- this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
- this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
- //
- //
- //
- this.ribbonPanel2.Style.Class = "";
- this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseDown.Class = "";
- this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseOver.Class = "";
- this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonPanel2.TabIndex = 39;
- this.ribbonPanel2.Visible = false;
- //
- // ribbonBar3
- //
- this.ribbonBar3.AutoOverflowEnabled = true;
- //
- //
- //
- this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
- this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.BackgroundStyle.Class = "";
- this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.ContainerControlProcessDialogKey = true;
- this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
- this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
- this.btn_user_info,
- this.btn_role_info,
- this.btn_resc_info,
- this.btn_role_resc,
- this.btn_user_role,
- this.btn_password_edit,
- this.buttonItemPasswordReset});
- this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
- this.ribbonBar3.Name = "ribbonBar3";
- this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
- this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonBar3.TabIndex = 1;
- //
- //
- //
- this.ribbonBar3.TitleStyle.Class = "";
- this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.TitleStyleMouseOver.Class = "";
- this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.TitleVisible = false;
- //
- // btn_user_info
- //
- this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
- this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_info.Name = "btn_user_info";
- this.btn_user_info.SubItemsExpandWidth = 14;
- this.btn_user_info.Text = "用户管理";
- this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
- //
- // btn_role_info
- //
- this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
- this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_info.Name = "btn_role_info";
- this.btn_role_info.SubItemsExpandWidth = 14;
- this.btn_role_info.Text = "角色管理";
- this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
- //
- // btn_resc_info
- //
- this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
- this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_resc_info.Name = "btn_resc_info";
- this.btn_resc_info.SubItemsExpandWidth = 14;
- this.btn_resc_info.Text = "资源管理";
- this.btn_resc_info.Visible = false;
- this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
- //
- // btn_role_resc
- //
- this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
- this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_resc.Name = "btn_role_resc";
- this.btn_role_resc.SubItemsExpandWidth = 14;
- this.btn_role_resc.Text = "角色授权";
- this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
- //
- // btn_user_role
- //
- this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
- this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_role.Name = "btn_user_role";
- this.btn_user_role.SubItemsExpandWidth = 14;
- this.btn_user_role.Text = "用户授权";
- this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
- //
- // btn_password_edit
- //
- this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
- this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_password_edit.Name = "btn_password_edit";
- this.btn_password_edit.SubItemsExpandWidth = 14;
- this.btn_password_edit.Text = "密码修改";
- this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
- //
- // buttonItemPasswordReset
- //
- this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
- this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
- this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
- this.buttonItemPasswordReset.Text = "重置密码";
- this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
- //
// ribbonPanel15
//
this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -2549,7 +2417,7 @@
this.buttonItemBZ});
this.ribbonBar20.Location = new System.Drawing.Point(3, 0);
this.ribbonBar20.Name = "ribbonBar20";
- this.ribbonBar20.Size = new System.Drawing.Size(814, 59);
+ this.ribbonBar20.Size = new System.Drawing.Size(785, 59);
this.ribbonBar20.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.ribbonBar20.TabIndex = 0;
//
@@ -2711,7 +2579,6 @@
this.buttonItemSJGL4.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.buttonItemSJGL4_1,
this.buttonItemSJGL4_2,
- this.buttonItem9,
this.buttonItemSJGL4_3});
this.buttonItemSJGL4.Text = "数据批量入库";
//
@@ -2727,12 +2594,6 @@
this.buttonItemSJGL4_2.Text = "线矢量入库";
this.buttonItemSJGL4_2.Click += new System.EventHandler(this.buttonItemSJGL4_2_Click);
//
- // buttonItem9
- //
- this.buttonItem9.Name = "buttonItem9";
- this.buttonItem9.Text = "多孔入库";
- this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click);
- //
// buttonItemSJGL4_3
//
this.buttonItemSJGL4_3.Name = "buttonItemSJGL4_3";
@@ -3869,6 +3730,137 @@
this.buttonItemBZ11.Text = "标注管理";
this.buttonItemBZ11.Click += new System.EventHandler(this.buttonItemBZ11_Click);
//
+ // ribbonPanel2
+ //
+ this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonPanel2.Controls.Add(this.ribbonBar3);
+ this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
+ this.ribbonPanel2.Name = "ribbonPanel2";
+ this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
+ this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
+ //
+ //
+ //
+ this.ribbonPanel2.Style.Class = "";
+ this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseDown.Class = "";
+ this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseOver.Class = "";
+ this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonPanel2.TabIndex = 39;
+ this.ribbonPanel2.Visible = false;
+ //
+ // ribbonBar3
+ //
+ this.ribbonBar3.AutoOverflowEnabled = true;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
+ this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundStyle.Class = "";
+ this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.ContainerControlProcessDialogKey = true;
+ this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
+ this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
+ this.btn_user_info,
+ this.btn_role_info,
+ this.btn_resc_info,
+ this.btn_role_resc,
+ this.btn_user_role,
+ this.btn_password_edit,
+ this.buttonItemPasswordReset});
+ this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
+ this.ribbonBar3.Name = "ribbonBar3";
+ this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
+ this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonBar3.TabIndex = 1;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyle.Class = "";
+ this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyleMouseOver.Class = "";
+ this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.TitleVisible = false;
+ //
+ // btn_user_info
+ //
+ this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
+ this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_info.Name = "btn_user_info";
+ this.btn_user_info.SubItemsExpandWidth = 14;
+ this.btn_user_info.Text = "用户管理";
+ this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
+ //
+ // btn_role_info
+ //
+ this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
+ this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_info.Name = "btn_role_info";
+ this.btn_role_info.SubItemsExpandWidth = 14;
+ this.btn_role_info.Text = "角色管理";
+ this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
+ //
+ // btn_resc_info
+ //
+ this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
+ this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_resc_info.Name = "btn_resc_info";
+ this.btn_resc_info.SubItemsExpandWidth = 14;
+ this.btn_resc_info.Text = "资源管理";
+ this.btn_resc_info.Visible = false;
+ this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
+ //
+ // btn_role_resc
+ //
+ this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
+ this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_resc.Name = "btn_role_resc";
+ this.btn_role_resc.SubItemsExpandWidth = 14;
+ this.btn_role_resc.Text = "角色授权";
+ this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
+ //
+ // btn_user_role
+ //
+ this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
+ this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_role.Name = "btn_user_role";
+ this.btn_user_role.SubItemsExpandWidth = 14;
+ this.btn_user_role.Text = "用户授权";
+ this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
+ //
+ // btn_password_edit
+ //
+ this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
+ this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_password_edit.Name = "btn_password_edit";
+ this.btn_password_edit.SubItemsExpandWidth = 14;
+ this.btn_password_edit.Text = "密码修改";
+ this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
+ //
+ // buttonItemPasswordReset
+ //
+ this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
+ this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
+ this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
+ this.buttonItemPasswordReset.Text = "重置密码";
+ this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
+ //
// ribbonPanel4
//
this.ribbonPanel4.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -5522,7 +5514,7 @@
this.dataGridViewX2.ReadOnly = true;
this.dataGridViewX2.RowHeadersVisible = false;
this.dataGridViewX2.RowTemplate.Height = 23;
- this.dataGridViewX2.Size = new System.Drawing.Size(20389, 92);
+ this.dataGridViewX2.Size = new System.Drawing.Size(20983, 92);
this.dataGridViewX2.TabIndex = 11;
//
// dataGridViewTextBoxColumn10
@@ -5616,7 +5608,7 @@
this.dataGridViewX3.ReadOnly = true;
this.dataGridViewX3.RowHeadersVisible = false;
this.dataGridViewX3.RowTemplate.Height = 23;
- this.dataGridViewX3.Size = new System.Drawing.Size(20388, 127);
+ this.dataGridViewX3.Size = new System.Drawing.Size(20982, 127);
this.dataGridViewX3.TabIndex = 5;
this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick);
//
@@ -5874,7 +5866,7 @@
this.dataGridViewX8.ReadOnly = true;
this.dataGridViewX8.RowHeadersVisible = false;
this.dataGridViewX8.RowTemplate.Height = 23;
- this.dataGridViewX8.Size = new System.Drawing.Size(125, 92);
+ this.dataGridViewX8.Size = new System.Drawing.Size(91, 92);
this.dataGridViewX8.TabIndex = 11;
//
// dataGridViewTextBoxColumn12
@@ -5969,7 +5961,7 @@
this.dataGridViewX9.ReadOnly = true;
this.dataGridViewX9.RowHeadersVisible = false;
this.dataGridViewX9.RowTemplate.Height = 23;
- this.dataGridViewX9.Size = new System.Drawing.Size(124, 127);
+ this.dataGridViewX9.Size = new System.Drawing.Size(90, 127);
this.dataGridViewX9.TabIndex = 5;
this.dataGridViewX9.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX9_MouseDoubleClick);
//
@@ -6834,8 +6826,8 @@
this.contextMenuStripDeleteLayerNode.ResumeLayout(false);
this.ribbonControl1.ResumeLayout(false);
this.ribbonControl1.PerformLayout();
- this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel15.ResumeLayout(false);
+ this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel4.ResumeLayout(false);
this.ribbonPanel6.ResumeLayout(false);
this.ribbonPanel5.ResumeLayout(false);
@@ -7328,7 +7320,6 @@
private System.Windows.Forms.ToolStripMenuItem 定位ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem LayerFlyMenuItem;
private DevComponents.DotNetBar.ButtonItem btn_password_edit;
- private DevComponents.DotNetBar.ButtonItem buttonItem9;
private System.Windows.Forms.ToolStripMenuItem 导出CADToolStripMenuItem1;
private DevComponents.DotNetBar.ButtonItem buttonItemGBJC;
private System.Windows.Forms.ContextMenuStrip RightScreenToolMenu;
diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe
index 924ae08..e7980a2 100644
--- a/bin/x86/Debug/Cyberpipe.exe
+++ b/bin/x86/Debug/Cyberpipe.exe
Binary files differ
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/FrmMultiPipelineModelDB.Designer.cs b/FrmMultiPipelineModelDB.Designer.cs
deleted file mode 100644
index 8aa77b0..0000000
--- a/FrmMultiPipelineModelDB.Designer.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-namespace Cyberpipe
-{
- partial class FrmMultiPipelineModelDB
- {
- ///
- /// 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.label7 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBoxCornerSliceAngle = new System.Windows.Forms.TextBox();
- this.numericUpDownLineOpaque = new System.Windows.Forms.NumericUpDown();
- this.txtSlice = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.cmbRadius = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.cmbTo = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbFrom = new System.Windows.Forms.ComboBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.btnClose = new System.Windows.Forms.Button();
- this.btnCreateModel = new System.Windows.Forms.Button();
- this.textBoxNewLayerName = new System.Windows.Forms.TextBox();
- this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxShpLayerList = new System.Windows.Forms.ComboBox();
- this.colorDialog1 = new System.Windows.Forms.ColorDialog();
- this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.cmbID = new System.Windows.Forms.ComboBox();
- this.label11 = new System.Windows.Forms.Label();
- this.chkDeep = new System.Windows.Forms.CheckBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.cmbReference = new System.Windows.Forms.ComboBox();
- this.cmbWidthNum = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.cmbHeightNum = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.numOpaqueRect = new System.Windows.Forms.NumericUpDown();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.btnRectColor = new System.Windows.Forms.Button();
- this.pipelineTypeCbo = new DevComponents.DotNetBar.Controls.ComboBoxEx();
- this.label17 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).BeginInit();
- this.SuspendLayout();
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Location = new System.Drawing.Point(360, 395);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(17, 12);
- this.label7.TabIndex = 71;
- this.label7.Text = "度";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.BackColor = System.Drawing.Color.Transparent;
- this.label9.Location = new System.Drawing.Point(21, 393);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(77, 12);
- this.label9.TabIndex = 70;
- this.label9.Text = "拐弯平滑度:";
- //
- // textBoxCornerSliceAngle
- //
- this.textBoxCornerSliceAngle.Location = new System.Drawing.Point(131, 390);
- this.textBoxCornerSliceAngle.Name = "textBoxCornerSliceAngle";
- this.textBoxCornerSliceAngle.Size = new System.Drawing.Size(225, 21);
- this.textBoxCornerSliceAngle.TabIndex = 69;
- this.textBoxCornerSliceAngle.Text = "10";
- //
- // numericUpDownLineOpaque
- //
- this.numericUpDownLineOpaque.Location = new System.Drawing.Point(131, 334);
- this.numericUpDownLineOpaque.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numericUpDownLineOpaque.Name = "numericUpDownLineOpaque";
- this.numericUpDownLineOpaque.Size = new System.Drawing.Size(225, 21);
- this.numericUpDownLineOpaque.TabIndex = 68;
- this.numericUpDownLineOpaque.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- //
- // txtSlice
- //
- this.txtSlice.Location = new System.Drawing.Point(131, 362);
- this.txtSlice.Name = "txtSlice";
- this.txtSlice.Size = new System.Drawing.Size(224, 21);
- this.txtSlice.TabIndex = 67;
- this.txtSlice.Text = "24";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(20, 365);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(77, 12);
- this.label8.TabIndex = 65;
- this.label8.Text = "截面分段数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.BackColor = System.Drawing.Color.Transparent;
- this.label10.Location = new System.Drawing.Point(21, 336);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(53, 12);
- this.label10.TabIndex = 66;
- this.label10.Text = "透明度:";
- //
- // cmbRadius
- //
- this.cmbRadius.FormattingEnabled = true;
- this.cmbRadius.Location = new System.Drawing.Point(130, 196);
- this.cmbRadius.Name = "cmbRadius";
- this.cmbRadius.Size = new System.Drawing.Size(226, 20);
- this.cmbRadius.TabIndex = 64;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(20, 309);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 62;
- this.label6.Text = "管道颜色:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(20, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 63;
- this.label5.Text = "管径字段:";
- //
- // cmbTo
- //
- this.cmbTo.FormattingEnabled = true;
- this.cmbTo.Location = new System.Drawing.Point(130, 125);
- this.cmbTo.Name = "cmbTo";
- this.cmbTo.Size = new System.Drawing.Size(226, 20);
- this.cmbTo.TabIndex = 61;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(24, 132);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 60;
- this.label4.Text = "终点埋深:";
- //
- // cmbFrom
- //
- this.cmbFrom.FormattingEnabled = true;
- this.cmbFrom.Location = new System.Drawing.Point(129, 97);
- this.cmbFrom.Name = "cmbFrom";
- this.cmbFrom.Size = new System.Drawing.Size(226, 20);
- this.cmbFrom.TabIndex = 59;
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(14, 479);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(380, 2);
- this.groupBox1.TabIndex = 58;
- this.groupBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 103);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 12);
- this.label3.TabIndex = 55;
- this.label3.Text = "起点埋深:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(20, 72);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(89, 12);
- this.label2.TabIndex = 56;
- this.label2.Text = "管线图层名称:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(20, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(95, 12);
- this.label1.TabIndex = 57;
- this.label1.Text = "Shapefile图层:";
- //
- // btnClose
- //
- this.btnClose.Location = new System.Drawing.Point(282, 490);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 53;
- this.btnClose.Text = "关闭(&C)";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // btnCreateModel
- //
- this.btnCreateModel.Location = new System.Drawing.Point(199, 490);
- this.btnCreateModel.Name = "btnCreateModel";
- this.btnCreateModel.Size = new System.Drawing.Size(74, 23);
- this.btnCreateModel.TabIndex = 54;
- this.btnCreateModel.Text = "建模(&M)";
- this.btnCreateModel.UseVisualStyleBackColor = true;
- this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
- //
- // textBoxNewLayerName
- //
- this.textBoxNewLayerName.Location = new System.Drawing.Point(129, 67);
- this.textBoxNewLayerName.Name = "textBoxNewLayerName";
- this.textBoxNewLayerName.Size = new System.Drawing.Size(226, 21);
- this.textBoxNewLayerName.TabIndex = 51;
- //
- // btnPipelineColor
- //
- this.btnPipelineColor.BackColor = System.Drawing.Color.Gainsboro;
- this.btnPipelineColor.Location = new System.Drawing.Point(130, 304);
- this.btnPipelineColor.Name = "btnPipelineColor";
- this.btnPipelineColor.Size = new System.Drawing.Size(226, 23);
- this.btnPipelineColor.TabIndex = 48;
- this.btnPipelineColor.UseVisualStyleBackColor = false;
- this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
- //
- // comboBoxShpLayerList
- //
- this.comboBoxShpLayerList.FormattingEnabled = true;
- this.comboBoxShpLayerList.Location = new System.Drawing.Point(129, 11);
- this.comboBoxShpLayerList.Name = "comboBoxShpLayerList";
- this.comboBoxShpLayerList.Size = new System.Drawing.Size(226, 20);
- this.comboBoxShpLayerList.TabIndex = 72;
- this.comboBoxShpLayerList.SelectedIndexChanged += new System.EventHandler(this.cmbLayer_SelectedIndexChanged);
- //
- // cmbID
- //
- this.cmbID.FormattingEnabled = true;
- this.cmbID.Location = new System.Drawing.Point(130, 223);
- this.cmbID.Name = "cmbID";
- this.cmbID.Size = new System.Drawing.Size(226, 20);
- this.cmbID.TabIndex = 74;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(22, 227);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 73;
- this.label11.Text = "ID字段:";
- //
- // chkDeep
- //
- this.chkDeep.AutoSize = true;
- this.chkDeep.Location = new System.Drawing.Point(130, 150);
- this.chkDeep.Name = "chkDeep";
- this.chkDeep.Size = new System.Drawing.Size(144, 16);
- this.chkDeep.TabIndex = 75;
- this.chkDeep.Text = "埋深是否转换为相反数";
- this.chkDeep.UseVisualStyleBackColor = true;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(359, 200);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(29, 12);
- this.label12.TabIndex = 76;
- this.label12.Text = "毫米";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(20, 172);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(77, 12);
- this.label13.TabIndex = 63;
- this.label13.Text = "埋深参考点:";
- //
- // cmbReference
- //
- this.cmbReference.FormattingEnabled = true;
- this.cmbReference.Items.AddRange(new object[] {
- "管底",
- "管顶"});
- this.cmbReference.Location = new System.Drawing.Point(130, 168);
- this.cmbReference.Name = "cmbReference";
- this.cmbReference.Size = new System.Drawing.Size(226, 20);
- this.cmbReference.TabIndex = 64;
- //
- // cmbWidthNum
- //
- this.cmbWidthNum.FormattingEnabled = true;
- this.cmbWidthNum.Location = new System.Drawing.Point(131, 250);
- this.cmbWidthNum.Name = "cmbWidthNum";
- this.cmbWidthNum.Size = new System.Drawing.Size(226, 20);
- this.cmbWidthNum.TabIndex = 78;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(22, 254);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 77;
- this.label14.Text = "横向个数字段:";
- //
- // cmbHeightNum
- //
- this.cmbHeightNum.FormattingEnabled = true;
- this.cmbHeightNum.Location = new System.Drawing.Point(131, 277);
- this.cmbHeightNum.Name = "cmbHeightNum";
- this.cmbHeightNum.Size = new System.Drawing.Size(226, 20);
- this.cmbHeightNum.TabIndex = 80;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(22, 280);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(89, 12);
- this.label15.TabIndex = 79;
- this.label15.Text = "纵向个数字段:";
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(430, 246);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 81;
- this.label16.Text = "间距字段:";
- //
- // numOpaqueRect
- //
- this.numOpaqueRect.Location = new System.Drawing.Point(132, 451);
- this.numOpaqueRect.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numOpaqueRect.Name = "numOpaqueRect";
- this.numOpaqueRect.Size = new System.Drawing.Size(225, 21);
- this.numOpaqueRect.TabIndex = 88;
- this.numOpaqueRect.Value = new decimal(new int[] {
- 125,
- 0,
- 0,
- 0});
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Location = new System.Drawing.Point(24, 455);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(53, 12);
- this.label21.TabIndex = 87;
- this.label21.Text = "透明度:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(22, 424);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(65, 12);
- this.label22.TabIndex = 84;
- this.label22.Text = "管沟颜色:";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(430, 291);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(77, 12);
- this.label23.TabIndex = 85;
- this.label23.Text = "管沟宽字段:";
- //
- // btnRectColor
- //
- this.btnRectColor.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.btnRectColor.Location = new System.Drawing.Point(131, 419);
- this.btnRectColor.Name = "btnRectColor";
- this.btnRectColor.Size = new System.Drawing.Size(226, 23);
- this.btnRectColor.TabIndex = 83;
- this.btnRectColor.UseVisualStyleBackColor = false;
- //
- // pipelineTypeCbo
- //
- this.pipelineTypeCbo.DisplayMember = "Text";
- this.pipelineTypeCbo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.pipelineTypeCbo.FormattingEnabled = true;
- this.pipelineTypeCbo.ItemHeight = 15;
- this.pipelineTypeCbo.Location = new System.Drawing.Point(129, 40);
- this.pipelineTypeCbo.Name = "pipelineTypeCbo";
- this.pipelineTypeCbo.Size = new System.Drawing.Size(226, 21);
- this.pipelineTypeCbo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.pipelineTypeCbo.TabIndex = 126;
- this.pipelineTypeCbo.SelectedIndexChanged += new System.EventHandler(this.pipelineTypeCbo_SelectedIndexChanged);
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(20, 46);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(89, 12);
- this.label17.TabIndex = 125;
- this.label17.Text = "管线图层类型:";
- //
- // FrmMultiPipelineModelDB
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(406, 522);
- this.Controls.Add(this.pipelineTypeCbo);
- this.Controls.Add(this.label17);
- this.Controls.Add(this.numOpaqueRect);
- this.Controls.Add(this.label21);
- this.Controls.Add(this.label22);
- this.Controls.Add(this.label23);
- this.Controls.Add(this.btnRectColor);
- this.Controls.Add(this.label16);
- this.Controls.Add(this.cmbHeightNum);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.cmbWidthNum);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.chkDeep);
- this.Controls.Add(this.cmbID);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.comboBoxShpLayerList);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.textBoxCornerSliceAngle);
- this.Controls.Add(this.numericUpDownLineOpaque);
- this.Controls.Add(this.txtSlice);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.cmbReference);
- this.Controls.Add(this.cmbRadius);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.cmbTo);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.cmbFrom);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.btnCreateModel);
- this.Controls.Add(this.textBoxNewLayerName);
- this.Controls.Add(this.btnPipelineColor);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.Name = "FrmMultiPipelineModelDB";
- this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "管孔方沟入库";
- this.Load += new System.EventHandler(this.FrmMultiPipelineModelDB_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBoxCornerSliceAngle;
- private System.Windows.Forms.NumericUpDown numericUpDownLineOpaque;
- private System.Windows.Forms.TextBox txtSlice;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ComboBox cmbRadius;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.ComboBox cmbTo;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.ComboBox cmbFrom;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.Button btnCreateModel;
- private System.Windows.Forms.TextBox textBoxNewLayerName;
- private System.Windows.Forms.Button btnPipelineColor;
- private System.Windows.Forms.ComboBox comboBoxShpLayerList;
- private System.Windows.Forms.ColorDialog colorDialog1;
- private System.Windows.Forms.SaveFileDialog saveFileDialog1;
- private System.Windows.Forms.ComboBox cmbID;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.CheckBox chkDeep;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.ComboBox cmbReference;
- private System.Windows.Forms.ComboBox cmbWidthNum;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.ComboBox cmbHeightNum;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.NumericUpDown numOpaqueRect;
- private System.Windows.Forms.Label label21;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.Button btnRectColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx pipelineTypeCbo;
- private System.Windows.Forms.Label label17;
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.cs b/FrmMultiPipelineModelDB.cs
deleted file mode 100644
index 0a0516a..0000000
--- a/FrmMultiPipelineModelDB.cs
+++ /dev/null
@@ -1,814 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using DevComponents.DotNetBar;
-using GeoScene.Globe;
-using GeoScene.Engine;
-using GeoScene.Data;
-using System.IO;
-using System.Collections;
-using System.Xml;
-
-namespace Cyberpipe
-{
- public partial class FrmMultiPipelineModelDB : Office2007Form
- {
- private GeoScene.Globe.GSOGlobeControl globeControl1;
- GSODataSource ds = null;
- public GSOLayer rukuLayer = null;
- private Hashtable en_cns = new Hashtable();
- private Hashtable fields_types = new Hashtable();
-
- public FrmMultiPipelineModelDB(GSOGlobeControl _globeControl,GSODataSource _ds)
- {
- globeControl1 = _globeControl;
- ds = _ds;
- InitializeComponent();
-
- cmbReference.Text = "管顶";
- chkDeep.Checked = true;
- }
-
- private void FrmMultiPipelineModelDB_Load(object sender, EventArgs e)
- {
- string pipelinetype = Utility.pipelinetype;
- string[] pipelinetypes = pipelinetype.Split(',');
- for (int i = 0; i < pipelinetypes.Length; i++)
- {
- pipelineTypeCbo.Items.Add(pipelinetypes[i]);
- }
-
- comboBoxShpLayerList.Items.Clear();
-
- for (int i = 0; i < globeControl1.Globe.Layers.Count; i++)
- {
- GSOLayer layer = globeControl1.Globe.Layers[i];
- if (layer != null && layer.Name.ToLower().EndsWith(".shp"))
- {
- comboBoxShpLayerList.Items.Add(layer.Caption);
- }
- }
-
- string filename = Application.StartupPath + "\\FormText.xml";
- if (File.Exists(filename))
- {
- XmlTextReader XmlReader = new XmlTextReader(filename);
- try
- {
- while (XmlReader.Read())
- {
- if (XmlReader.Name == "Field")
- {
- string str1 = XmlReader["label"];
- string str3 = XmlReader["type"];
- string str2 = XmlReader.ReadElementString();
- en_cns.Add(str1, str2);
- fields_types.Add(str1, str3);
- }
- }
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- }
-
- private void cmbLayer_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- return;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- return;
- }
- string txtMessage = valiPipeData(layer);
- if (txtMessage != "")
- {
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(comboBoxShpLayerList.SelectedItem.ToString().Trim(), txtMessage);
- showErrorMessage.ShowDialog();
- return;
- }
- else
- {
- textBoxNewLayerName.Text = layer.Caption;
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- return;
-
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- for (int i = 0; i < features[0].GetFieldCount(); i++)
- {
- cmbFrom.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbTo.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbRadius.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbID.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbWidthNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbHeightNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- }
- cmbFrom.SelectedItem = "Deep1";
- cmbTo.SelectedItem = "Deep2";
- cmbRadius.SelectedItem = "Diameter";
- cmbWidthNum.SelectedItem = "Hor_Num";// "Weight";
- cmbHeightNum.SelectedItem = "Ver_Num";// "Height";
- cmbID.SelectedItem = "Handle";
- }
-
- }
-
- private void btnPipelineColor_Click(object sender, EventArgs e)
- {
- colorDialog1.Color = btnPipelineColor.BackColor;
-
- if (colorDialog1.ShowDialog() == DialogResult.OK)
- {
- btnPipelineColor.BackColor = colorDialog1.Color;
- }
- }
-
- private void btnCreateModel_Click(object sender, EventArgs e)
- {
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return;
- }
- if (string.IsNullOrEmpty(textBoxNewLayerName.Text))
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return;
- }
- if (ds.GetDatasetByName(textBoxNewLayerName.Text) != null)
- {
- MessageBox.Show("图层名称已存在!", "提示");
- return;
- }
- try
- {
- GSOLayer ShpSourceLayer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- GSOFeatureDataset pipeline = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim());
- if (pipeline == null)
- {
- MessageBox.Show("输入的图层名称不符合要求!", "提示");
- return;
- }
- pipeline.Open();
- GSOFeatureDataset pipelineRect = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim() + "_Rect");
- if (pipelineRect == null)
- {
- return;
- }
- pipelineRect.Open();
-
- GSOFeatures features = ShpSourceLayer.GetAllFeatures();
- string message = "";
- for (int j = 0; j < features.Length; j++)
- {
- GSOFeature f = features[j];
-
- GSOFeature newFeature = pipeline.CreateFeature();
-
- GSOPipeLineStyle3D style = new GSOPipeLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numericUpDownLineOpaque.Value), btnPipelineColor.BackColor);
-
- double radius = 0;
- if (cmbRadius.SelectedItem == null)
- {
- cmbRadius.SelectedIndex = 0;
- }
- GSOFieldDefn diameterfield = (GSOFieldDefn)f.GetFieldDefn(cmbRadius.SelectedItem.ToString());
- string fieldText = f.GetFieldAsString(cmbRadius.SelectedItem.ToString());
- if (diameterfield.Type == EnumFieldType.Text)
- {
- if (double.TryParse(fieldText, out radius))
- {
- radius = radius / 2000;
- }
- else
- {
- message += "ID为" + f.ID + "的对象的管径字段值不符合要求!\r\n";
- continue;
- }
- }
- else
- {
- radius = f.GetFieldAsDouble(cmbRadius.SelectedItem.ToString()) / 2000; // 探测数据的单位一般是毫米,需换算为米; 管径一般是 直径, 这个需要半径, 所有除以2000
- }
-
- if (cmbID.SelectedItem == null)
- {
- cmbID.SelectedIndex = 0;
- }
- if (cmbWidthNum.SelectedItem == null)
- {
- cmbWidthNum.SelectedIndex = 0;
- }
- if (cmbHeightNum.SelectedItem == null)
- {
- cmbHeightNum.SelectedIndex = 0;
- }
- string eventid = f.GetFieldAsString(cmbID.SelectedItem.ToString());
- double interval = radius * 2;
- int num_width = 0;
- int num_height = 0;
- if (!int.TryParse(f.GetFieldAsString(cmbWidthNum.SelectedItem.ToString()), out num_width))
- {
- message += "ID为" + f.ID + "的对象的宽度字段值不符合要求!\r\n";
- continue;
- }
- if (!int.TryParse(f.GetFieldAsString(cmbHeightNum.SelectedItem.ToString()), out num_height))
- {
- message += "ID为" + f.ID + "的对象的高度字段值不符合要求!\r\n";
- continue;
- }
-
- double rectWidth = Math.Round( radius * 2.0 * num_width + 0.08,5);// 两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- if (radius == 0)
- {
- message += "ID为" + f.ID + "的对象的管径字段值为0!\r\n";
- continue;
- }
-
- int intSlice = 0;
- double cornerSliceAngle = 0;
- if (!int.TryParse(txtSlice.Text.Trim(), out intSlice))
- {
- message += "ID为" + f.ID + "的对象的截面分段数字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(textBoxCornerSliceAngle.Text.Trim(), out cornerSliceAngle))
- {
- message += "ID为" + f.ID + "的对象的拐弯平滑度字段值不符合要求!\r\n";
- continue;
- }
- style.Radius = radius;
- style.Slice = intSlice;
- style.CornerSliceAngle = cornerSliceAngle;
-
- f.Geometry.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- GSOGeoPolyline3D line = f.Geometry as GSOGeoPolyline3D;
- if (line == null)
- {
- message += "ID为" + f.ID + "的对象不是一个线对象!\r\n";
- continue;
- }
-
- if (cmbFrom.SelectedItem == null)
- {
- cmbFrom.SelectedIndex = 0;
- }
- if (cmbTo.SelectedItem == null)
- {
- cmbTo.SelectedIndex = 0;
- }
- double deep1 = 0;
- double deep2 = 0;
- if (!double.TryParse(f.GetFieldAsString(cmbFrom.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep1))
- {
- message += "ID为" + f.ID + "的对象的起点埋深字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(f.GetFieldAsString(cmbTo.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep2))
- {
- message += "ID为" + f.ID + "的对象的终点埋深字段值不符合要求!\r\n";
- continue;
- }
-
- if (chkDeep.Checked)
- {
- deep1 = 0 - deep1;
- deep2 = 0 - deep2;
- }
-
- if (cmbReference.SelectedIndex == 0) //管底
- {
- deep1 = deep1 + radius * 2;
- deep2 = deep2 + radius * 2;
- }
- else if (cmbReference.SelectedIndex == 1) //管顶
- {
- deep1 = deep1 - radius * 2;
- deep2 = deep2 - radius * 2;
- }
- GSOPoint3ds ps = line[0];
- for (int n = 0; n < ps.Count; n++)
- {
- GSOPoint3d pt3d = ps[n];
- int pointcount = ps.Count;
- double radio = Math.Sqrt(Math.Pow(pt3d.Y - ps[0].Y, 2) + Math.Pow(pt3d.X - ps[0].X, 2)) / Math.Sqrt(Math.Pow(ps[pointcount - 1].Y - ps[0].Y, 2) + Math.Pow(ps[pointcount - 1].X - ps[0].X, 2));
- pt3d.Z = deep1 + (deep2 - deep1) * radio;
-
- if (double.IsInfinity(pt3d.Z))
- {
- pt3d.Z = deep2;
- }
- ps[n] = pt3d;
- }
- line[0] = ps;
- if (num_height == 0 || num_width == 0) // 直埋
- {
- newFeature.Geometry = line;
- newFeature.Geometry.Style = style;
- //newFeature.Name = eventid;
- newFeature.Name = en_cns.ContainsKey(eventid) == true ? en_cns[eventid].ToString() : eventid;
- SetFields(f, newFeature);
-
- pipeline.AddFeature(newFeature);
- }
- else
- {
- GSOFeature rectfeat = pipelineRect.CreateFeature();
- rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
- if (rectfeat != null)
- {
- SetFields(f, rectfeat);
- pipelineRect.AddFeature(rectfeat);
- }
- one2Multi(line, num_width, num_height, interval, style, pipeline, eventid, f);
- }
- }
-
- pipeline.Save();
- pipelineRect.Save();
- string strMessage = "shp文件中共" + features.Length + "个对象,实际入库" + pipeline.GetAllFeatures().Length + "个对象!\r\n";
- pipeline.Close();
- pipelineRect.Close();
- globeControl1.Refresh();
-
- GSOLayer layerRuku = globeControl1.Globe.Layers.Add(textBoxNewLayerName.Text);
- rukuLayer = layerRuku;
-
- if (message == "")
- {
- MessageBox.Show(strMessage, "提示");
- }
- else
- {
- //FrmMessageShow frm = new FrmMessageShow(strMessage + message);
- //frm.ShowDialog();
- MessageBox.Show(strMessage + message, "提示");
- }
-
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- catch (Exception ex)
- {
- //Log.PublishTxt(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- private void SetFields(GSOFeature oldfeat, GSOFeature newFeature)
- {
- for (int i = 0; i < oldfeat.GetFieldCount(); i++)
- {
- GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(oldfeat.GetFieldDefn(i));
-
- object fieldvalue = oldfeat.GetValue(fielddef.Name);
- if (fieldvalue == null)
- continue;
- string fieldName = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- newFeature.SetValue(fieldName, fieldvalue);
- }
- }
-
- private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
- {
- GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;
- GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
- if (style == null)
- {
- return null;
- }
- cloneline.Style = style;
- return cloneline;
- }
-
- private GSOExtendSectionLineStyle3D createRectStyle(double width, double height)
- {
- GSOExtendSectionLineStyle3D style = new GSOExtendSectionLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numOpaqueRect.Value), btnRectColor.BackColor);
- if (width == 0 || height == 0)
- {
- return null;
- }
- GSOPoint3ds sectionpts = new GSOPoint3ds();
- sectionpts.Add(new GSOPoint3d(width / -2, height / 2, 0));
- sectionpts.Add(new GSOPoint3d(width / -2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / 2, 0));
-
- style.SetSectionPoints(sectionpts);
- style.IsClosed = true;
- style.SetAnchorByAlign(EnumAlign.MiddleCenter);
-
- return style;
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOFeatureDataset layer,string name,GSOFeature oldfeat)
- {
- line = LatLon2Coord_Line(line);
-
- double width_all = interval * (num_width-1);
- double height_all = interval * (num_height-1);
-
- GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3d p1 = line[0][0];
- GSOPoint3d p2 = line[0][1];
- double daltaX = p2.X-p1.X;
- double daltaY = p2.Y-p1.Y;
- double agree = Math.Atan(daltaY/daltaX);
- GSOPoint2d point = new GSOPoint2d((-0.5*width_all-interval)*Math.Sin(agree),(0.5*width_all+interval)*Math.Cos(agree));
- line.MoveXY(point.X,point.Y);
- line.MoveZ(height_all / -2);
-
- for (int i = 0; i < num_width; i++)
- {
- for (int j = 0; j < num_height; j++)
- {
- GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;
- point = new GSOPoint2d((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));
- templine.MoveXY(point.X,point.Y);
- templine.MoveZ(interval*j);
- templine = Coord2LatLon_Line(templine);
- GSOFeature feat = layer.CreateFeature();
- feat.Geometry = templine;
- feat.Geometry.Style = style;
- feat.Name = name;
- SetFields(oldfeat, feat);
- layer.AddFeature(feat);
- }
- }
- }
-
- private GSOGeoPolyline3D LatLon2Coord_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = LatLon2Coord(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOGeoPolyline3D Coord2LatLon_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = Coord2LatLon(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOPoint2d LatLon2Coord(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, id);
- return result;
- }
-
- private GSOPoint2d Coord2LatLon(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, id);
- return result;
- //+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs
- }
-
- private GSOFeatureDataset CreateDBFeatureDataset(string name)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return null;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- MessageBox.Show("Shp图层为空!", "提示");
- return null;
- }
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- {
- MessageBox.Show("图层要素个数为0!", "提示");
- return null;
- }
- GSOFeatureDataset featureDataset = layer.Dataset as GSOFeatureDataset;
- if (featureDataset == null)
- {
- MessageBox.Show("Shp图层不是矢量图层!", "提示");
- return null;
- }
-
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return null ;
- }
- GSOFeatureDataset newFeatureDataset = ds.CreateFeatureDataset(name);
- if (newFeatureDataset != null)
- {
- for (int i = 0; i < featureDataset.FieldCount; i++)
- {
- GeoScene.Data.GSOFieldAttr fielddef = featureDataset.GetField(i);
-
- GSOFieldAttr field = new GSOFieldAttr();
- //field.Name = fielddef.Name;
- field.Name = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- field.Type = fielddef.Type;
- field.Width = fielddef.Width;
- field.Precision = fielddef.Precision;
- bool res = newFeatureDataset.AddField(field);
- }
- newFeatureDataset.Save();
- }
- return newFeatureDataset;
- }
-
- private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
- {
- if ((pipelineTypeCbo.Text != "给水") && (pipelineTypeCbo.Text != "天然气") &&
- (pipelineTypeCbo.Text != "燃气") && (pipelineTypeCbo.Text != "中水"))
- {
- cmbReference.Text = "管底";
- }
- else
- {
- cmbReference.Text = "管顶";
- }
-
- if (pipelineTypeCbo.Text == "给水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 255);
- }
- else if (pipelineTypeCbo.Text == "供电")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 100, 150);
- }
- else if (pipelineTypeCbo.Text == "雨水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(230, 120, 0);
- }
- else if (pipelineTypeCbo.Text == "污水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(128, 64, 0);
- }
- else if (pipelineTypeCbo.Text == "天然气")
- {
- btnPipelineColor.BackColor = Color.FromArgb(215, 0, 64);
- }
- else if (pipelineTypeCbo.Text == "共通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "电通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "有线电视")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "监控")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "交通信号")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "路灯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 0, 150);
- }
- else if (pipelineTypeCbo.Text == "通讯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 0);
- }
- }
-
- private object convertFieldValue(string fieldname, object obj)
- {
- if (obj == null)
- return null;
-
- try
- {
- string type = fields_types[fieldname].ToString();
- switch (type)
- {
- case "string":
- return obj.ToString();
- case "int":
- //return 101;
- int intResult;
- if (int.TryParse(obj.ToString(), out intResult))
- return intResult;
- else
- return null;
- case "double":
- //return 202.5;
- double doubleResult;
- if (double.TryParse(obj.ToString(), out doubleResult))
- return doubleResult;
- else
- return null;
- case "date":
- DateTime dtResult;
- if (DateTime.TryParse(obj.ToString(), out dtResult))
- return dtResult;
- else
- return null;
- }
- return null;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- return null;
- }
- }
-
- ///
- /// 验证shp格式文件
- ///
- ///
- ///
- private string valiPipeData(GSOLayer layer) //验证shp格式文件
- {
- 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 (fields_types.ContainsKey(fieldName))
- {
- string fieldType = fields_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("Deep1"))
- {
- txtMessage += "Deep1字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep1");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep1字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Deep2"))
- {
- txtMessage += "Deep2字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep2");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep2字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Diameter"))
- {
- txtMessage += "Diameter字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Diameter");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Diameter字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Handle"))
- {
- txtMessage += "Handle字段不存在!\r\n";
- }
- List lstHandle = new List();
- 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 (fields_types.ContainsKey(fieldName))
- {
- if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
- {
- txtMessage += "ID为" + f.ID + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
- }
- }
- }
- if (f.GetFieldAsFloat("Diameter") <= 0)
- {
- txtMessage += "ID为" + f.ID + "\"Diameter\"字段中的值必须大于0 \r\n";
- }
- if (!lstHandle.Contains(f.GetFieldAsString("Handle")))
- {
- lstHandle.Add(f.GetFieldAsString("Handle"));
- }
- else
- {
- txtMessage += "ID为" + f.ID + "的\"Handle\"字段中的值重复\r\n";
- }
- }
- }
- return txtMessage;
- }
-
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.resx b/FrmMultiPipelineModelDB.resx
deleted file mode 100644
index 1d40cb6..0000000
--- a/FrmMultiPipelineModelDB.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
-
-
- 156, 16
-
-
- 25
-
-
\ No newline at end of file
diff --git a/MainFrm.cs b/MainFrm.cs
index 30a34a5..8e37fde 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -6324,9 +6324,6 @@
buttonItemSH4.Checked = globeControl1.Globe.StatusBar.Visible;
globeControl1.Globe.Refresh();
}
-
-
-
///
/// 添加指定路径下的数据 功能
///
@@ -6368,7 +6365,6 @@
node.SelectedImageIndex = 0;
node.Checked = terrain.Visible;
// 注意用insert不要用add,因为后加入的图层在上层
- // terrainManagerNode.Nodes.Add(node);
layerManagerNode.Nodes.Insert(0, node);
}
newlayername = terrain.Caption;
@@ -8386,9 +8382,6 @@
}
}
}
-
-
-
///
/// 管线自动缩进 菜单
///
@@ -8399,71 +8392,6 @@
FrmPipelineIndented frm = new FrmPipelineIndented(globeControl1, m_PipelineLayerNames, workwellLayerNames);
frm.ShowDialog(this);
}
-
- private void btnExportCADs_Click(object sender, EventArgs e)
- {
-
- }
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 统计指定图层在指定范围内的所有feature对象
///
@@ -8576,17 +8504,19 @@
try
{
-
string dbIp = Utility.sgdbip;
string database = Utility.sgdbname;
string user = Utility.sgdbuser;
string pass = Utility.sgdbpwd;
- shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "", user, pass);
+ shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "",
+ user, pass);
if (shds == null)
{
MessageBox.Show("数据库连接失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+
+ //Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+ Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -8598,7 +8528,6 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
}
///
@@ -11196,137 +11125,6 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
///
/// 数据质量检查
///
@@ -12463,7 +12261,6 @@
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
//zhanshi = false;
@@ -12646,231 +12443,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
-
private void btn_check_history_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_check_history.Text);
@@ -12973,18 +12545,6 @@
LogManager.saveLog(Utility.userName, this.btn_document_info.Text);
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //FormDocumentManager frm = new FormDocumentManager();
- //frm.ShowDialog();
-
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //new FormDocumentManager().ShowDialog();
if (FormDocumentManager.IS_OPEN)
{
return;
@@ -13121,31 +12681,7 @@
FrmChangePassword frm = new FrmChangePassword();
frm.ShowDialog();
}
- ///
- /// 多孔管线入库
- ///
- ///
- ///
- private void buttonItem9_Click(object sender, EventArgs e)
- {
- //保存日志
- LogManager.saveLog(Utility.userName, this.buttonItemSJGL4_2.Text);
-
- if (ds == null)
- {
- MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- ConnectDB(null, null);
- }
- if (ds == null)
- return;
-
- FrmMultiPipelineModelDB frm = new FrmMultiPipelineModelDB(globeControl1, ds);
- if (frm.ShowDialog() == DialogResult.OK)
- {
- addNodeToLayerManagerNode(frm.rukuLayer);
- }
- //frm.Show();
- }
+
private void 导出CADToolStripMenuItem1_Click(object sender, EventArgs e)
{
TreeNode node = layerNodeContexMenu.Tag as TreeNode;
diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs
index 426beb3..fd0ef22 100644
--- a/MainFrm.designer.cs
+++ b/MainFrm.designer.cs
@@ -241,15 +241,6 @@
this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
- this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
- this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
- this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
- this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
- this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar();
this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem();
@@ -271,7 +262,6 @@
this.buttonItemSJGL4 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_1 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_2 = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_3 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL5 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL6 = new DevComponents.DotNetBar.ButtonItem();
@@ -419,6 +409,15 @@
this.buttonItemBZ9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ10 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ11 = new DevComponents.DotNetBar.ButtonItem();
+ this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
+ this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
+ this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
+ this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel4 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar1 = new DevComponents.DotNetBar.RibbonBar();
this.btn_document_info = new DevComponents.DotNetBar.ButtonItem();
@@ -651,8 +650,8 @@
this.contextMenuStrip3.SuspendLayout();
this.contextMenuStripDeleteLayerNode.SuspendLayout();
this.ribbonControl1.SuspendLayout();
- this.ribbonPanel2.SuspendLayout();
this.ribbonPanel15.SuspendLayout();
+ this.ribbonPanel2.SuspendLayout();
this.ribbonPanel4.SuspendLayout();
this.ribbonPanel6.SuspendLayout();
this.ribbonPanel5.SuspendLayout();
@@ -841,7 +840,7 @@
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21);
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20);
this.toolStripDropDownButton1.Text = "帮助";
this.toolStripDropDownButton1.Visible = false;
//
@@ -2362,137 +2361,6 @@
this.ribbonControl1.Text = "ribbonControl1";
this.ribbonControl1.UseCustomizeDialog = false;
//
- // ribbonPanel2
- //
- this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonPanel2.Controls.Add(this.ribbonBar3);
- this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
- this.ribbonPanel2.Name = "ribbonPanel2";
- this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
- this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
- //
- //
- //
- this.ribbonPanel2.Style.Class = "";
- this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseDown.Class = "";
- this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseOver.Class = "";
- this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonPanel2.TabIndex = 39;
- this.ribbonPanel2.Visible = false;
- //
- // ribbonBar3
- //
- this.ribbonBar3.AutoOverflowEnabled = true;
- //
- //
- //
- this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
- this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.BackgroundStyle.Class = "";
- this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.ContainerControlProcessDialogKey = true;
- this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
- this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
- this.btn_user_info,
- this.btn_role_info,
- this.btn_resc_info,
- this.btn_role_resc,
- this.btn_user_role,
- this.btn_password_edit,
- this.buttonItemPasswordReset});
- this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
- this.ribbonBar3.Name = "ribbonBar3";
- this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
- this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonBar3.TabIndex = 1;
- //
- //
- //
- this.ribbonBar3.TitleStyle.Class = "";
- this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.TitleStyleMouseOver.Class = "";
- this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.TitleVisible = false;
- //
- // btn_user_info
- //
- this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
- this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_info.Name = "btn_user_info";
- this.btn_user_info.SubItemsExpandWidth = 14;
- this.btn_user_info.Text = "用户管理";
- this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
- //
- // btn_role_info
- //
- this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
- this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_info.Name = "btn_role_info";
- this.btn_role_info.SubItemsExpandWidth = 14;
- this.btn_role_info.Text = "角色管理";
- this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
- //
- // btn_resc_info
- //
- this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
- this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_resc_info.Name = "btn_resc_info";
- this.btn_resc_info.SubItemsExpandWidth = 14;
- this.btn_resc_info.Text = "资源管理";
- this.btn_resc_info.Visible = false;
- this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
- //
- // btn_role_resc
- //
- this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
- this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_resc.Name = "btn_role_resc";
- this.btn_role_resc.SubItemsExpandWidth = 14;
- this.btn_role_resc.Text = "角色授权";
- this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
- //
- // btn_user_role
- //
- this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
- this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_role.Name = "btn_user_role";
- this.btn_user_role.SubItemsExpandWidth = 14;
- this.btn_user_role.Text = "用户授权";
- this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
- //
- // btn_password_edit
- //
- this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
- this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_password_edit.Name = "btn_password_edit";
- this.btn_password_edit.SubItemsExpandWidth = 14;
- this.btn_password_edit.Text = "密码修改";
- this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
- //
- // buttonItemPasswordReset
- //
- this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
- this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
- this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
- this.buttonItemPasswordReset.Text = "重置密码";
- this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
- //
// ribbonPanel15
//
this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -2549,7 +2417,7 @@
this.buttonItemBZ});
this.ribbonBar20.Location = new System.Drawing.Point(3, 0);
this.ribbonBar20.Name = "ribbonBar20";
- this.ribbonBar20.Size = new System.Drawing.Size(814, 59);
+ this.ribbonBar20.Size = new System.Drawing.Size(785, 59);
this.ribbonBar20.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.ribbonBar20.TabIndex = 0;
//
@@ -2711,7 +2579,6 @@
this.buttonItemSJGL4.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.buttonItemSJGL4_1,
this.buttonItemSJGL4_2,
- this.buttonItem9,
this.buttonItemSJGL4_3});
this.buttonItemSJGL4.Text = "数据批量入库";
//
@@ -2727,12 +2594,6 @@
this.buttonItemSJGL4_2.Text = "线矢量入库";
this.buttonItemSJGL4_2.Click += new System.EventHandler(this.buttonItemSJGL4_2_Click);
//
- // buttonItem9
- //
- this.buttonItem9.Name = "buttonItem9";
- this.buttonItem9.Text = "多孔入库";
- this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click);
- //
// buttonItemSJGL4_3
//
this.buttonItemSJGL4_3.Name = "buttonItemSJGL4_3";
@@ -3869,6 +3730,137 @@
this.buttonItemBZ11.Text = "标注管理";
this.buttonItemBZ11.Click += new System.EventHandler(this.buttonItemBZ11_Click);
//
+ // ribbonPanel2
+ //
+ this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonPanel2.Controls.Add(this.ribbonBar3);
+ this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
+ this.ribbonPanel2.Name = "ribbonPanel2";
+ this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
+ this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
+ //
+ //
+ //
+ this.ribbonPanel2.Style.Class = "";
+ this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseDown.Class = "";
+ this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseOver.Class = "";
+ this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonPanel2.TabIndex = 39;
+ this.ribbonPanel2.Visible = false;
+ //
+ // ribbonBar3
+ //
+ this.ribbonBar3.AutoOverflowEnabled = true;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
+ this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundStyle.Class = "";
+ this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.ContainerControlProcessDialogKey = true;
+ this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
+ this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
+ this.btn_user_info,
+ this.btn_role_info,
+ this.btn_resc_info,
+ this.btn_role_resc,
+ this.btn_user_role,
+ this.btn_password_edit,
+ this.buttonItemPasswordReset});
+ this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
+ this.ribbonBar3.Name = "ribbonBar3";
+ this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
+ this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonBar3.TabIndex = 1;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyle.Class = "";
+ this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyleMouseOver.Class = "";
+ this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.TitleVisible = false;
+ //
+ // btn_user_info
+ //
+ this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
+ this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_info.Name = "btn_user_info";
+ this.btn_user_info.SubItemsExpandWidth = 14;
+ this.btn_user_info.Text = "用户管理";
+ this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
+ //
+ // btn_role_info
+ //
+ this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
+ this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_info.Name = "btn_role_info";
+ this.btn_role_info.SubItemsExpandWidth = 14;
+ this.btn_role_info.Text = "角色管理";
+ this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
+ //
+ // btn_resc_info
+ //
+ this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
+ this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_resc_info.Name = "btn_resc_info";
+ this.btn_resc_info.SubItemsExpandWidth = 14;
+ this.btn_resc_info.Text = "资源管理";
+ this.btn_resc_info.Visible = false;
+ this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
+ //
+ // btn_role_resc
+ //
+ this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
+ this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_resc.Name = "btn_role_resc";
+ this.btn_role_resc.SubItemsExpandWidth = 14;
+ this.btn_role_resc.Text = "角色授权";
+ this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
+ //
+ // btn_user_role
+ //
+ this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
+ this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_role.Name = "btn_user_role";
+ this.btn_user_role.SubItemsExpandWidth = 14;
+ this.btn_user_role.Text = "用户授权";
+ this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
+ //
+ // btn_password_edit
+ //
+ this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
+ this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_password_edit.Name = "btn_password_edit";
+ this.btn_password_edit.SubItemsExpandWidth = 14;
+ this.btn_password_edit.Text = "密码修改";
+ this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
+ //
+ // buttonItemPasswordReset
+ //
+ this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
+ this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
+ this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
+ this.buttonItemPasswordReset.Text = "重置密码";
+ this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
+ //
// ribbonPanel4
//
this.ribbonPanel4.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -5522,7 +5514,7 @@
this.dataGridViewX2.ReadOnly = true;
this.dataGridViewX2.RowHeadersVisible = false;
this.dataGridViewX2.RowTemplate.Height = 23;
- this.dataGridViewX2.Size = new System.Drawing.Size(20389, 92);
+ this.dataGridViewX2.Size = new System.Drawing.Size(20983, 92);
this.dataGridViewX2.TabIndex = 11;
//
// dataGridViewTextBoxColumn10
@@ -5616,7 +5608,7 @@
this.dataGridViewX3.ReadOnly = true;
this.dataGridViewX3.RowHeadersVisible = false;
this.dataGridViewX3.RowTemplate.Height = 23;
- this.dataGridViewX3.Size = new System.Drawing.Size(20388, 127);
+ this.dataGridViewX3.Size = new System.Drawing.Size(20982, 127);
this.dataGridViewX3.TabIndex = 5;
this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick);
//
@@ -5874,7 +5866,7 @@
this.dataGridViewX8.ReadOnly = true;
this.dataGridViewX8.RowHeadersVisible = false;
this.dataGridViewX8.RowTemplate.Height = 23;
- this.dataGridViewX8.Size = new System.Drawing.Size(125, 92);
+ this.dataGridViewX8.Size = new System.Drawing.Size(91, 92);
this.dataGridViewX8.TabIndex = 11;
//
// dataGridViewTextBoxColumn12
@@ -5969,7 +5961,7 @@
this.dataGridViewX9.ReadOnly = true;
this.dataGridViewX9.RowHeadersVisible = false;
this.dataGridViewX9.RowTemplate.Height = 23;
- this.dataGridViewX9.Size = new System.Drawing.Size(124, 127);
+ this.dataGridViewX9.Size = new System.Drawing.Size(90, 127);
this.dataGridViewX9.TabIndex = 5;
this.dataGridViewX9.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX9_MouseDoubleClick);
//
@@ -6834,8 +6826,8 @@
this.contextMenuStripDeleteLayerNode.ResumeLayout(false);
this.ribbonControl1.ResumeLayout(false);
this.ribbonControl1.PerformLayout();
- this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel15.ResumeLayout(false);
+ this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel4.ResumeLayout(false);
this.ribbonPanel6.ResumeLayout(false);
this.ribbonPanel5.ResumeLayout(false);
@@ -7328,7 +7320,6 @@
private System.Windows.Forms.ToolStripMenuItem 定位ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem LayerFlyMenuItem;
private DevComponents.DotNetBar.ButtonItem btn_password_edit;
- private DevComponents.DotNetBar.ButtonItem buttonItem9;
private System.Windows.Forms.ToolStripMenuItem 导出CADToolStripMenuItem1;
private DevComponents.DotNetBar.ButtonItem buttonItemGBJC;
private System.Windows.Forms.ContextMenuStrip RightScreenToolMenu;
diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe
index 924ae08..e7980a2 100644
--- a/bin/x86/Debug/Cyberpipe.exe
+++ b/bin/x86/Debug/Cyberpipe.exe
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.pdb b/bin/x86/Debug/Cyberpipe.pdb
index a87794a..4935fa1 100644
--- a/bin/x86/Debug/Cyberpipe.pdb
+++ b/bin/x86/Debug/Cyberpipe.pdb
Binary files differ
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/FrmMultiPipelineModelDB.Designer.cs b/FrmMultiPipelineModelDB.Designer.cs
deleted file mode 100644
index 8aa77b0..0000000
--- a/FrmMultiPipelineModelDB.Designer.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-namespace Cyberpipe
-{
- partial class FrmMultiPipelineModelDB
- {
- ///
- /// 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.label7 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBoxCornerSliceAngle = new System.Windows.Forms.TextBox();
- this.numericUpDownLineOpaque = new System.Windows.Forms.NumericUpDown();
- this.txtSlice = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.cmbRadius = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.cmbTo = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbFrom = new System.Windows.Forms.ComboBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.btnClose = new System.Windows.Forms.Button();
- this.btnCreateModel = new System.Windows.Forms.Button();
- this.textBoxNewLayerName = new System.Windows.Forms.TextBox();
- this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxShpLayerList = new System.Windows.Forms.ComboBox();
- this.colorDialog1 = new System.Windows.Forms.ColorDialog();
- this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.cmbID = new System.Windows.Forms.ComboBox();
- this.label11 = new System.Windows.Forms.Label();
- this.chkDeep = new System.Windows.Forms.CheckBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.cmbReference = new System.Windows.Forms.ComboBox();
- this.cmbWidthNum = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.cmbHeightNum = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.numOpaqueRect = new System.Windows.Forms.NumericUpDown();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.btnRectColor = new System.Windows.Forms.Button();
- this.pipelineTypeCbo = new DevComponents.DotNetBar.Controls.ComboBoxEx();
- this.label17 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).BeginInit();
- this.SuspendLayout();
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Location = new System.Drawing.Point(360, 395);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(17, 12);
- this.label7.TabIndex = 71;
- this.label7.Text = "度";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.BackColor = System.Drawing.Color.Transparent;
- this.label9.Location = new System.Drawing.Point(21, 393);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(77, 12);
- this.label9.TabIndex = 70;
- this.label9.Text = "拐弯平滑度:";
- //
- // textBoxCornerSliceAngle
- //
- this.textBoxCornerSliceAngle.Location = new System.Drawing.Point(131, 390);
- this.textBoxCornerSliceAngle.Name = "textBoxCornerSliceAngle";
- this.textBoxCornerSliceAngle.Size = new System.Drawing.Size(225, 21);
- this.textBoxCornerSliceAngle.TabIndex = 69;
- this.textBoxCornerSliceAngle.Text = "10";
- //
- // numericUpDownLineOpaque
- //
- this.numericUpDownLineOpaque.Location = new System.Drawing.Point(131, 334);
- this.numericUpDownLineOpaque.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numericUpDownLineOpaque.Name = "numericUpDownLineOpaque";
- this.numericUpDownLineOpaque.Size = new System.Drawing.Size(225, 21);
- this.numericUpDownLineOpaque.TabIndex = 68;
- this.numericUpDownLineOpaque.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- //
- // txtSlice
- //
- this.txtSlice.Location = new System.Drawing.Point(131, 362);
- this.txtSlice.Name = "txtSlice";
- this.txtSlice.Size = new System.Drawing.Size(224, 21);
- this.txtSlice.TabIndex = 67;
- this.txtSlice.Text = "24";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(20, 365);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(77, 12);
- this.label8.TabIndex = 65;
- this.label8.Text = "截面分段数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.BackColor = System.Drawing.Color.Transparent;
- this.label10.Location = new System.Drawing.Point(21, 336);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(53, 12);
- this.label10.TabIndex = 66;
- this.label10.Text = "透明度:";
- //
- // cmbRadius
- //
- this.cmbRadius.FormattingEnabled = true;
- this.cmbRadius.Location = new System.Drawing.Point(130, 196);
- this.cmbRadius.Name = "cmbRadius";
- this.cmbRadius.Size = new System.Drawing.Size(226, 20);
- this.cmbRadius.TabIndex = 64;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(20, 309);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 62;
- this.label6.Text = "管道颜色:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(20, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 63;
- this.label5.Text = "管径字段:";
- //
- // cmbTo
- //
- this.cmbTo.FormattingEnabled = true;
- this.cmbTo.Location = new System.Drawing.Point(130, 125);
- this.cmbTo.Name = "cmbTo";
- this.cmbTo.Size = new System.Drawing.Size(226, 20);
- this.cmbTo.TabIndex = 61;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(24, 132);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 60;
- this.label4.Text = "终点埋深:";
- //
- // cmbFrom
- //
- this.cmbFrom.FormattingEnabled = true;
- this.cmbFrom.Location = new System.Drawing.Point(129, 97);
- this.cmbFrom.Name = "cmbFrom";
- this.cmbFrom.Size = new System.Drawing.Size(226, 20);
- this.cmbFrom.TabIndex = 59;
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(14, 479);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(380, 2);
- this.groupBox1.TabIndex = 58;
- this.groupBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 103);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 12);
- this.label3.TabIndex = 55;
- this.label3.Text = "起点埋深:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(20, 72);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(89, 12);
- this.label2.TabIndex = 56;
- this.label2.Text = "管线图层名称:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(20, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(95, 12);
- this.label1.TabIndex = 57;
- this.label1.Text = "Shapefile图层:";
- //
- // btnClose
- //
- this.btnClose.Location = new System.Drawing.Point(282, 490);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 53;
- this.btnClose.Text = "关闭(&C)";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // btnCreateModel
- //
- this.btnCreateModel.Location = new System.Drawing.Point(199, 490);
- this.btnCreateModel.Name = "btnCreateModel";
- this.btnCreateModel.Size = new System.Drawing.Size(74, 23);
- this.btnCreateModel.TabIndex = 54;
- this.btnCreateModel.Text = "建模(&M)";
- this.btnCreateModel.UseVisualStyleBackColor = true;
- this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
- //
- // textBoxNewLayerName
- //
- this.textBoxNewLayerName.Location = new System.Drawing.Point(129, 67);
- this.textBoxNewLayerName.Name = "textBoxNewLayerName";
- this.textBoxNewLayerName.Size = new System.Drawing.Size(226, 21);
- this.textBoxNewLayerName.TabIndex = 51;
- //
- // btnPipelineColor
- //
- this.btnPipelineColor.BackColor = System.Drawing.Color.Gainsboro;
- this.btnPipelineColor.Location = new System.Drawing.Point(130, 304);
- this.btnPipelineColor.Name = "btnPipelineColor";
- this.btnPipelineColor.Size = new System.Drawing.Size(226, 23);
- this.btnPipelineColor.TabIndex = 48;
- this.btnPipelineColor.UseVisualStyleBackColor = false;
- this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
- //
- // comboBoxShpLayerList
- //
- this.comboBoxShpLayerList.FormattingEnabled = true;
- this.comboBoxShpLayerList.Location = new System.Drawing.Point(129, 11);
- this.comboBoxShpLayerList.Name = "comboBoxShpLayerList";
- this.comboBoxShpLayerList.Size = new System.Drawing.Size(226, 20);
- this.comboBoxShpLayerList.TabIndex = 72;
- this.comboBoxShpLayerList.SelectedIndexChanged += new System.EventHandler(this.cmbLayer_SelectedIndexChanged);
- //
- // cmbID
- //
- this.cmbID.FormattingEnabled = true;
- this.cmbID.Location = new System.Drawing.Point(130, 223);
- this.cmbID.Name = "cmbID";
- this.cmbID.Size = new System.Drawing.Size(226, 20);
- this.cmbID.TabIndex = 74;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(22, 227);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 73;
- this.label11.Text = "ID字段:";
- //
- // chkDeep
- //
- this.chkDeep.AutoSize = true;
- this.chkDeep.Location = new System.Drawing.Point(130, 150);
- this.chkDeep.Name = "chkDeep";
- this.chkDeep.Size = new System.Drawing.Size(144, 16);
- this.chkDeep.TabIndex = 75;
- this.chkDeep.Text = "埋深是否转换为相反数";
- this.chkDeep.UseVisualStyleBackColor = true;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(359, 200);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(29, 12);
- this.label12.TabIndex = 76;
- this.label12.Text = "毫米";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(20, 172);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(77, 12);
- this.label13.TabIndex = 63;
- this.label13.Text = "埋深参考点:";
- //
- // cmbReference
- //
- this.cmbReference.FormattingEnabled = true;
- this.cmbReference.Items.AddRange(new object[] {
- "管底",
- "管顶"});
- this.cmbReference.Location = new System.Drawing.Point(130, 168);
- this.cmbReference.Name = "cmbReference";
- this.cmbReference.Size = new System.Drawing.Size(226, 20);
- this.cmbReference.TabIndex = 64;
- //
- // cmbWidthNum
- //
- this.cmbWidthNum.FormattingEnabled = true;
- this.cmbWidthNum.Location = new System.Drawing.Point(131, 250);
- this.cmbWidthNum.Name = "cmbWidthNum";
- this.cmbWidthNum.Size = new System.Drawing.Size(226, 20);
- this.cmbWidthNum.TabIndex = 78;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(22, 254);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 77;
- this.label14.Text = "横向个数字段:";
- //
- // cmbHeightNum
- //
- this.cmbHeightNum.FormattingEnabled = true;
- this.cmbHeightNum.Location = new System.Drawing.Point(131, 277);
- this.cmbHeightNum.Name = "cmbHeightNum";
- this.cmbHeightNum.Size = new System.Drawing.Size(226, 20);
- this.cmbHeightNum.TabIndex = 80;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(22, 280);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(89, 12);
- this.label15.TabIndex = 79;
- this.label15.Text = "纵向个数字段:";
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(430, 246);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 81;
- this.label16.Text = "间距字段:";
- //
- // numOpaqueRect
- //
- this.numOpaqueRect.Location = new System.Drawing.Point(132, 451);
- this.numOpaqueRect.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numOpaqueRect.Name = "numOpaqueRect";
- this.numOpaqueRect.Size = new System.Drawing.Size(225, 21);
- this.numOpaqueRect.TabIndex = 88;
- this.numOpaqueRect.Value = new decimal(new int[] {
- 125,
- 0,
- 0,
- 0});
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Location = new System.Drawing.Point(24, 455);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(53, 12);
- this.label21.TabIndex = 87;
- this.label21.Text = "透明度:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(22, 424);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(65, 12);
- this.label22.TabIndex = 84;
- this.label22.Text = "管沟颜色:";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(430, 291);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(77, 12);
- this.label23.TabIndex = 85;
- this.label23.Text = "管沟宽字段:";
- //
- // btnRectColor
- //
- this.btnRectColor.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.btnRectColor.Location = new System.Drawing.Point(131, 419);
- this.btnRectColor.Name = "btnRectColor";
- this.btnRectColor.Size = new System.Drawing.Size(226, 23);
- this.btnRectColor.TabIndex = 83;
- this.btnRectColor.UseVisualStyleBackColor = false;
- //
- // pipelineTypeCbo
- //
- this.pipelineTypeCbo.DisplayMember = "Text";
- this.pipelineTypeCbo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.pipelineTypeCbo.FormattingEnabled = true;
- this.pipelineTypeCbo.ItemHeight = 15;
- this.pipelineTypeCbo.Location = new System.Drawing.Point(129, 40);
- this.pipelineTypeCbo.Name = "pipelineTypeCbo";
- this.pipelineTypeCbo.Size = new System.Drawing.Size(226, 21);
- this.pipelineTypeCbo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.pipelineTypeCbo.TabIndex = 126;
- this.pipelineTypeCbo.SelectedIndexChanged += new System.EventHandler(this.pipelineTypeCbo_SelectedIndexChanged);
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(20, 46);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(89, 12);
- this.label17.TabIndex = 125;
- this.label17.Text = "管线图层类型:";
- //
- // FrmMultiPipelineModelDB
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(406, 522);
- this.Controls.Add(this.pipelineTypeCbo);
- this.Controls.Add(this.label17);
- this.Controls.Add(this.numOpaqueRect);
- this.Controls.Add(this.label21);
- this.Controls.Add(this.label22);
- this.Controls.Add(this.label23);
- this.Controls.Add(this.btnRectColor);
- this.Controls.Add(this.label16);
- this.Controls.Add(this.cmbHeightNum);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.cmbWidthNum);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.chkDeep);
- this.Controls.Add(this.cmbID);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.comboBoxShpLayerList);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.textBoxCornerSliceAngle);
- this.Controls.Add(this.numericUpDownLineOpaque);
- this.Controls.Add(this.txtSlice);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.cmbReference);
- this.Controls.Add(this.cmbRadius);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.cmbTo);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.cmbFrom);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.btnCreateModel);
- this.Controls.Add(this.textBoxNewLayerName);
- this.Controls.Add(this.btnPipelineColor);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.Name = "FrmMultiPipelineModelDB";
- this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "管孔方沟入库";
- this.Load += new System.EventHandler(this.FrmMultiPipelineModelDB_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBoxCornerSliceAngle;
- private System.Windows.Forms.NumericUpDown numericUpDownLineOpaque;
- private System.Windows.Forms.TextBox txtSlice;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ComboBox cmbRadius;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.ComboBox cmbTo;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.ComboBox cmbFrom;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.Button btnCreateModel;
- private System.Windows.Forms.TextBox textBoxNewLayerName;
- private System.Windows.Forms.Button btnPipelineColor;
- private System.Windows.Forms.ComboBox comboBoxShpLayerList;
- private System.Windows.Forms.ColorDialog colorDialog1;
- private System.Windows.Forms.SaveFileDialog saveFileDialog1;
- private System.Windows.Forms.ComboBox cmbID;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.CheckBox chkDeep;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.ComboBox cmbReference;
- private System.Windows.Forms.ComboBox cmbWidthNum;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.ComboBox cmbHeightNum;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.NumericUpDown numOpaqueRect;
- private System.Windows.Forms.Label label21;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.Button btnRectColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx pipelineTypeCbo;
- private System.Windows.Forms.Label label17;
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.cs b/FrmMultiPipelineModelDB.cs
deleted file mode 100644
index 0a0516a..0000000
--- a/FrmMultiPipelineModelDB.cs
+++ /dev/null
@@ -1,814 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using DevComponents.DotNetBar;
-using GeoScene.Globe;
-using GeoScene.Engine;
-using GeoScene.Data;
-using System.IO;
-using System.Collections;
-using System.Xml;
-
-namespace Cyberpipe
-{
- public partial class FrmMultiPipelineModelDB : Office2007Form
- {
- private GeoScene.Globe.GSOGlobeControl globeControl1;
- GSODataSource ds = null;
- public GSOLayer rukuLayer = null;
- private Hashtable en_cns = new Hashtable();
- private Hashtable fields_types = new Hashtable();
-
- public FrmMultiPipelineModelDB(GSOGlobeControl _globeControl,GSODataSource _ds)
- {
- globeControl1 = _globeControl;
- ds = _ds;
- InitializeComponent();
-
- cmbReference.Text = "管顶";
- chkDeep.Checked = true;
- }
-
- private void FrmMultiPipelineModelDB_Load(object sender, EventArgs e)
- {
- string pipelinetype = Utility.pipelinetype;
- string[] pipelinetypes = pipelinetype.Split(',');
- for (int i = 0; i < pipelinetypes.Length; i++)
- {
- pipelineTypeCbo.Items.Add(pipelinetypes[i]);
- }
-
- comboBoxShpLayerList.Items.Clear();
-
- for (int i = 0; i < globeControl1.Globe.Layers.Count; i++)
- {
- GSOLayer layer = globeControl1.Globe.Layers[i];
- if (layer != null && layer.Name.ToLower().EndsWith(".shp"))
- {
- comboBoxShpLayerList.Items.Add(layer.Caption);
- }
- }
-
- string filename = Application.StartupPath + "\\FormText.xml";
- if (File.Exists(filename))
- {
- XmlTextReader XmlReader = new XmlTextReader(filename);
- try
- {
- while (XmlReader.Read())
- {
- if (XmlReader.Name == "Field")
- {
- string str1 = XmlReader["label"];
- string str3 = XmlReader["type"];
- string str2 = XmlReader.ReadElementString();
- en_cns.Add(str1, str2);
- fields_types.Add(str1, str3);
- }
- }
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- }
-
- private void cmbLayer_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- return;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- return;
- }
- string txtMessage = valiPipeData(layer);
- if (txtMessage != "")
- {
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(comboBoxShpLayerList.SelectedItem.ToString().Trim(), txtMessage);
- showErrorMessage.ShowDialog();
- return;
- }
- else
- {
- textBoxNewLayerName.Text = layer.Caption;
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- return;
-
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- for (int i = 0; i < features[0].GetFieldCount(); i++)
- {
- cmbFrom.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbTo.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbRadius.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbID.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbWidthNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbHeightNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- }
- cmbFrom.SelectedItem = "Deep1";
- cmbTo.SelectedItem = "Deep2";
- cmbRadius.SelectedItem = "Diameter";
- cmbWidthNum.SelectedItem = "Hor_Num";// "Weight";
- cmbHeightNum.SelectedItem = "Ver_Num";// "Height";
- cmbID.SelectedItem = "Handle";
- }
-
- }
-
- private void btnPipelineColor_Click(object sender, EventArgs e)
- {
- colorDialog1.Color = btnPipelineColor.BackColor;
-
- if (colorDialog1.ShowDialog() == DialogResult.OK)
- {
- btnPipelineColor.BackColor = colorDialog1.Color;
- }
- }
-
- private void btnCreateModel_Click(object sender, EventArgs e)
- {
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return;
- }
- if (string.IsNullOrEmpty(textBoxNewLayerName.Text))
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return;
- }
- if (ds.GetDatasetByName(textBoxNewLayerName.Text) != null)
- {
- MessageBox.Show("图层名称已存在!", "提示");
- return;
- }
- try
- {
- GSOLayer ShpSourceLayer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- GSOFeatureDataset pipeline = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim());
- if (pipeline == null)
- {
- MessageBox.Show("输入的图层名称不符合要求!", "提示");
- return;
- }
- pipeline.Open();
- GSOFeatureDataset pipelineRect = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim() + "_Rect");
- if (pipelineRect == null)
- {
- return;
- }
- pipelineRect.Open();
-
- GSOFeatures features = ShpSourceLayer.GetAllFeatures();
- string message = "";
- for (int j = 0; j < features.Length; j++)
- {
- GSOFeature f = features[j];
-
- GSOFeature newFeature = pipeline.CreateFeature();
-
- GSOPipeLineStyle3D style = new GSOPipeLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numericUpDownLineOpaque.Value), btnPipelineColor.BackColor);
-
- double radius = 0;
- if (cmbRadius.SelectedItem == null)
- {
- cmbRadius.SelectedIndex = 0;
- }
- GSOFieldDefn diameterfield = (GSOFieldDefn)f.GetFieldDefn(cmbRadius.SelectedItem.ToString());
- string fieldText = f.GetFieldAsString(cmbRadius.SelectedItem.ToString());
- if (diameterfield.Type == EnumFieldType.Text)
- {
- if (double.TryParse(fieldText, out radius))
- {
- radius = radius / 2000;
- }
- else
- {
- message += "ID为" + f.ID + "的对象的管径字段值不符合要求!\r\n";
- continue;
- }
- }
- else
- {
- radius = f.GetFieldAsDouble(cmbRadius.SelectedItem.ToString()) / 2000; // 探测数据的单位一般是毫米,需换算为米; 管径一般是 直径, 这个需要半径, 所有除以2000
- }
-
- if (cmbID.SelectedItem == null)
- {
- cmbID.SelectedIndex = 0;
- }
- if (cmbWidthNum.SelectedItem == null)
- {
- cmbWidthNum.SelectedIndex = 0;
- }
- if (cmbHeightNum.SelectedItem == null)
- {
- cmbHeightNum.SelectedIndex = 0;
- }
- string eventid = f.GetFieldAsString(cmbID.SelectedItem.ToString());
- double interval = radius * 2;
- int num_width = 0;
- int num_height = 0;
- if (!int.TryParse(f.GetFieldAsString(cmbWidthNum.SelectedItem.ToString()), out num_width))
- {
- message += "ID为" + f.ID + "的对象的宽度字段值不符合要求!\r\n";
- continue;
- }
- if (!int.TryParse(f.GetFieldAsString(cmbHeightNum.SelectedItem.ToString()), out num_height))
- {
- message += "ID为" + f.ID + "的对象的高度字段值不符合要求!\r\n";
- continue;
- }
-
- double rectWidth = Math.Round( radius * 2.0 * num_width + 0.08,5);// 两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- if (radius == 0)
- {
- message += "ID为" + f.ID + "的对象的管径字段值为0!\r\n";
- continue;
- }
-
- int intSlice = 0;
- double cornerSliceAngle = 0;
- if (!int.TryParse(txtSlice.Text.Trim(), out intSlice))
- {
- message += "ID为" + f.ID + "的对象的截面分段数字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(textBoxCornerSliceAngle.Text.Trim(), out cornerSliceAngle))
- {
- message += "ID为" + f.ID + "的对象的拐弯平滑度字段值不符合要求!\r\n";
- continue;
- }
- style.Radius = radius;
- style.Slice = intSlice;
- style.CornerSliceAngle = cornerSliceAngle;
-
- f.Geometry.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- GSOGeoPolyline3D line = f.Geometry as GSOGeoPolyline3D;
- if (line == null)
- {
- message += "ID为" + f.ID + "的对象不是一个线对象!\r\n";
- continue;
- }
-
- if (cmbFrom.SelectedItem == null)
- {
- cmbFrom.SelectedIndex = 0;
- }
- if (cmbTo.SelectedItem == null)
- {
- cmbTo.SelectedIndex = 0;
- }
- double deep1 = 0;
- double deep2 = 0;
- if (!double.TryParse(f.GetFieldAsString(cmbFrom.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep1))
- {
- message += "ID为" + f.ID + "的对象的起点埋深字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(f.GetFieldAsString(cmbTo.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep2))
- {
- message += "ID为" + f.ID + "的对象的终点埋深字段值不符合要求!\r\n";
- continue;
- }
-
- if (chkDeep.Checked)
- {
- deep1 = 0 - deep1;
- deep2 = 0 - deep2;
- }
-
- if (cmbReference.SelectedIndex == 0) //管底
- {
- deep1 = deep1 + radius * 2;
- deep2 = deep2 + radius * 2;
- }
- else if (cmbReference.SelectedIndex == 1) //管顶
- {
- deep1 = deep1 - radius * 2;
- deep2 = deep2 - radius * 2;
- }
- GSOPoint3ds ps = line[0];
- for (int n = 0; n < ps.Count; n++)
- {
- GSOPoint3d pt3d = ps[n];
- int pointcount = ps.Count;
- double radio = Math.Sqrt(Math.Pow(pt3d.Y - ps[0].Y, 2) + Math.Pow(pt3d.X - ps[0].X, 2)) / Math.Sqrt(Math.Pow(ps[pointcount - 1].Y - ps[0].Y, 2) + Math.Pow(ps[pointcount - 1].X - ps[0].X, 2));
- pt3d.Z = deep1 + (deep2 - deep1) * radio;
-
- if (double.IsInfinity(pt3d.Z))
- {
- pt3d.Z = deep2;
- }
- ps[n] = pt3d;
- }
- line[0] = ps;
- if (num_height == 0 || num_width == 0) // 直埋
- {
- newFeature.Geometry = line;
- newFeature.Geometry.Style = style;
- //newFeature.Name = eventid;
- newFeature.Name = en_cns.ContainsKey(eventid) == true ? en_cns[eventid].ToString() : eventid;
- SetFields(f, newFeature);
-
- pipeline.AddFeature(newFeature);
- }
- else
- {
- GSOFeature rectfeat = pipelineRect.CreateFeature();
- rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
- if (rectfeat != null)
- {
- SetFields(f, rectfeat);
- pipelineRect.AddFeature(rectfeat);
- }
- one2Multi(line, num_width, num_height, interval, style, pipeline, eventid, f);
- }
- }
-
- pipeline.Save();
- pipelineRect.Save();
- string strMessage = "shp文件中共" + features.Length + "个对象,实际入库" + pipeline.GetAllFeatures().Length + "个对象!\r\n";
- pipeline.Close();
- pipelineRect.Close();
- globeControl1.Refresh();
-
- GSOLayer layerRuku = globeControl1.Globe.Layers.Add(textBoxNewLayerName.Text);
- rukuLayer = layerRuku;
-
- if (message == "")
- {
- MessageBox.Show(strMessage, "提示");
- }
- else
- {
- //FrmMessageShow frm = new FrmMessageShow(strMessage + message);
- //frm.ShowDialog();
- MessageBox.Show(strMessage + message, "提示");
- }
-
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- catch (Exception ex)
- {
- //Log.PublishTxt(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- private void SetFields(GSOFeature oldfeat, GSOFeature newFeature)
- {
- for (int i = 0; i < oldfeat.GetFieldCount(); i++)
- {
- GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(oldfeat.GetFieldDefn(i));
-
- object fieldvalue = oldfeat.GetValue(fielddef.Name);
- if (fieldvalue == null)
- continue;
- string fieldName = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- newFeature.SetValue(fieldName, fieldvalue);
- }
- }
-
- private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
- {
- GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;
- GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
- if (style == null)
- {
- return null;
- }
- cloneline.Style = style;
- return cloneline;
- }
-
- private GSOExtendSectionLineStyle3D createRectStyle(double width, double height)
- {
- GSOExtendSectionLineStyle3D style = new GSOExtendSectionLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numOpaqueRect.Value), btnRectColor.BackColor);
- if (width == 0 || height == 0)
- {
- return null;
- }
- GSOPoint3ds sectionpts = new GSOPoint3ds();
- sectionpts.Add(new GSOPoint3d(width / -2, height / 2, 0));
- sectionpts.Add(new GSOPoint3d(width / -2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / 2, 0));
-
- style.SetSectionPoints(sectionpts);
- style.IsClosed = true;
- style.SetAnchorByAlign(EnumAlign.MiddleCenter);
-
- return style;
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOFeatureDataset layer,string name,GSOFeature oldfeat)
- {
- line = LatLon2Coord_Line(line);
-
- double width_all = interval * (num_width-1);
- double height_all = interval * (num_height-1);
-
- GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3d p1 = line[0][0];
- GSOPoint3d p2 = line[0][1];
- double daltaX = p2.X-p1.X;
- double daltaY = p2.Y-p1.Y;
- double agree = Math.Atan(daltaY/daltaX);
- GSOPoint2d point = new GSOPoint2d((-0.5*width_all-interval)*Math.Sin(agree),(0.5*width_all+interval)*Math.Cos(agree));
- line.MoveXY(point.X,point.Y);
- line.MoveZ(height_all / -2);
-
- for (int i = 0; i < num_width; i++)
- {
- for (int j = 0; j < num_height; j++)
- {
- GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;
- point = new GSOPoint2d((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));
- templine.MoveXY(point.X,point.Y);
- templine.MoveZ(interval*j);
- templine = Coord2LatLon_Line(templine);
- GSOFeature feat = layer.CreateFeature();
- feat.Geometry = templine;
- feat.Geometry.Style = style;
- feat.Name = name;
- SetFields(oldfeat, feat);
- layer.AddFeature(feat);
- }
- }
- }
-
- private GSOGeoPolyline3D LatLon2Coord_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = LatLon2Coord(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOGeoPolyline3D Coord2LatLon_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = Coord2LatLon(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOPoint2d LatLon2Coord(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, id);
- return result;
- }
-
- private GSOPoint2d Coord2LatLon(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, id);
- return result;
- //+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs
- }
-
- private GSOFeatureDataset CreateDBFeatureDataset(string name)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return null;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- MessageBox.Show("Shp图层为空!", "提示");
- return null;
- }
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- {
- MessageBox.Show("图层要素个数为0!", "提示");
- return null;
- }
- GSOFeatureDataset featureDataset = layer.Dataset as GSOFeatureDataset;
- if (featureDataset == null)
- {
- MessageBox.Show("Shp图层不是矢量图层!", "提示");
- return null;
- }
-
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return null ;
- }
- GSOFeatureDataset newFeatureDataset = ds.CreateFeatureDataset(name);
- if (newFeatureDataset != null)
- {
- for (int i = 0; i < featureDataset.FieldCount; i++)
- {
- GeoScene.Data.GSOFieldAttr fielddef = featureDataset.GetField(i);
-
- GSOFieldAttr field = new GSOFieldAttr();
- //field.Name = fielddef.Name;
- field.Name = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- field.Type = fielddef.Type;
- field.Width = fielddef.Width;
- field.Precision = fielddef.Precision;
- bool res = newFeatureDataset.AddField(field);
- }
- newFeatureDataset.Save();
- }
- return newFeatureDataset;
- }
-
- private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
- {
- if ((pipelineTypeCbo.Text != "给水") && (pipelineTypeCbo.Text != "天然气") &&
- (pipelineTypeCbo.Text != "燃气") && (pipelineTypeCbo.Text != "中水"))
- {
- cmbReference.Text = "管底";
- }
- else
- {
- cmbReference.Text = "管顶";
- }
-
- if (pipelineTypeCbo.Text == "给水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 255);
- }
- else if (pipelineTypeCbo.Text == "供电")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 100, 150);
- }
- else if (pipelineTypeCbo.Text == "雨水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(230, 120, 0);
- }
- else if (pipelineTypeCbo.Text == "污水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(128, 64, 0);
- }
- else if (pipelineTypeCbo.Text == "天然气")
- {
- btnPipelineColor.BackColor = Color.FromArgb(215, 0, 64);
- }
- else if (pipelineTypeCbo.Text == "共通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "电通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "有线电视")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "监控")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "交通信号")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "路灯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 0, 150);
- }
- else if (pipelineTypeCbo.Text == "通讯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 0);
- }
- }
-
- private object convertFieldValue(string fieldname, object obj)
- {
- if (obj == null)
- return null;
-
- try
- {
- string type = fields_types[fieldname].ToString();
- switch (type)
- {
- case "string":
- return obj.ToString();
- case "int":
- //return 101;
- int intResult;
- if (int.TryParse(obj.ToString(), out intResult))
- return intResult;
- else
- return null;
- case "double":
- //return 202.5;
- double doubleResult;
- if (double.TryParse(obj.ToString(), out doubleResult))
- return doubleResult;
- else
- return null;
- case "date":
- DateTime dtResult;
- if (DateTime.TryParse(obj.ToString(), out dtResult))
- return dtResult;
- else
- return null;
- }
- return null;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- return null;
- }
- }
-
- ///
- /// 验证shp格式文件
- ///
- ///
- ///
- private string valiPipeData(GSOLayer layer) //验证shp格式文件
- {
- 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 (fields_types.ContainsKey(fieldName))
- {
- string fieldType = fields_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("Deep1"))
- {
- txtMessage += "Deep1字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep1");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep1字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Deep2"))
- {
- txtMessage += "Deep2字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep2");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep2字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Diameter"))
- {
- txtMessage += "Diameter字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Diameter");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Diameter字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Handle"))
- {
- txtMessage += "Handle字段不存在!\r\n";
- }
- List lstHandle = new List();
- 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 (fields_types.ContainsKey(fieldName))
- {
- if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
- {
- txtMessage += "ID为" + f.ID + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
- }
- }
- }
- if (f.GetFieldAsFloat("Diameter") <= 0)
- {
- txtMessage += "ID为" + f.ID + "\"Diameter\"字段中的值必须大于0 \r\n";
- }
- if (!lstHandle.Contains(f.GetFieldAsString("Handle")))
- {
- lstHandle.Add(f.GetFieldAsString("Handle"));
- }
- else
- {
- txtMessage += "ID为" + f.ID + "的\"Handle\"字段中的值重复\r\n";
- }
- }
- }
- return txtMessage;
- }
-
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.resx b/FrmMultiPipelineModelDB.resx
deleted file mode 100644
index 1d40cb6..0000000
--- a/FrmMultiPipelineModelDB.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
-
-
- 156, 16
-
-
- 25
-
-
\ No newline at end of file
diff --git a/MainFrm.cs b/MainFrm.cs
index 30a34a5..8e37fde 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -6324,9 +6324,6 @@
buttonItemSH4.Checked = globeControl1.Globe.StatusBar.Visible;
globeControl1.Globe.Refresh();
}
-
-
-
///
/// 添加指定路径下的数据 功能
///
@@ -6368,7 +6365,6 @@
node.SelectedImageIndex = 0;
node.Checked = terrain.Visible;
// 注意用insert不要用add,因为后加入的图层在上层
- // terrainManagerNode.Nodes.Add(node);
layerManagerNode.Nodes.Insert(0, node);
}
newlayername = terrain.Caption;
@@ -8386,9 +8382,6 @@
}
}
}
-
-
-
///
/// 管线自动缩进 菜单
///
@@ -8399,71 +8392,6 @@
FrmPipelineIndented frm = new FrmPipelineIndented(globeControl1, m_PipelineLayerNames, workwellLayerNames);
frm.ShowDialog(this);
}
-
- private void btnExportCADs_Click(object sender, EventArgs e)
- {
-
- }
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 统计指定图层在指定范围内的所有feature对象
///
@@ -8576,17 +8504,19 @@
try
{
-
string dbIp = Utility.sgdbip;
string database = Utility.sgdbname;
string user = Utility.sgdbuser;
string pass = Utility.sgdbpwd;
- shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "", user, pass);
+ shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "",
+ user, pass);
if (shds == null)
{
MessageBox.Show("数据库连接失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+
+ //Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+ Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -8598,7 +8528,6 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
}
///
@@ -11196,137 +11125,6 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
///
/// 数据质量检查
///
@@ -12463,7 +12261,6 @@
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
//zhanshi = false;
@@ -12646,231 +12443,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
-
private void btn_check_history_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_check_history.Text);
@@ -12973,18 +12545,6 @@
LogManager.saveLog(Utility.userName, this.btn_document_info.Text);
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //FormDocumentManager frm = new FormDocumentManager();
- //frm.ShowDialog();
-
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //new FormDocumentManager().ShowDialog();
if (FormDocumentManager.IS_OPEN)
{
return;
@@ -13121,31 +12681,7 @@
FrmChangePassword frm = new FrmChangePassword();
frm.ShowDialog();
}
- ///
- /// 多孔管线入库
- ///
- ///
- ///
- private void buttonItem9_Click(object sender, EventArgs e)
- {
- //保存日志
- LogManager.saveLog(Utility.userName, this.buttonItemSJGL4_2.Text);
-
- if (ds == null)
- {
- MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- ConnectDB(null, null);
- }
- if (ds == null)
- return;
-
- FrmMultiPipelineModelDB frm = new FrmMultiPipelineModelDB(globeControl1, ds);
- if (frm.ShowDialog() == DialogResult.OK)
- {
- addNodeToLayerManagerNode(frm.rukuLayer);
- }
- //frm.Show();
- }
+
private void 导出CADToolStripMenuItem1_Click(object sender, EventArgs e)
{
TreeNode node = layerNodeContexMenu.Tag as TreeNode;
diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs
index 426beb3..fd0ef22 100644
--- a/MainFrm.designer.cs
+++ b/MainFrm.designer.cs
@@ -241,15 +241,6 @@
this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
- this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
- this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
- this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
- this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
- this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar();
this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem();
@@ -271,7 +262,6 @@
this.buttonItemSJGL4 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_1 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_2 = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_3 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL5 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL6 = new DevComponents.DotNetBar.ButtonItem();
@@ -419,6 +409,15 @@
this.buttonItemBZ9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ10 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ11 = new DevComponents.DotNetBar.ButtonItem();
+ this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
+ this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
+ this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
+ this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel4 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar1 = new DevComponents.DotNetBar.RibbonBar();
this.btn_document_info = new DevComponents.DotNetBar.ButtonItem();
@@ -651,8 +650,8 @@
this.contextMenuStrip3.SuspendLayout();
this.contextMenuStripDeleteLayerNode.SuspendLayout();
this.ribbonControl1.SuspendLayout();
- this.ribbonPanel2.SuspendLayout();
this.ribbonPanel15.SuspendLayout();
+ this.ribbonPanel2.SuspendLayout();
this.ribbonPanel4.SuspendLayout();
this.ribbonPanel6.SuspendLayout();
this.ribbonPanel5.SuspendLayout();
@@ -841,7 +840,7 @@
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21);
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20);
this.toolStripDropDownButton1.Text = "帮助";
this.toolStripDropDownButton1.Visible = false;
//
@@ -2362,137 +2361,6 @@
this.ribbonControl1.Text = "ribbonControl1";
this.ribbonControl1.UseCustomizeDialog = false;
//
- // ribbonPanel2
- //
- this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonPanel2.Controls.Add(this.ribbonBar3);
- this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
- this.ribbonPanel2.Name = "ribbonPanel2";
- this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
- this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
- //
- //
- //
- this.ribbonPanel2.Style.Class = "";
- this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseDown.Class = "";
- this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseOver.Class = "";
- this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonPanel2.TabIndex = 39;
- this.ribbonPanel2.Visible = false;
- //
- // ribbonBar3
- //
- this.ribbonBar3.AutoOverflowEnabled = true;
- //
- //
- //
- this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
- this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.BackgroundStyle.Class = "";
- this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.ContainerControlProcessDialogKey = true;
- this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
- this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
- this.btn_user_info,
- this.btn_role_info,
- this.btn_resc_info,
- this.btn_role_resc,
- this.btn_user_role,
- this.btn_password_edit,
- this.buttonItemPasswordReset});
- this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
- this.ribbonBar3.Name = "ribbonBar3";
- this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
- this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonBar3.TabIndex = 1;
- //
- //
- //
- this.ribbonBar3.TitleStyle.Class = "";
- this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.TitleStyleMouseOver.Class = "";
- this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.TitleVisible = false;
- //
- // btn_user_info
- //
- this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
- this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_info.Name = "btn_user_info";
- this.btn_user_info.SubItemsExpandWidth = 14;
- this.btn_user_info.Text = "用户管理";
- this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
- //
- // btn_role_info
- //
- this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
- this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_info.Name = "btn_role_info";
- this.btn_role_info.SubItemsExpandWidth = 14;
- this.btn_role_info.Text = "角色管理";
- this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
- //
- // btn_resc_info
- //
- this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
- this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_resc_info.Name = "btn_resc_info";
- this.btn_resc_info.SubItemsExpandWidth = 14;
- this.btn_resc_info.Text = "资源管理";
- this.btn_resc_info.Visible = false;
- this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
- //
- // btn_role_resc
- //
- this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
- this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_resc.Name = "btn_role_resc";
- this.btn_role_resc.SubItemsExpandWidth = 14;
- this.btn_role_resc.Text = "角色授权";
- this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
- //
- // btn_user_role
- //
- this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
- this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_role.Name = "btn_user_role";
- this.btn_user_role.SubItemsExpandWidth = 14;
- this.btn_user_role.Text = "用户授权";
- this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
- //
- // btn_password_edit
- //
- this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
- this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_password_edit.Name = "btn_password_edit";
- this.btn_password_edit.SubItemsExpandWidth = 14;
- this.btn_password_edit.Text = "密码修改";
- this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
- //
- // buttonItemPasswordReset
- //
- this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
- this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
- this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
- this.buttonItemPasswordReset.Text = "重置密码";
- this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
- //
// ribbonPanel15
//
this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -2549,7 +2417,7 @@
this.buttonItemBZ});
this.ribbonBar20.Location = new System.Drawing.Point(3, 0);
this.ribbonBar20.Name = "ribbonBar20";
- this.ribbonBar20.Size = new System.Drawing.Size(814, 59);
+ this.ribbonBar20.Size = new System.Drawing.Size(785, 59);
this.ribbonBar20.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.ribbonBar20.TabIndex = 0;
//
@@ -2711,7 +2579,6 @@
this.buttonItemSJGL4.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.buttonItemSJGL4_1,
this.buttonItemSJGL4_2,
- this.buttonItem9,
this.buttonItemSJGL4_3});
this.buttonItemSJGL4.Text = "数据批量入库";
//
@@ -2727,12 +2594,6 @@
this.buttonItemSJGL4_2.Text = "线矢量入库";
this.buttonItemSJGL4_2.Click += new System.EventHandler(this.buttonItemSJGL4_2_Click);
//
- // buttonItem9
- //
- this.buttonItem9.Name = "buttonItem9";
- this.buttonItem9.Text = "多孔入库";
- this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click);
- //
// buttonItemSJGL4_3
//
this.buttonItemSJGL4_3.Name = "buttonItemSJGL4_3";
@@ -3869,6 +3730,137 @@
this.buttonItemBZ11.Text = "标注管理";
this.buttonItemBZ11.Click += new System.EventHandler(this.buttonItemBZ11_Click);
//
+ // ribbonPanel2
+ //
+ this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonPanel2.Controls.Add(this.ribbonBar3);
+ this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
+ this.ribbonPanel2.Name = "ribbonPanel2";
+ this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
+ this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
+ //
+ //
+ //
+ this.ribbonPanel2.Style.Class = "";
+ this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseDown.Class = "";
+ this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseOver.Class = "";
+ this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonPanel2.TabIndex = 39;
+ this.ribbonPanel2.Visible = false;
+ //
+ // ribbonBar3
+ //
+ this.ribbonBar3.AutoOverflowEnabled = true;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
+ this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundStyle.Class = "";
+ this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.ContainerControlProcessDialogKey = true;
+ this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
+ this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
+ this.btn_user_info,
+ this.btn_role_info,
+ this.btn_resc_info,
+ this.btn_role_resc,
+ this.btn_user_role,
+ this.btn_password_edit,
+ this.buttonItemPasswordReset});
+ this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
+ this.ribbonBar3.Name = "ribbonBar3";
+ this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
+ this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonBar3.TabIndex = 1;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyle.Class = "";
+ this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyleMouseOver.Class = "";
+ this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.TitleVisible = false;
+ //
+ // btn_user_info
+ //
+ this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
+ this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_info.Name = "btn_user_info";
+ this.btn_user_info.SubItemsExpandWidth = 14;
+ this.btn_user_info.Text = "用户管理";
+ this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
+ //
+ // btn_role_info
+ //
+ this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
+ this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_info.Name = "btn_role_info";
+ this.btn_role_info.SubItemsExpandWidth = 14;
+ this.btn_role_info.Text = "角色管理";
+ this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
+ //
+ // btn_resc_info
+ //
+ this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
+ this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_resc_info.Name = "btn_resc_info";
+ this.btn_resc_info.SubItemsExpandWidth = 14;
+ this.btn_resc_info.Text = "资源管理";
+ this.btn_resc_info.Visible = false;
+ this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
+ //
+ // btn_role_resc
+ //
+ this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
+ this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_resc.Name = "btn_role_resc";
+ this.btn_role_resc.SubItemsExpandWidth = 14;
+ this.btn_role_resc.Text = "角色授权";
+ this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
+ //
+ // btn_user_role
+ //
+ this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
+ this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_role.Name = "btn_user_role";
+ this.btn_user_role.SubItemsExpandWidth = 14;
+ this.btn_user_role.Text = "用户授权";
+ this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
+ //
+ // btn_password_edit
+ //
+ this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
+ this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_password_edit.Name = "btn_password_edit";
+ this.btn_password_edit.SubItemsExpandWidth = 14;
+ this.btn_password_edit.Text = "密码修改";
+ this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
+ //
+ // buttonItemPasswordReset
+ //
+ this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
+ this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
+ this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
+ this.buttonItemPasswordReset.Text = "重置密码";
+ this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
+ //
// ribbonPanel4
//
this.ribbonPanel4.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -5522,7 +5514,7 @@
this.dataGridViewX2.ReadOnly = true;
this.dataGridViewX2.RowHeadersVisible = false;
this.dataGridViewX2.RowTemplate.Height = 23;
- this.dataGridViewX2.Size = new System.Drawing.Size(20389, 92);
+ this.dataGridViewX2.Size = new System.Drawing.Size(20983, 92);
this.dataGridViewX2.TabIndex = 11;
//
// dataGridViewTextBoxColumn10
@@ -5616,7 +5608,7 @@
this.dataGridViewX3.ReadOnly = true;
this.dataGridViewX3.RowHeadersVisible = false;
this.dataGridViewX3.RowTemplate.Height = 23;
- this.dataGridViewX3.Size = new System.Drawing.Size(20388, 127);
+ this.dataGridViewX3.Size = new System.Drawing.Size(20982, 127);
this.dataGridViewX3.TabIndex = 5;
this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick);
//
@@ -5874,7 +5866,7 @@
this.dataGridViewX8.ReadOnly = true;
this.dataGridViewX8.RowHeadersVisible = false;
this.dataGridViewX8.RowTemplate.Height = 23;
- this.dataGridViewX8.Size = new System.Drawing.Size(125, 92);
+ this.dataGridViewX8.Size = new System.Drawing.Size(91, 92);
this.dataGridViewX8.TabIndex = 11;
//
// dataGridViewTextBoxColumn12
@@ -5969,7 +5961,7 @@
this.dataGridViewX9.ReadOnly = true;
this.dataGridViewX9.RowHeadersVisible = false;
this.dataGridViewX9.RowTemplate.Height = 23;
- this.dataGridViewX9.Size = new System.Drawing.Size(124, 127);
+ this.dataGridViewX9.Size = new System.Drawing.Size(90, 127);
this.dataGridViewX9.TabIndex = 5;
this.dataGridViewX9.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX9_MouseDoubleClick);
//
@@ -6834,8 +6826,8 @@
this.contextMenuStripDeleteLayerNode.ResumeLayout(false);
this.ribbonControl1.ResumeLayout(false);
this.ribbonControl1.PerformLayout();
- this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel15.ResumeLayout(false);
+ this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel4.ResumeLayout(false);
this.ribbonPanel6.ResumeLayout(false);
this.ribbonPanel5.ResumeLayout(false);
@@ -7328,7 +7320,6 @@
private System.Windows.Forms.ToolStripMenuItem 定位ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem LayerFlyMenuItem;
private DevComponents.DotNetBar.ButtonItem btn_password_edit;
- private DevComponents.DotNetBar.ButtonItem buttonItem9;
private System.Windows.Forms.ToolStripMenuItem 导出CADToolStripMenuItem1;
private DevComponents.DotNetBar.ButtonItem buttonItemGBJC;
private System.Windows.Forms.ContextMenuStrip RightScreenToolMenu;
diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe
index 924ae08..e7980a2 100644
--- a/bin/x86/Debug/Cyberpipe.exe
+++ b/bin/x86/Debug/Cyberpipe.exe
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.pdb b/bin/x86/Debug/Cyberpipe.pdb
index a87794a..4935fa1 100644
--- a/bin/x86/Debug/Cyberpipe.pdb
+++ b/bin/x86/Debug/Cyberpipe.pdb
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.vshost.exe.manifest b/bin/x86/Debug/Cyberpipe.vshost.exe.manifest
deleted file mode 100644
index 061c9ca..0000000
--- a/bin/x86/Debug/Cyberpipe.vshost.exe.manifest
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/FrmMultiPipelineModelDB.Designer.cs b/FrmMultiPipelineModelDB.Designer.cs
deleted file mode 100644
index 8aa77b0..0000000
--- a/FrmMultiPipelineModelDB.Designer.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-namespace Cyberpipe
-{
- partial class FrmMultiPipelineModelDB
- {
- ///
- /// 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.label7 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBoxCornerSliceAngle = new System.Windows.Forms.TextBox();
- this.numericUpDownLineOpaque = new System.Windows.Forms.NumericUpDown();
- this.txtSlice = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.cmbRadius = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.cmbTo = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbFrom = new System.Windows.Forms.ComboBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.btnClose = new System.Windows.Forms.Button();
- this.btnCreateModel = new System.Windows.Forms.Button();
- this.textBoxNewLayerName = new System.Windows.Forms.TextBox();
- this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxShpLayerList = new System.Windows.Forms.ComboBox();
- this.colorDialog1 = new System.Windows.Forms.ColorDialog();
- this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.cmbID = new System.Windows.Forms.ComboBox();
- this.label11 = new System.Windows.Forms.Label();
- this.chkDeep = new System.Windows.Forms.CheckBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.cmbReference = new System.Windows.Forms.ComboBox();
- this.cmbWidthNum = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.cmbHeightNum = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.numOpaqueRect = new System.Windows.Forms.NumericUpDown();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.btnRectColor = new System.Windows.Forms.Button();
- this.pipelineTypeCbo = new DevComponents.DotNetBar.Controls.ComboBoxEx();
- this.label17 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).BeginInit();
- this.SuspendLayout();
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Location = new System.Drawing.Point(360, 395);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(17, 12);
- this.label7.TabIndex = 71;
- this.label7.Text = "度";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.BackColor = System.Drawing.Color.Transparent;
- this.label9.Location = new System.Drawing.Point(21, 393);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(77, 12);
- this.label9.TabIndex = 70;
- this.label9.Text = "拐弯平滑度:";
- //
- // textBoxCornerSliceAngle
- //
- this.textBoxCornerSliceAngle.Location = new System.Drawing.Point(131, 390);
- this.textBoxCornerSliceAngle.Name = "textBoxCornerSliceAngle";
- this.textBoxCornerSliceAngle.Size = new System.Drawing.Size(225, 21);
- this.textBoxCornerSliceAngle.TabIndex = 69;
- this.textBoxCornerSliceAngle.Text = "10";
- //
- // numericUpDownLineOpaque
- //
- this.numericUpDownLineOpaque.Location = new System.Drawing.Point(131, 334);
- this.numericUpDownLineOpaque.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numericUpDownLineOpaque.Name = "numericUpDownLineOpaque";
- this.numericUpDownLineOpaque.Size = new System.Drawing.Size(225, 21);
- this.numericUpDownLineOpaque.TabIndex = 68;
- this.numericUpDownLineOpaque.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- //
- // txtSlice
- //
- this.txtSlice.Location = new System.Drawing.Point(131, 362);
- this.txtSlice.Name = "txtSlice";
- this.txtSlice.Size = new System.Drawing.Size(224, 21);
- this.txtSlice.TabIndex = 67;
- this.txtSlice.Text = "24";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(20, 365);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(77, 12);
- this.label8.TabIndex = 65;
- this.label8.Text = "截面分段数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.BackColor = System.Drawing.Color.Transparent;
- this.label10.Location = new System.Drawing.Point(21, 336);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(53, 12);
- this.label10.TabIndex = 66;
- this.label10.Text = "透明度:";
- //
- // cmbRadius
- //
- this.cmbRadius.FormattingEnabled = true;
- this.cmbRadius.Location = new System.Drawing.Point(130, 196);
- this.cmbRadius.Name = "cmbRadius";
- this.cmbRadius.Size = new System.Drawing.Size(226, 20);
- this.cmbRadius.TabIndex = 64;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(20, 309);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 62;
- this.label6.Text = "管道颜色:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(20, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 63;
- this.label5.Text = "管径字段:";
- //
- // cmbTo
- //
- this.cmbTo.FormattingEnabled = true;
- this.cmbTo.Location = new System.Drawing.Point(130, 125);
- this.cmbTo.Name = "cmbTo";
- this.cmbTo.Size = new System.Drawing.Size(226, 20);
- this.cmbTo.TabIndex = 61;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(24, 132);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 60;
- this.label4.Text = "终点埋深:";
- //
- // cmbFrom
- //
- this.cmbFrom.FormattingEnabled = true;
- this.cmbFrom.Location = new System.Drawing.Point(129, 97);
- this.cmbFrom.Name = "cmbFrom";
- this.cmbFrom.Size = new System.Drawing.Size(226, 20);
- this.cmbFrom.TabIndex = 59;
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(14, 479);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(380, 2);
- this.groupBox1.TabIndex = 58;
- this.groupBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 103);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 12);
- this.label3.TabIndex = 55;
- this.label3.Text = "起点埋深:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(20, 72);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(89, 12);
- this.label2.TabIndex = 56;
- this.label2.Text = "管线图层名称:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(20, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(95, 12);
- this.label1.TabIndex = 57;
- this.label1.Text = "Shapefile图层:";
- //
- // btnClose
- //
- this.btnClose.Location = new System.Drawing.Point(282, 490);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 53;
- this.btnClose.Text = "关闭(&C)";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // btnCreateModel
- //
- this.btnCreateModel.Location = new System.Drawing.Point(199, 490);
- this.btnCreateModel.Name = "btnCreateModel";
- this.btnCreateModel.Size = new System.Drawing.Size(74, 23);
- this.btnCreateModel.TabIndex = 54;
- this.btnCreateModel.Text = "建模(&M)";
- this.btnCreateModel.UseVisualStyleBackColor = true;
- this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
- //
- // textBoxNewLayerName
- //
- this.textBoxNewLayerName.Location = new System.Drawing.Point(129, 67);
- this.textBoxNewLayerName.Name = "textBoxNewLayerName";
- this.textBoxNewLayerName.Size = new System.Drawing.Size(226, 21);
- this.textBoxNewLayerName.TabIndex = 51;
- //
- // btnPipelineColor
- //
- this.btnPipelineColor.BackColor = System.Drawing.Color.Gainsboro;
- this.btnPipelineColor.Location = new System.Drawing.Point(130, 304);
- this.btnPipelineColor.Name = "btnPipelineColor";
- this.btnPipelineColor.Size = new System.Drawing.Size(226, 23);
- this.btnPipelineColor.TabIndex = 48;
- this.btnPipelineColor.UseVisualStyleBackColor = false;
- this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
- //
- // comboBoxShpLayerList
- //
- this.comboBoxShpLayerList.FormattingEnabled = true;
- this.comboBoxShpLayerList.Location = new System.Drawing.Point(129, 11);
- this.comboBoxShpLayerList.Name = "comboBoxShpLayerList";
- this.comboBoxShpLayerList.Size = new System.Drawing.Size(226, 20);
- this.comboBoxShpLayerList.TabIndex = 72;
- this.comboBoxShpLayerList.SelectedIndexChanged += new System.EventHandler(this.cmbLayer_SelectedIndexChanged);
- //
- // cmbID
- //
- this.cmbID.FormattingEnabled = true;
- this.cmbID.Location = new System.Drawing.Point(130, 223);
- this.cmbID.Name = "cmbID";
- this.cmbID.Size = new System.Drawing.Size(226, 20);
- this.cmbID.TabIndex = 74;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(22, 227);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 73;
- this.label11.Text = "ID字段:";
- //
- // chkDeep
- //
- this.chkDeep.AutoSize = true;
- this.chkDeep.Location = new System.Drawing.Point(130, 150);
- this.chkDeep.Name = "chkDeep";
- this.chkDeep.Size = new System.Drawing.Size(144, 16);
- this.chkDeep.TabIndex = 75;
- this.chkDeep.Text = "埋深是否转换为相反数";
- this.chkDeep.UseVisualStyleBackColor = true;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(359, 200);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(29, 12);
- this.label12.TabIndex = 76;
- this.label12.Text = "毫米";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(20, 172);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(77, 12);
- this.label13.TabIndex = 63;
- this.label13.Text = "埋深参考点:";
- //
- // cmbReference
- //
- this.cmbReference.FormattingEnabled = true;
- this.cmbReference.Items.AddRange(new object[] {
- "管底",
- "管顶"});
- this.cmbReference.Location = new System.Drawing.Point(130, 168);
- this.cmbReference.Name = "cmbReference";
- this.cmbReference.Size = new System.Drawing.Size(226, 20);
- this.cmbReference.TabIndex = 64;
- //
- // cmbWidthNum
- //
- this.cmbWidthNum.FormattingEnabled = true;
- this.cmbWidthNum.Location = new System.Drawing.Point(131, 250);
- this.cmbWidthNum.Name = "cmbWidthNum";
- this.cmbWidthNum.Size = new System.Drawing.Size(226, 20);
- this.cmbWidthNum.TabIndex = 78;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(22, 254);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 77;
- this.label14.Text = "横向个数字段:";
- //
- // cmbHeightNum
- //
- this.cmbHeightNum.FormattingEnabled = true;
- this.cmbHeightNum.Location = new System.Drawing.Point(131, 277);
- this.cmbHeightNum.Name = "cmbHeightNum";
- this.cmbHeightNum.Size = new System.Drawing.Size(226, 20);
- this.cmbHeightNum.TabIndex = 80;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(22, 280);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(89, 12);
- this.label15.TabIndex = 79;
- this.label15.Text = "纵向个数字段:";
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(430, 246);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 81;
- this.label16.Text = "间距字段:";
- //
- // numOpaqueRect
- //
- this.numOpaqueRect.Location = new System.Drawing.Point(132, 451);
- this.numOpaqueRect.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numOpaqueRect.Name = "numOpaqueRect";
- this.numOpaqueRect.Size = new System.Drawing.Size(225, 21);
- this.numOpaqueRect.TabIndex = 88;
- this.numOpaqueRect.Value = new decimal(new int[] {
- 125,
- 0,
- 0,
- 0});
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Location = new System.Drawing.Point(24, 455);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(53, 12);
- this.label21.TabIndex = 87;
- this.label21.Text = "透明度:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(22, 424);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(65, 12);
- this.label22.TabIndex = 84;
- this.label22.Text = "管沟颜色:";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(430, 291);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(77, 12);
- this.label23.TabIndex = 85;
- this.label23.Text = "管沟宽字段:";
- //
- // btnRectColor
- //
- this.btnRectColor.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.btnRectColor.Location = new System.Drawing.Point(131, 419);
- this.btnRectColor.Name = "btnRectColor";
- this.btnRectColor.Size = new System.Drawing.Size(226, 23);
- this.btnRectColor.TabIndex = 83;
- this.btnRectColor.UseVisualStyleBackColor = false;
- //
- // pipelineTypeCbo
- //
- this.pipelineTypeCbo.DisplayMember = "Text";
- this.pipelineTypeCbo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.pipelineTypeCbo.FormattingEnabled = true;
- this.pipelineTypeCbo.ItemHeight = 15;
- this.pipelineTypeCbo.Location = new System.Drawing.Point(129, 40);
- this.pipelineTypeCbo.Name = "pipelineTypeCbo";
- this.pipelineTypeCbo.Size = new System.Drawing.Size(226, 21);
- this.pipelineTypeCbo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.pipelineTypeCbo.TabIndex = 126;
- this.pipelineTypeCbo.SelectedIndexChanged += new System.EventHandler(this.pipelineTypeCbo_SelectedIndexChanged);
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(20, 46);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(89, 12);
- this.label17.TabIndex = 125;
- this.label17.Text = "管线图层类型:";
- //
- // FrmMultiPipelineModelDB
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(406, 522);
- this.Controls.Add(this.pipelineTypeCbo);
- this.Controls.Add(this.label17);
- this.Controls.Add(this.numOpaqueRect);
- this.Controls.Add(this.label21);
- this.Controls.Add(this.label22);
- this.Controls.Add(this.label23);
- this.Controls.Add(this.btnRectColor);
- this.Controls.Add(this.label16);
- this.Controls.Add(this.cmbHeightNum);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.cmbWidthNum);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.chkDeep);
- this.Controls.Add(this.cmbID);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.comboBoxShpLayerList);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.textBoxCornerSliceAngle);
- this.Controls.Add(this.numericUpDownLineOpaque);
- this.Controls.Add(this.txtSlice);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.cmbReference);
- this.Controls.Add(this.cmbRadius);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.cmbTo);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.cmbFrom);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.btnCreateModel);
- this.Controls.Add(this.textBoxNewLayerName);
- this.Controls.Add(this.btnPipelineColor);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.Name = "FrmMultiPipelineModelDB";
- this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "管孔方沟入库";
- this.Load += new System.EventHandler(this.FrmMultiPipelineModelDB_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBoxCornerSliceAngle;
- private System.Windows.Forms.NumericUpDown numericUpDownLineOpaque;
- private System.Windows.Forms.TextBox txtSlice;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ComboBox cmbRadius;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.ComboBox cmbTo;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.ComboBox cmbFrom;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.Button btnCreateModel;
- private System.Windows.Forms.TextBox textBoxNewLayerName;
- private System.Windows.Forms.Button btnPipelineColor;
- private System.Windows.Forms.ComboBox comboBoxShpLayerList;
- private System.Windows.Forms.ColorDialog colorDialog1;
- private System.Windows.Forms.SaveFileDialog saveFileDialog1;
- private System.Windows.Forms.ComboBox cmbID;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.CheckBox chkDeep;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.ComboBox cmbReference;
- private System.Windows.Forms.ComboBox cmbWidthNum;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.ComboBox cmbHeightNum;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.NumericUpDown numOpaqueRect;
- private System.Windows.Forms.Label label21;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.Button btnRectColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx pipelineTypeCbo;
- private System.Windows.Forms.Label label17;
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.cs b/FrmMultiPipelineModelDB.cs
deleted file mode 100644
index 0a0516a..0000000
--- a/FrmMultiPipelineModelDB.cs
+++ /dev/null
@@ -1,814 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using DevComponents.DotNetBar;
-using GeoScene.Globe;
-using GeoScene.Engine;
-using GeoScene.Data;
-using System.IO;
-using System.Collections;
-using System.Xml;
-
-namespace Cyberpipe
-{
- public partial class FrmMultiPipelineModelDB : Office2007Form
- {
- private GeoScene.Globe.GSOGlobeControl globeControl1;
- GSODataSource ds = null;
- public GSOLayer rukuLayer = null;
- private Hashtable en_cns = new Hashtable();
- private Hashtable fields_types = new Hashtable();
-
- public FrmMultiPipelineModelDB(GSOGlobeControl _globeControl,GSODataSource _ds)
- {
- globeControl1 = _globeControl;
- ds = _ds;
- InitializeComponent();
-
- cmbReference.Text = "管顶";
- chkDeep.Checked = true;
- }
-
- private void FrmMultiPipelineModelDB_Load(object sender, EventArgs e)
- {
- string pipelinetype = Utility.pipelinetype;
- string[] pipelinetypes = pipelinetype.Split(',');
- for (int i = 0; i < pipelinetypes.Length; i++)
- {
- pipelineTypeCbo.Items.Add(pipelinetypes[i]);
- }
-
- comboBoxShpLayerList.Items.Clear();
-
- for (int i = 0; i < globeControl1.Globe.Layers.Count; i++)
- {
- GSOLayer layer = globeControl1.Globe.Layers[i];
- if (layer != null && layer.Name.ToLower().EndsWith(".shp"))
- {
- comboBoxShpLayerList.Items.Add(layer.Caption);
- }
- }
-
- string filename = Application.StartupPath + "\\FormText.xml";
- if (File.Exists(filename))
- {
- XmlTextReader XmlReader = new XmlTextReader(filename);
- try
- {
- while (XmlReader.Read())
- {
- if (XmlReader.Name == "Field")
- {
- string str1 = XmlReader["label"];
- string str3 = XmlReader["type"];
- string str2 = XmlReader.ReadElementString();
- en_cns.Add(str1, str2);
- fields_types.Add(str1, str3);
- }
- }
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- }
-
- private void cmbLayer_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- return;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- return;
- }
- string txtMessage = valiPipeData(layer);
- if (txtMessage != "")
- {
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(comboBoxShpLayerList.SelectedItem.ToString().Trim(), txtMessage);
- showErrorMessage.ShowDialog();
- return;
- }
- else
- {
- textBoxNewLayerName.Text = layer.Caption;
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- return;
-
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- for (int i = 0; i < features[0].GetFieldCount(); i++)
- {
- cmbFrom.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbTo.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbRadius.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbID.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbWidthNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbHeightNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- }
- cmbFrom.SelectedItem = "Deep1";
- cmbTo.SelectedItem = "Deep2";
- cmbRadius.SelectedItem = "Diameter";
- cmbWidthNum.SelectedItem = "Hor_Num";// "Weight";
- cmbHeightNum.SelectedItem = "Ver_Num";// "Height";
- cmbID.SelectedItem = "Handle";
- }
-
- }
-
- private void btnPipelineColor_Click(object sender, EventArgs e)
- {
- colorDialog1.Color = btnPipelineColor.BackColor;
-
- if (colorDialog1.ShowDialog() == DialogResult.OK)
- {
- btnPipelineColor.BackColor = colorDialog1.Color;
- }
- }
-
- private void btnCreateModel_Click(object sender, EventArgs e)
- {
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return;
- }
- if (string.IsNullOrEmpty(textBoxNewLayerName.Text))
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return;
- }
- if (ds.GetDatasetByName(textBoxNewLayerName.Text) != null)
- {
- MessageBox.Show("图层名称已存在!", "提示");
- return;
- }
- try
- {
- GSOLayer ShpSourceLayer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- GSOFeatureDataset pipeline = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim());
- if (pipeline == null)
- {
- MessageBox.Show("输入的图层名称不符合要求!", "提示");
- return;
- }
- pipeline.Open();
- GSOFeatureDataset pipelineRect = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim() + "_Rect");
- if (pipelineRect == null)
- {
- return;
- }
- pipelineRect.Open();
-
- GSOFeatures features = ShpSourceLayer.GetAllFeatures();
- string message = "";
- for (int j = 0; j < features.Length; j++)
- {
- GSOFeature f = features[j];
-
- GSOFeature newFeature = pipeline.CreateFeature();
-
- GSOPipeLineStyle3D style = new GSOPipeLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numericUpDownLineOpaque.Value), btnPipelineColor.BackColor);
-
- double radius = 0;
- if (cmbRadius.SelectedItem == null)
- {
- cmbRadius.SelectedIndex = 0;
- }
- GSOFieldDefn diameterfield = (GSOFieldDefn)f.GetFieldDefn(cmbRadius.SelectedItem.ToString());
- string fieldText = f.GetFieldAsString(cmbRadius.SelectedItem.ToString());
- if (diameterfield.Type == EnumFieldType.Text)
- {
- if (double.TryParse(fieldText, out radius))
- {
- radius = radius / 2000;
- }
- else
- {
- message += "ID为" + f.ID + "的对象的管径字段值不符合要求!\r\n";
- continue;
- }
- }
- else
- {
- radius = f.GetFieldAsDouble(cmbRadius.SelectedItem.ToString()) / 2000; // 探测数据的单位一般是毫米,需换算为米; 管径一般是 直径, 这个需要半径, 所有除以2000
- }
-
- if (cmbID.SelectedItem == null)
- {
- cmbID.SelectedIndex = 0;
- }
- if (cmbWidthNum.SelectedItem == null)
- {
- cmbWidthNum.SelectedIndex = 0;
- }
- if (cmbHeightNum.SelectedItem == null)
- {
- cmbHeightNum.SelectedIndex = 0;
- }
- string eventid = f.GetFieldAsString(cmbID.SelectedItem.ToString());
- double interval = radius * 2;
- int num_width = 0;
- int num_height = 0;
- if (!int.TryParse(f.GetFieldAsString(cmbWidthNum.SelectedItem.ToString()), out num_width))
- {
- message += "ID为" + f.ID + "的对象的宽度字段值不符合要求!\r\n";
- continue;
- }
- if (!int.TryParse(f.GetFieldAsString(cmbHeightNum.SelectedItem.ToString()), out num_height))
- {
- message += "ID为" + f.ID + "的对象的高度字段值不符合要求!\r\n";
- continue;
- }
-
- double rectWidth = Math.Round( radius * 2.0 * num_width + 0.08,5);// 两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- if (radius == 0)
- {
- message += "ID为" + f.ID + "的对象的管径字段值为0!\r\n";
- continue;
- }
-
- int intSlice = 0;
- double cornerSliceAngle = 0;
- if (!int.TryParse(txtSlice.Text.Trim(), out intSlice))
- {
- message += "ID为" + f.ID + "的对象的截面分段数字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(textBoxCornerSliceAngle.Text.Trim(), out cornerSliceAngle))
- {
- message += "ID为" + f.ID + "的对象的拐弯平滑度字段值不符合要求!\r\n";
- continue;
- }
- style.Radius = radius;
- style.Slice = intSlice;
- style.CornerSliceAngle = cornerSliceAngle;
-
- f.Geometry.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- GSOGeoPolyline3D line = f.Geometry as GSOGeoPolyline3D;
- if (line == null)
- {
- message += "ID为" + f.ID + "的对象不是一个线对象!\r\n";
- continue;
- }
-
- if (cmbFrom.SelectedItem == null)
- {
- cmbFrom.SelectedIndex = 0;
- }
- if (cmbTo.SelectedItem == null)
- {
- cmbTo.SelectedIndex = 0;
- }
- double deep1 = 0;
- double deep2 = 0;
- if (!double.TryParse(f.GetFieldAsString(cmbFrom.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep1))
- {
- message += "ID为" + f.ID + "的对象的起点埋深字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(f.GetFieldAsString(cmbTo.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep2))
- {
- message += "ID为" + f.ID + "的对象的终点埋深字段值不符合要求!\r\n";
- continue;
- }
-
- if (chkDeep.Checked)
- {
- deep1 = 0 - deep1;
- deep2 = 0 - deep2;
- }
-
- if (cmbReference.SelectedIndex == 0) //管底
- {
- deep1 = deep1 + radius * 2;
- deep2 = deep2 + radius * 2;
- }
- else if (cmbReference.SelectedIndex == 1) //管顶
- {
- deep1 = deep1 - radius * 2;
- deep2 = deep2 - radius * 2;
- }
- GSOPoint3ds ps = line[0];
- for (int n = 0; n < ps.Count; n++)
- {
- GSOPoint3d pt3d = ps[n];
- int pointcount = ps.Count;
- double radio = Math.Sqrt(Math.Pow(pt3d.Y - ps[0].Y, 2) + Math.Pow(pt3d.X - ps[0].X, 2)) / Math.Sqrt(Math.Pow(ps[pointcount - 1].Y - ps[0].Y, 2) + Math.Pow(ps[pointcount - 1].X - ps[0].X, 2));
- pt3d.Z = deep1 + (deep2 - deep1) * radio;
-
- if (double.IsInfinity(pt3d.Z))
- {
- pt3d.Z = deep2;
- }
- ps[n] = pt3d;
- }
- line[0] = ps;
- if (num_height == 0 || num_width == 0) // 直埋
- {
- newFeature.Geometry = line;
- newFeature.Geometry.Style = style;
- //newFeature.Name = eventid;
- newFeature.Name = en_cns.ContainsKey(eventid) == true ? en_cns[eventid].ToString() : eventid;
- SetFields(f, newFeature);
-
- pipeline.AddFeature(newFeature);
- }
- else
- {
- GSOFeature rectfeat = pipelineRect.CreateFeature();
- rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
- if (rectfeat != null)
- {
- SetFields(f, rectfeat);
- pipelineRect.AddFeature(rectfeat);
- }
- one2Multi(line, num_width, num_height, interval, style, pipeline, eventid, f);
- }
- }
-
- pipeline.Save();
- pipelineRect.Save();
- string strMessage = "shp文件中共" + features.Length + "个对象,实际入库" + pipeline.GetAllFeatures().Length + "个对象!\r\n";
- pipeline.Close();
- pipelineRect.Close();
- globeControl1.Refresh();
-
- GSOLayer layerRuku = globeControl1.Globe.Layers.Add(textBoxNewLayerName.Text);
- rukuLayer = layerRuku;
-
- if (message == "")
- {
- MessageBox.Show(strMessage, "提示");
- }
- else
- {
- //FrmMessageShow frm = new FrmMessageShow(strMessage + message);
- //frm.ShowDialog();
- MessageBox.Show(strMessage + message, "提示");
- }
-
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- catch (Exception ex)
- {
- //Log.PublishTxt(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- private void SetFields(GSOFeature oldfeat, GSOFeature newFeature)
- {
- for (int i = 0; i < oldfeat.GetFieldCount(); i++)
- {
- GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(oldfeat.GetFieldDefn(i));
-
- object fieldvalue = oldfeat.GetValue(fielddef.Name);
- if (fieldvalue == null)
- continue;
- string fieldName = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- newFeature.SetValue(fieldName, fieldvalue);
- }
- }
-
- private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
- {
- GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;
- GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
- if (style == null)
- {
- return null;
- }
- cloneline.Style = style;
- return cloneline;
- }
-
- private GSOExtendSectionLineStyle3D createRectStyle(double width, double height)
- {
- GSOExtendSectionLineStyle3D style = new GSOExtendSectionLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numOpaqueRect.Value), btnRectColor.BackColor);
- if (width == 0 || height == 0)
- {
- return null;
- }
- GSOPoint3ds sectionpts = new GSOPoint3ds();
- sectionpts.Add(new GSOPoint3d(width / -2, height / 2, 0));
- sectionpts.Add(new GSOPoint3d(width / -2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / 2, 0));
-
- style.SetSectionPoints(sectionpts);
- style.IsClosed = true;
- style.SetAnchorByAlign(EnumAlign.MiddleCenter);
-
- return style;
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOFeatureDataset layer,string name,GSOFeature oldfeat)
- {
- line = LatLon2Coord_Line(line);
-
- double width_all = interval * (num_width-1);
- double height_all = interval * (num_height-1);
-
- GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3d p1 = line[0][0];
- GSOPoint3d p2 = line[0][1];
- double daltaX = p2.X-p1.X;
- double daltaY = p2.Y-p1.Y;
- double agree = Math.Atan(daltaY/daltaX);
- GSOPoint2d point = new GSOPoint2d((-0.5*width_all-interval)*Math.Sin(agree),(0.5*width_all+interval)*Math.Cos(agree));
- line.MoveXY(point.X,point.Y);
- line.MoveZ(height_all / -2);
-
- for (int i = 0; i < num_width; i++)
- {
- for (int j = 0; j < num_height; j++)
- {
- GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;
- point = new GSOPoint2d((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));
- templine.MoveXY(point.X,point.Y);
- templine.MoveZ(interval*j);
- templine = Coord2LatLon_Line(templine);
- GSOFeature feat = layer.CreateFeature();
- feat.Geometry = templine;
- feat.Geometry.Style = style;
- feat.Name = name;
- SetFields(oldfeat, feat);
- layer.AddFeature(feat);
- }
- }
- }
-
- private GSOGeoPolyline3D LatLon2Coord_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = LatLon2Coord(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOGeoPolyline3D Coord2LatLon_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = Coord2LatLon(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOPoint2d LatLon2Coord(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, id);
- return result;
- }
-
- private GSOPoint2d Coord2LatLon(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, id);
- return result;
- //+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs
- }
-
- private GSOFeatureDataset CreateDBFeatureDataset(string name)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return null;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- MessageBox.Show("Shp图层为空!", "提示");
- return null;
- }
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- {
- MessageBox.Show("图层要素个数为0!", "提示");
- return null;
- }
- GSOFeatureDataset featureDataset = layer.Dataset as GSOFeatureDataset;
- if (featureDataset == null)
- {
- MessageBox.Show("Shp图层不是矢量图层!", "提示");
- return null;
- }
-
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return null ;
- }
- GSOFeatureDataset newFeatureDataset = ds.CreateFeatureDataset(name);
- if (newFeatureDataset != null)
- {
- for (int i = 0; i < featureDataset.FieldCount; i++)
- {
- GeoScene.Data.GSOFieldAttr fielddef = featureDataset.GetField(i);
-
- GSOFieldAttr field = new GSOFieldAttr();
- //field.Name = fielddef.Name;
- field.Name = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- field.Type = fielddef.Type;
- field.Width = fielddef.Width;
- field.Precision = fielddef.Precision;
- bool res = newFeatureDataset.AddField(field);
- }
- newFeatureDataset.Save();
- }
- return newFeatureDataset;
- }
-
- private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
- {
- if ((pipelineTypeCbo.Text != "给水") && (pipelineTypeCbo.Text != "天然气") &&
- (pipelineTypeCbo.Text != "燃气") && (pipelineTypeCbo.Text != "中水"))
- {
- cmbReference.Text = "管底";
- }
- else
- {
- cmbReference.Text = "管顶";
- }
-
- if (pipelineTypeCbo.Text == "给水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 255);
- }
- else if (pipelineTypeCbo.Text == "供电")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 100, 150);
- }
- else if (pipelineTypeCbo.Text == "雨水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(230, 120, 0);
- }
- else if (pipelineTypeCbo.Text == "污水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(128, 64, 0);
- }
- else if (pipelineTypeCbo.Text == "天然气")
- {
- btnPipelineColor.BackColor = Color.FromArgb(215, 0, 64);
- }
- else if (pipelineTypeCbo.Text == "共通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "电通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "有线电视")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "监控")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "交通信号")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "路灯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 0, 150);
- }
- else if (pipelineTypeCbo.Text == "通讯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 0);
- }
- }
-
- private object convertFieldValue(string fieldname, object obj)
- {
- if (obj == null)
- return null;
-
- try
- {
- string type = fields_types[fieldname].ToString();
- switch (type)
- {
- case "string":
- return obj.ToString();
- case "int":
- //return 101;
- int intResult;
- if (int.TryParse(obj.ToString(), out intResult))
- return intResult;
- else
- return null;
- case "double":
- //return 202.5;
- double doubleResult;
- if (double.TryParse(obj.ToString(), out doubleResult))
- return doubleResult;
- else
- return null;
- case "date":
- DateTime dtResult;
- if (DateTime.TryParse(obj.ToString(), out dtResult))
- return dtResult;
- else
- return null;
- }
- return null;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- return null;
- }
- }
-
- ///
- /// 验证shp格式文件
- ///
- ///
- ///
- private string valiPipeData(GSOLayer layer) //验证shp格式文件
- {
- 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 (fields_types.ContainsKey(fieldName))
- {
- string fieldType = fields_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("Deep1"))
- {
- txtMessage += "Deep1字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep1");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep1字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Deep2"))
- {
- txtMessage += "Deep2字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep2");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep2字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Diameter"))
- {
- txtMessage += "Diameter字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Diameter");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Diameter字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Handle"))
- {
- txtMessage += "Handle字段不存在!\r\n";
- }
- List lstHandle = new List();
- 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 (fields_types.ContainsKey(fieldName))
- {
- if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
- {
- txtMessage += "ID为" + f.ID + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
- }
- }
- }
- if (f.GetFieldAsFloat("Diameter") <= 0)
- {
- txtMessage += "ID为" + f.ID + "\"Diameter\"字段中的值必须大于0 \r\n";
- }
- if (!lstHandle.Contains(f.GetFieldAsString("Handle")))
- {
- lstHandle.Add(f.GetFieldAsString("Handle"));
- }
- else
- {
- txtMessage += "ID为" + f.ID + "的\"Handle\"字段中的值重复\r\n";
- }
- }
- }
- return txtMessage;
- }
-
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.resx b/FrmMultiPipelineModelDB.resx
deleted file mode 100644
index 1d40cb6..0000000
--- a/FrmMultiPipelineModelDB.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
-
-
- 156, 16
-
-
- 25
-
-
\ No newline at end of file
diff --git a/MainFrm.cs b/MainFrm.cs
index 30a34a5..8e37fde 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -6324,9 +6324,6 @@
buttonItemSH4.Checked = globeControl1.Globe.StatusBar.Visible;
globeControl1.Globe.Refresh();
}
-
-
-
///
/// 添加指定路径下的数据 功能
///
@@ -6368,7 +6365,6 @@
node.SelectedImageIndex = 0;
node.Checked = terrain.Visible;
// 注意用insert不要用add,因为后加入的图层在上层
- // terrainManagerNode.Nodes.Add(node);
layerManagerNode.Nodes.Insert(0, node);
}
newlayername = terrain.Caption;
@@ -8386,9 +8382,6 @@
}
}
}
-
-
-
///
/// 管线自动缩进 菜单
///
@@ -8399,71 +8392,6 @@
FrmPipelineIndented frm = new FrmPipelineIndented(globeControl1, m_PipelineLayerNames, workwellLayerNames);
frm.ShowDialog(this);
}
-
- private void btnExportCADs_Click(object sender, EventArgs e)
- {
-
- }
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 统计指定图层在指定范围内的所有feature对象
///
@@ -8576,17 +8504,19 @@
try
{
-
string dbIp = Utility.sgdbip;
string database = Utility.sgdbname;
string user = Utility.sgdbuser;
string pass = Utility.sgdbpwd;
- shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "", user, pass);
+ shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "",
+ user, pass);
if (shds == null)
{
MessageBox.Show("数据库连接失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+
+ //Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+ Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -8598,7 +8528,6 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
}
///
@@ -11196,137 +11125,6 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
///
/// 数据质量检查
///
@@ -12463,7 +12261,6 @@
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
//zhanshi = false;
@@ -12646,231 +12443,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
-
private void btn_check_history_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_check_history.Text);
@@ -12973,18 +12545,6 @@
LogManager.saveLog(Utility.userName, this.btn_document_info.Text);
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //FormDocumentManager frm = new FormDocumentManager();
- //frm.ShowDialog();
-
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //new FormDocumentManager().ShowDialog();
if (FormDocumentManager.IS_OPEN)
{
return;
@@ -13121,31 +12681,7 @@
FrmChangePassword frm = new FrmChangePassword();
frm.ShowDialog();
}
- ///
- /// 多孔管线入库
- ///
- ///
- ///
- private void buttonItem9_Click(object sender, EventArgs e)
- {
- //保存日志
- LogManager.saveLog(Utility.userName, this.buttonItemSJGL4_2.Text);
-
- if (ds == null)
- {
- MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- ConnectDB(null, null);
- }
- if (ds == null)
- return;
-
- FrmMultiPipelineModelDB frm = new FrmMultiPipelineModelDB(globeControl1, ds);
- if (frm.ShowDialog() == DialogResult.OK)
- {
- addNodeToLayerManagerNode(frm.rukuLayer);
- }
- //frm.Show();
- }
+
private void 导出CADToolStripMenuItem1_Click(object sender, EventArgs e)
{
TreeNode node = layerNodeContexMenu.Tag as TreeNode;
diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs
index 426beb3..fd0ef22 100644
--- a/MainFrm.designer.cs
+++ b/MainFrm.designer.cs
@@ -241,15 +241,6 @@
this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
- this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
- this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
- this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
- this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
- this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar();
this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem();
@@ -271,7 +262,6 @@
this.buttonItemSJGL4 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_1 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_2 = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_3 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL5 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL6 = new DevComponents.DotNetBar.ButtonItem();
@@ -419,6 +409,15 @@
this.buttonItemBZ9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ10 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ11 = new DevComponents.DotNetBar.ButtonItem();
+ this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
+ this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
+ this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
+ this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel4 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar1 = new DevComponents.DotNetBar.RibbonBar();
this.btn_document_info = new DevComponents.DotNetBar.ButtonItem();
@@ -651,8 +650,8 @@
this.contextMenuStrip3.SuspendLayout();
this.contextMenuStripDeleteLayerNode.SuspendLayout();
this.ribbonControl1.SuspendLayout();
- this.ribbonPanel2.SuspendLayout();
this.ribbonPanel15.SuspendLayout();
+ this.ribbonPanel2.SuspendLayout();
this.ribbonPanel4.SuspendLayout();
this.ribbonPanel6.SuspendLayout();
this.ribbonPanel5.SuspendLayout();
@@ -841,7 +840,7 @@
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21);
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20);
this.toolStripDropDownButton1.Text = "帮助";
this.toolStripDropDownButton1.Visible = false;
//
@@ -2362,137 +2361,6 @@
this.ribbonControl1.Text = "ribbonControl1";
this.ribbonControl1.UseCustomizeDialog = false;
//
- // ribbonPanel2
- //
- this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonPanel2.Controls.Add(this.ribbonBar3);
- this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
- this.ribbonPanel2.Name = "ribbonPanel2";
- this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
- this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
- //
- //
- //
- this.ribbonPanel2.Style.Class = "";
- this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseDown.Class = "";
- this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseOver.Class = "";
- this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonPanel2.TabIndex = 39;
- this.ribbonPanel2.Visible = false;
- //
- // ribbonBar3
- //
- this.ribbonBar3.AutoOverflowEnabled = true;
- //
- //
- //
- this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
- this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.BackgroundStyle.Class = "";
- this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.ContainerControlProcessDialogKey = true;
- this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
- this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
- this.btn_user_info,
- this.btn_role_info,
- this.btn_resc_info,
- this.btn_role_resc,
- this.btn_user_role,
- this.btn_password_edit,
- this.buttonItemPasswordReset});
- this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
- this.ribbonBar3.Name = "ribbonBar3";
- this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
- this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonBar3.TabIndex = 1;
- //
- //
- //
- this.ribbonBar3.TitleStyle.Class = "";
- this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.TitleStyleMouseOver.Class = "";
- this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.TitleVisible = false;
- //
- // btn_user_info
- //
- this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
- this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_info.Name = "btn_user_info";
- this.btn_user_info.SubItemsExpandWidth = 14;
- this.btn_user_info.Text = "用户管理";
- this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
- //
- // btn_role_info
- //
- this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
- this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_info.Name = "btn_role_info";
- this.btn_role_info.SubItemsExpandWidth = 14;
- this.btn_role_info.Text = "角色管理";
- this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
- //
- // btn_resc_info
- //
- this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
- this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_resc_info.Name = "btn_resc_info";
- this.btn_resc_info.SubItemsExpandWidth = 14;
- this.btn_resc_info.Text = "资源管理";
- this.btn_resc_info.Visible = false;
- this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
- //
- // btn_role_resc
- //
- this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
- this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_resc.Name = "btn_role_resc";
- this.btn_role_resc.SubItemsExpandWidth = 14;
- this.btn_role_resc.Text = "角色授权";
- this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
- //
- // btn_user_role
- //
- this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
- this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_role.Name = "btn_user_role";
- this.btn_user_role.SubItemsExpandWidth = 14;
- this.btn_user_role.Text = "用户授权";
- this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
- //
- // btn_password_edit
- //
- this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
- this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_password_edit.Name = "btn_password_edit";
- this.btn_password_edit.SubItemsExpandWidth = 14;
- this.btn_password_edit.Text = "密码修改";
- this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
- //
- // buttonItemPasswordReset
- //
- this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
- this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
- this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
- this.buttonItemPasswordReset.Text = "重置密码";
- this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
- //
// ribbonPanel15
//
this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -2549,7 +2417,7 @@
this.buttonItemBZ});
this.ribbonBar20.Location = new System.Drawing.Point(3, 0);
this.ribbonBar20.Name = "ribbonBar20";
- this.ribbonBar20.Size = new System.Drawing.Size(814, 59);
+ this.ribbonBar20.Size = new System.Drawing.Size(785, 59);
this.ribbonBar20.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.ribbonBar20.TabIndex = 0;
//
@@ -2711,7 +2579,6 @@
this.buttonItemSJGL4.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.buttonItemSJGL4_1,
this.buttonItemSJGL4_2,
- this.buttonItem9,
this.buttonItemSJGL4_3});
this.buttonItemSJGL4.Text = "数据批量入库";
//
@@ -2727,12 +2594,6 @@
this.buttonItemSJGL4_2.Text = "线矢量入库";
this.buttonItemSJGL4_2.Click += new System.EventHandler(this.buttonItemSJGL4_2_Click);
//
- // buttonItem9
- //
- this.buttonItem9.Name = "buttonItem9";
- this.buttonItem9.Text = "多孔入库";
- this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click);
- //
// buttonItemSJGL4_3
//
this.buttonItemSJGL4_3.Name = "buttonItemSJGL4_3";
@@ -3869,6 +3730,137 @@
this.buttonItemBZ11.Text = "标注管理";
this.buttonItemBZ11.Click += new System.EventHandler(this.buttonItemBZ11_Click);
//
+ // ribbonPanel2
+ //
+ this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonPanel2.Controls.Add(this.ribbonBar3);
+ this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
+ this.ribbonPanel2.Name = "ribbonPanel2";
+ this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
+ this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
+ //
+ //
+ //
+ this.ribbonPanel2.Style.Class = "";
+ this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseDown.Class = "";
+ this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseOver.Class = "";
+ this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonPanel2.TabIndex = 39;
+ this.ribbonPanel2.Visible = false;
+ //
+ // ribbonBar3
+ //
+ this.ribbonBar3.AutoOverflowEnabled = true;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
+ this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundStyle.Class = "";
+ this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.ContainerControlProcessDialogKey = true;
+ this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
+ this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
+ this.btn_user_info,
+ this.btn_role_info,
+ this.btn_resc_info,
+ this.btn_role_resc,
+ this.btn_user_role,
+ this.btn_password_edit,
+ this.buttonItemPasswordReset});
+ this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
+ this.ribbonBar3.Name = "ribbonBar3";
+ this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
+ this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonBar3.TabIndex = 1;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyle.Class = "";
+ this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyleMouseOver.Class = "";
+ this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.TitleVisible = false;
+ //
+ // btn_user_info
+ //
+ this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
+ this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_info.Name = "btn_user_info";
+ this.btn_user_info.SubItemsExpandWidth = 14;
+ this.btn_user_info.Text = "用户管理";
+ this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
+ //
+ // btn_role_info
+ //
+ this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
+ this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_info.Name = "btn_role_info";
+ this.btn_role_info.SubItemsExpandWidth = 14;
+ this.btn_role_info.Text = "角色管理";
+ this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
+ //
+ // btn_resc_info
+ //
+ this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
+ this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_resc_info.Name = "btn_resc_info";
+ this.btn_resc_info.SubItemsExpandWidth = 14;
+ this.btn_resc_info.Text = "资源管理";
+ this.btn_resc_info.Visible = false;
+ this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
+ //
+ // btn_role_resc
+ //
+ this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
+ this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_resc.Name = "btn_role_resc";
+ this.btn_role_resc.SubItemsExpandWidth = 14;
+ this.btn_role_resc.Text = "角色授权";
+ this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
+ //
+ // btn_user_role
+ //
+ this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
+ this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_role.Name = "btn_user_role";
+ this.btn_user_role.SubItemsExpandWidth = 14;
+ this.btn_user_role.Text = "用户授权";
+ this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
+ //
+ // btn_password_edit
+ //
+ this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
+ this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_password_edit.Name = "btn_password_edit";
+ this.btn_password_edit.SubItemsExpandWidth = 14;
+ this.btn_password_edit.Text = "密码修改";
+ this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
+ //
+ // buttonItemPasswordReset
+ //
+ this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
+ this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
+ this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
+ this.buttonItemPasswordReset.Text = "重置密码";
+ this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
+ //
// ribbonPanel4
//
this.ribbonPanel4.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -5522,7 +5514,7 @@
this.dataGridViewX2.ReadOnly = true;
this.dataGridViewX2.RowHeadersVisible = false;
this.dataGridViewX2.RowTemplate.Height = 23;
- this.dataGridViewX2.Size = new System.Drawing.Size(20389, 92);
+ this.dataGridViewX2.Size = new System.Drawing.Size(20983, 92);
this.dataGridViewX2.TabIndex = 11;
//
// dataGridViewTextBoxColumn10
@@ -5616,7 +5608,7 @@
this.dataGridViewX3.ReadOnly = true;
this.dataGridViewX3.RowHeadersVisible = false;
this.dataGridViewX3.RowTemplate.Height = 23;
- this.dataGridViewX3.Size = new System.Drawing.Size(20388, 127);
+ this.dataGridViewX3.Size = new System.Drawing.Size(20982, 127);
this.dataGridViewX3.TabIndex = 5;
this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick);
//
@@ -5874,7 +5866,7 @@
this.dataGridViewX8.ReadOnly = true;
this.dataGridViewX8.RowHeadersVisible = false;
this.dataGridViewX8.RowTemplate.Height = 23;
- this.dataGridViewX8.Size = new System.Drawing.Size(125, 92);
+ this.dataGridViewX8.Size = new System.Drawing.Size(91, 92);
this.dataGridViewX8.TabIndex = 11;
//
// dataGridViewTextBoxColumn12
@@ -5969,7 +5961,7 @@
this.dataGridViewX9.ReadOnly = true;
this.dataGridViewX9.RowHeadersVisible = false;
this.dataGridViewX9.RowTemplate.Height = 23;
- this.dataGridViewX9.Size = new System.Drawing.Size(124, 127);
+ this.dataGridViewX9.Size = new System.Drawing.Size(90, 127);
this.dataGridViewX9.TabIndex = 5;
this.dataGridViewX9.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX9_MouseDoubleClick);
//
@@ -6834,8 +6826,8 @@
this.contextMenuStripDeleteLayerNode.ResumeLayout(false);
this.ribbonControl1.ResumeLayout(false);
this.ribbonControl1.PerformLayout();
- this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel15.ResumeLayout(false);
+ this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel4.ResumeLayout(false);
this.ribbonPanel6.ResumeLayout(false);
this.ribbonPanel5.ResumeLayout(false);
@@ -7328,7 +7320,6 @@
private System.Windows.Forms.ToolStripMenuItem 定位ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem LayerFlyMenuItem;
private DevComponents.DotNetBar.ButtonItem btn_password_edit;
- private DevComponents.DotNetBar.ButtonItem buttonItem9;
private System.Windows.Forms.ToolStripMenuItem 导出CADToolStripMenuItem1;
private DevComponents.DotNetBar.ButtonItem buttonItemGBJC;
private System.Windows.Forms.ContextMenuStrip RightScreenToolMenu;
diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe
index 924ae08..e7980a2 100644
--- a/bin/x86/Debug/Cyberpipe.exe
+++ b/bin/x86/Debug/Cyberpipe.exe
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.pdb b/bin/x86/Debug/Cyberpipe.pdb
index a87794a..4935fa1 100644
--- a/bin/x86/Debug/Cyberpipe.pdb
+++ b/bin/x86/Debug/Cyberpipe.pdb
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.vshost.exe.manifest b/bin/x86/Debug/Cyberpipe.vshost.exe.manifest
deleted file mode 100644
index 061c9ca..0000000
--- a/bin/x86/Debug/Cyberpipe.vshost.exe.manifest
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bin/x86/Debug/log.txt b/bin/x86/Debug/log.txt
index 0849c66..5603359 100644
--- a/bin/x86/Debug/log.txt
+++ b/bin/x86/Debug/log.txt
@@ -699,3 +699,179 @@
exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 16:31:34---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Void comboBoxExLayer_SelectedIndexChanged(System.Object, System.EventArgs)
+
+ e.StackTrace: 在 Cyberpipe.Forms.FrmPipelineModelDB.comboBoxExLayer_SelectedIndexChanged(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 210
+ 在 System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
+ 在 DevComponents.DotNetBar.Controls.ComboBoxEx.OnSelectedIndexChanged(EventArgs e)
+ 在 System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.buttonOpen_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 336
+ 在 DevComponents.DotNetBar.ButtonX.OnClick(EventArgs e)
+ 在 DevComponents.DotNetBar.ButtonX.OnMouseUp(MouseEventArgs e)
+ 在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
+ 在 System.Windows.Forms.Control.WndProc(Message& m)
+ 在 DevComponents.DotNetBar.PopupItemControl.WndProc(Message& m)
+ 在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
+ 在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
+ 在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
+ 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
+ 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
+ 在 System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
+ 在 Cyberpipe.MainFrm.buttonItem127_Click_2(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\MainFrm.cs:行号 8524
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 17:58:23---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:11:21---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:12:13---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:12:33---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:12:43---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:12:53---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:13:31---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:16:04---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj
index d22f590..e2e20b0 100644
--- a/Cyberpipe.csproj
+++ b/Cyberpipe.csproj
@@ -672,12 +672,6 @@
FrmMetadataStat.cs
-
- Form
-
-
- FrmMultiPipelineModelDB.cs
-
Form
@@ -1425,9 +1419,6 @@
FrmMetadataStat.cs
-
- FrmMultiPipelineModelDB.cs
-
FrmOperMgr.cs
Designer
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 7f4ae36..1bf12ed 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Forms/FrmPipelineModelDataBase.Designer.cs b/Forms/FrmPipelineModelDataBase.Designer.cs
index 61769a1..05f8ff1 100644
--- a/Forms/FrmPipelineModelDataBase.Designer.cs
+++ b/Forms/FrmPipelineModelDataBase.Designer.cs
@@ -242,7 +242,7 @@
this.comboBoxExLayer.ItemHeight = 15;
this.comboBoxExLayer.Location = new System.Drawing.Point(110, 9);
this.comboBoxExLayer.Name = "comboBoxExLayer";
- this.comboBoxExLayer.Size = new System.Drawing.Size(389, 21);
+ this.comboBoxExLayer.Size = new System.Drawing.Size(377, 21);
this.comboBoxExLayer.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.comboBoxExLayer.TabIndex = 87;
this.comboBoxExLayer.SelectedIndexChanged += new System.EventHandler(this.comboBoxExLayer_SelectedIndexChanged);
diff --git a/Forms/FrmPipelineModelDataBase.cs b/Forms/FrmPipelineModelDataBase.cs
index e7da5d0..4cee1e9 100644
--- a/Forms/FrmPipelineModelDataBase.cs
+++ b/Forms/FrmPipelineModelDataBase.cs
@@ -22,7 +22,6 @@
GSODataSource ds;
private Hashtable en_cns = new Hashtable();
private Hashtable fields_types = new Hashtable();
- private List layernamelist = new List();
public GSOLayer rukuLayer = null;
public FrmPipelineModelDB(GSOGlobeControl _ctl, GSODataSource _ds)
@@ -57,7 +56,6 @@
{
string str = Path.GetFileName(layer.Name);
comboBoxExLayer.Items.Add(str);
- layernamelist.Add(layer.Name.Trim());
}
}
}
@@ -180,6 +178,7 @@
comboBoxExHeight.Items.Clear();
comboBoxExWidth.Items.Clear();
}
+
private void addComboboxParam(string strFiled)
{
cmbID.Items.Add(strFiled);
@@ -191,7 +190,8 @@
comboBoxExWidth.Items.Add(strFiled);
comboBoxExHeight.Items.Add(strFiled);
}
- private void initComboboxParam(string strLayerName)
+
+ private void initComboboxParam()
{
cmbID.SelectedItem = "编号";
cmbFrom.SelectedItem = "起始埋深";
@@ -226,7 +226,7 @@
pipelineTypeCbo.Text = pipelineTypeCbo.Items[i].ToString();
}
- initComboboxParam(layer.Caption);
+ initComboboxParam();
}
///
@@ -248,7 +248,6 @@
{
ctl.Globe.Refresh();
}
-
private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
{
diff --git a/Forms/FrmPipelineModelDataOneStep.Designer.cs b/Forms/FrmPipelineModelDataOneStep.Designer.cs
index 5e8f8ce..7e9d7c9 100644
--- a/Forms/FrmPipelineModelDataOneStep.Designer.cs
+++ b/Forms/FrmPipelineModelDataOneStep.Designer.cs
@@ -64,10 +64,10 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.textBoxLayer = new System.Windows.Forms.TextBox();
this.checkBox1 = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.checkBox2 = new DevComponents.DotNetBar.Controls.CheckBoxX();
+ this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
this.SuspendLayout();
//
@@ -417,21 +417,6 @@
this.btnPipelineColor.UseVisualStyleBackColor = false;
this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
//
- // comboBoxEx1
- //
- this.comboBoxEx1.DisplayMember = "Text";
- this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxEx1.FormattingEnabled = true;
- this.comboBoxEx1.ItemHeight = 15;
- this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
- this.comboBoxEx1.Name = "comboBoxEx1";
- this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
- this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.comboBoxEx1.TabIndex = 121;
- this.comboBoxEx1.Visible = false;
- this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
- //
// textBoxLayer
//
this.textBoxLayer.Location = new System.Drawing.Point(127, 41);
@@ -473,6 +458,21 @@
this.checkBox2.Text = "导入管沟";
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
+ // comboBoxEx1
+ //
+ this.comboBoxEx1.DisplayMember = "Text";
+ this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxEx1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxEx1.FormattingEnabled = true;
+ this.comboBoxEx1.ItemHeight = 15;
+ this.comboBoxEx1.Location = new System.Drawing.Point(157, 114);
+ this.comboBoxEx1.Name = "comboBoxEx1";
+ this.comboBoxEx1.Size = new System.Drawing.Size(226, 21);
+ this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.comboBoxEx1.TabIndex = 121;
+ this.comboBoxEx1.Visible = false;
+ this.comboBoxEx1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEx1_SelectedIndexChanged);
+ //
// FrmPipelineModelDataOneStep
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -568,9 +568,9 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnPipelineColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
private System.Windows.Forms.TextBox textBoxLayer;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox1;
private DevComponents.DotNetBar.Controls.CheckBoxX checkBox2;
+ private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1;
}
}
\ No newline at end of file
diff --git a/Forms/FrmPipelineModelDataOneStep.cs b/Forms/FrmPipelineModelDataOneStep.cs
index 382082c..09cae9d 100644
--- a/Forms/FrmPipelineModelDataOneStep.cs
+++ b/Forms/FrmPipelineModelDataOneStep.cs
@@ -465,11 +465,6 @@
double rectWidth = f.GetFieldAsDouble("Weight");
double rectHeight = f.GetFieldAsDouble("Height");
- /*
- double rectWidth = Math.Round(radius * 2.0 * num_width + 0.08, 5);//两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- */
-
GSOFeature rectfeat = layer.CreateFeature();
rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
rectfeat.Name = eventid;
@@ -531,7 +526,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
-
}
catch (Exception ex)
{
diff --git a/FrmMultiPipelineModelDB.Designer.cs b/FrmMultiPipelineModelDB.Designer.cs
deleted file mode 100644
index 8aa77b0..0000000
--- a/FrmMultiPipelineModelDB.Designer.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-namespace Cyberpipe
-{
- partial class FrmMultiPipelineModelDB
- {
- ///
- /// 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.label7 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBoxCornerSliceAngle = new System.Windows.Forms.TextBox();
- this.numericUpDownLineOpaque = new System.Windows.Forms.NumericUpDown();
- this.txtSlice = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.cmbRadius = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.cmbTo = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbFrom = new System.Windows.Forms.ComboBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.btnClose = new System.Windows.Forms.Button();
- this.btnCreateModel = new System.Windows.Forms.Button();
- this.textBoxNewLayerName = new System.Windows.Forms.TextBox();
- this.btnPipelineColor = new System.Windows.Forms.Button();
- this.comboBoxShpLayerList = new System.Windows.Forms.ComboBox();
- this.colorDialog1 = new System.Windows.Forms.ColorDialog();
- this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
- this.cmbID = new System.Windows.Forms.ComboBox();
- this.label11 = new System.Windows.Forms.Label();
- this.chkDeep = new System.Windows.Forms.CheckBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.cmbReference = new System.Windows.Forms.ComboBox();
- this.cmbWidthNum = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.cmbHeightNum = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.numOpaqueRect = new System.Windows.Forms.NumericUpDown();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.btnRectColor = new System.Windows.Forms.Button();
- this.pipelineTypeCbo = new DevComponents.DotNetBar.Controls.ComboBoxEx();
- this.label17 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).BeginInit();
- this.SuspendLayout();
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Location = new System.Drawing.Point(360, 395);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(17, 12);
- this.label7.TabIndex = 71;
- this.label7.Text = "度";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.BackColor = System.Drawing.Color.Transparent;
- this.label9.Location = new System.Drawing.Point(21, 393);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(77, 12);
- this.label9.TabIndex = 70;
- this.label9.Text = "拐弯平滑度:";
- //
- // textBoxCornerSliceAngle
- //
- this.textBoxCornerSliceAngle.Location = new System.Drawing.Point(131, 390);
- this.textBoxCornerSliceAngle.Name = "textBoxCornerSliceAngle";
- this.textBoxCornerSliceAngle.Size = new System.Drawing.Size(225, 21);
- this.textBoxCornerSliceAngle.TabIndex = 69;
- this.textBoxCornerSliceAngle.Text = "10";
- //
- // numericUpDownLineOpaque
- //
- this.numericUpDownLineOpaque.Location = new System.Drawing.Point(131, 334);
- this.numericUpDownLineOpaque.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numericUpDownLineOpaque.Name = "numericUpDownLineOpaque";
- this.numericUpDownLineOpaque.Size = new System.Drawing.Size(225, 21);
- this.numericUpDownLineOpaque.TabIndex = 68;
- this.numericUpDownLineOpaque.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- //
- // txtSlice
- //
- this.txtSlice.Location = new System.Drawing.Point(131, 362);
- this.txtSlice.Name = "txtSlice";
- this.txtSlice.Size = new System.Drawing.Size(224, 21);
- this.txtSlice.TabIndex = 67;
- this.txtSlice.Text = "24";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.BackColor = System.Drawing.Color.Transparent;
- this.label8.Location = new System.Drawing.Point(20, 365);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(77, 12);
- this.label8.TabIndex = 65;
- this.label8.Text = "截面分段数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.BackColor = System.Drawing.Color.Transparent;
- this.label10.Location = new System.Drawing.Point(21, 336);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(53, 12);
- this.label10.TabIndex = 66;
- this.label10.Text = "透明度:";
- //
- // cmbRadius
- //
- this.cmbRadius.FormattingEnabled = true;
- this.cmbRadius.Location = new System.Drawing.Point(130, 196);
- this.cmbRadius.Name = "cmbRadius";
- this.cmbRadius.Size = new System.Drawing.Size(226, 20);
- this.cmbRadius.TabIndex = 64;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(20, 309);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 62;
- this.label6.Text = "管道颜色:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(20, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 63;
- this.label5.Text = "管径字段:";
- //
- // cmbTo
- //
- this.cmbTo.FormattingEnabled = true;
- this.cmbTo.Location = new System.Drawing.Point(130, 125);
- this.cmbTo.Name = "cmbTo";
- this.cmbTo.Size = new System.Drawing.Size(226, 20);
- this.cmbTo.TabIndex = 61;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(24, 132);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 60;
- this.label4.Text = "终点埋深:";
- //
- // cmbFrom
- //
- this.cmbFrom.FormattingEnabled = true;
- this.cmbFrom.Location = new System.Drawing.Point(129, 97);
- this.cmbFrom.Name = "cmbFrom";
- this.cmbFrom.Size = new System.Drawing.Size(226, 20);
- this.cmbFrom.TabIndex = 59;
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(14, 479);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(380, 2);
- this.groupBox1.TabIndex = 58;
- this.groupBox1.TabStop = false;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 103);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 12);
- this.label3.TabIndex = 55;
- this.label3.Text = "起点埋深:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(20, 72);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(89, 12);
- this.label2.TabIndex = 56;
- this.label2.Text = "管线图层名称:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(20, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(95, 12);
- this.label1.TabIndex = 57;
- this.label1.Text = "Shapefile图层:";
- //
- // btnClose
- //
- this.btnClose.Location = new System.Drawing.Point(282, 490);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 53;
- this.btnClose.Text = "关闭(&C)";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // btnCreateModel
- //
- this.btnCreateModel.Location = new System.Drawing.Point(199, 490);
- this.btnCreateModel.Name = "btnCreateModel";
- this.btnCreateModel.Size = new System.Drawing.Size(74, 23);
- this.btnCreateModel.TabIndex = 54;
- this.btnCreateModel.Text = "建模(&M)";
- this.btnCreateModel.UseVisualStyleBackColor = true;
- this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
- //
- // textBoxNewLayerName
- //
- this.textBoxNewLayerName.Location = new System.Drawing.Point(129, 67);
- this.textBoxNewLayerName.Name = "textBoxNewLayerName";
- this.textBoxNewLayerName.Size = new System.Drawing.Size(226, 21);
- this.textBoxNewLayerName.TabIndex = 51;
- //
- // btnPipelineColor
- //
- this.btnPipelineColor.BackColor = System.Drawing.Color.Gainsboro;
- this.btnPipelineColor.Location = new System.Drawing.Point(130, 304);
- this.btnPipelineColor.Name = "btnPipelineColor";
- this.btnPipelineColor.Size = new System.Drawing.Size(226, 23);
- this.btnPipelineColor.TabIndex = 48;
- this.btnPipelineColor.UseVisualStyleBackColor = false;
- this.btnPipelineColor.Click += new System.EventHandler(this.btnPipelineColor_Click);
- //
- // comboBoxShpLayerList
- //
- this.comboBoxShpLayerList.FormattingEnabled = true;
- this.comboBoxShpLayerList.Location = new System.Drawing.Point(129, 11);
- this.comboBoxShpLayerList.Name = "comboBoxShpLayerList";
- this.comboBoxShpLayerList.Size = new System.Drawing.Size(226, 20);
- this.comboBoxShpLayerList.TabIndex = 72;
- this.comboBoxShpLayerList.SelectedIndexChanged += new System.EventHandler(this.cmbLayer_SelectedIndexChanged);
- //
- // cmbID
- //
- this.cmbID.FormattingEnabled = true;
- this.cmbID.Location = new System.Drawing.Point(130, 223);
- this.cmbID.Name = "cmbID";
- this.cmbID.Size = new System.Drawing.Size(226, 20);
- this.cmbID.TabIndex = 74;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(22, 227);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 73;
- this.label11.Text = "ID字段:";
- //
- // chkDeep
- //
- this.chkDeep.AutoSize = true;
- this.chkDeep.Location = new System.Drawing.Point(130, 150);
- this.chkDeep.Name = "chkDeep";
- this.chkDeep.Size = new System.Drawing.Size(144, 16);
- this.chkDeep.TabIndex = 75;
- this.chkDeep.Text = "埋深是否转换为相反数";
- this.chkDeep.UseVisualStyleBackColor = true;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(359, 200);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(29, 12);
- this.label12.TabIndex = 76;
- this.label12.Text = "毫米";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(20, 172);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(77, 12);
- this.label13.TabIndex = 63;
- this.label13.Text = "埋深参考点:";
- //
- // cmbReference
- //
- this.cmbReference.FormattingEnabled = true;
- this.cmbReference.Items.AddRange(new object[] {
- "管底",
- "管顶"});
- this.cmbReference.Location = new System.Drawing.Point(130, 168);
- this.cmbReference.Name = "cmbReference";
- this.cmbReference.Size = new System.Drawing.Size(226, 20);
- this.cmbReference.TabIndex = 64;
- //
- // cmbWidthNum
- //
- this.cmbWidthNum.FormattingEnabled = true;
- this.cmbWidthNum.Location = new System.Drawing.Point(131, 250);
- this.cmbWidthNum.Name = "cmbWidthNum";
- this.cmbWidthNum.Size = new System.Drawing.Size(226, 20);
- this.cmbWidthNum.TabIndex = 78;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(22, 254);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 77;
- this.label14.Text = "横向个数字段:";
- //
- // cmbHeightNum
- //
- this.cmbHeightNum.FormattingEnabled = true;
- this.cmbHeightNum.Location = new System.Drawing.Point(131, 277);
- this.cmbHeightNum.Name = "cmbHeightNum";
- this.cmbHeightNum.Size = new System.Drawing.Size(226, 20);
- this.cmbHeightNum.TabIndex = 80;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(22, 280);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(89, 12);
- this.label15.TabIndex = 79;
- this.label15.Text = "纵向个数字段:";
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(430, 246);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 81;
- this.label16.Text = "间距字段:";
- //
- // numOpaqueRect
- //
- this.numOpaqueRect.Location = new System.Drawing.Point(132, 451);
- this.numOpaqueRect.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numOpaqueRect.Name = "numOpaqueRect";
- this.numOpaqueRect.Size = new System.Drawing.Size(225, 21);
- this.numOpaqueRect.TabIndex = 88;
- this.numOpaqueRect.Value = new decimal(new int[] {
- 125,
- 0,
- 0,
- 0});
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Location = new System.Drawing.Point(24, 455);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(53, 12);
- this.label21.TabIndex = 87;
- this.label21.Text = "透明度:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(22, 424);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(65, 12);
- this.label22.TabIndex = 84;
- this.label22.Text = "管沟颜色:";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(430, 291);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(77, 12);
- this.label23.TabIndex = 85;
- this.label23.Text = "管沟宽字段:";
- //
- // btnRectColor
- //
- this.btnRectColor.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.btnRectColor.Location = new System.Drawing.Point(131, 419);
- this.btnRectColor.Name = "btnRectColor";
- this.btnRectColor.Size = new System.Drawing.Size(226, 23);
- this.btnRectColor.TabIndex = 83;
- this.btnRectColor.UseVisualStyleBackColor = false;
- //
- // pipelineTypeCbo
- //
- this.pipelineTypeCbo.DisplayMember = "Text";
- this.pipelineTypeCbo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.pipelineTypeCbo.FormattingEnabled = true;
- this.pipelineTypeCbo.ItemHeight = 15;
- this.pipelineTypeCbo.Location = new System.Drawing.Point(129, 40);
- this.pipelineTypeCbo.Name = "pipelineTypeCbo";
- this.pipelineTypeCbo.Size = new System.Drawing.Size(226, 21);
- this.pipelineTypeCbo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.pipelineTypeCbo.TabIndex = 126;
- this.pipelineTypeCbo.SelectedIndexChanged += new System.EventHandler(this.pipelineTypeCbo_SelectedIndexChanged);
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(20, 46);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(89, 12);
- this.label17.TabIndex = 125;
- this.label17.Text = "管线图层类型:";
- //
- // FrmMultiPipelineModelDB
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(406, 522);
- this.Controls.Add(this.pipelineTypeCbo);
- this.Controls.Add(this.label17);
- this.Controls.Add(this.numOpaqueRect);
- this.Controls.Add(this.label21);
- this.Controls.Add(this.label22);
- this.Controls.Add(this.label23);
- this.Controls.Add(this.btnRectColor);
- this.Controls.Add(this.label16);
- this.Controls.Add(this.cmbHeightNum);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.cmbWidthNum);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.chkDeep);
- this.Controls.Add(this.cmbID);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.comboBoxShpLayerList);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.textBoxCornerSliceAngle);
- this.Controls.Add(this.numericUpDownLineOpaque);
- this.Controls.Add(this.txtSlice);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.cmbReference);
- this.Controls.Add(this.cmbRadius);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.cmbTo);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.cmbFrom);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.btnCreateModel);
- this.Controls.Add(this.textBoxNewLayerName);
- this.Controls.Add(this.btnPipelineColor);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.Name = "FrmMultiPipelineModelDB";
- this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "管孔方沟入库";
- this.Load += new System.EventHandler(this.FrmMultiPipelineModelDB_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineOpaque)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numOpaqueRect)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBoxCornerSliceAngle;
- private System.Windows.Forms.NumericUpDown numericUpDownLineOpaque;
- private System.Windows.Forms.TextBox txtSlice;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.ComboBox cmbRadius;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.ComboBox cmbTo;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.ComboBox cmbFrom;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.Button btnCreateModel;
- private System.Windows.Forms.TextBox textBoxNewLayerName;
- private System.Windows.Forms.Button btnPipelineColor;
- private System.Windows.Forms.ComboBox comboBoxShpLayerList;
- private System.Windows.Forms.ColorDialog colorDialog1;
- private System.Windows.Forms.SaveFileDialog saveFileDialog1;
- private System.Windows.Forms.ComboBox cmbID;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.CheckBox chkDeep;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.ComboBox cmbReference;
- private System.Windows.Forms.ComboBox cmbWidthNum;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.ComboBox cmbHeightNum;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.NumericUpDown numOpaqueRect;
- private System.Windows.Forms.Label label21;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.Button btnRectColor;
- private DevComponents.DotNetBar.Controls.ComboBoxEx pipelineTypeCbo;
- private System.Windows.Forms.Label label17;
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.cs b/FrmMultiPipelineModelDB.cs
deleted file mode 100644
index 0a0516a..0000000
--- a/FrmMultiPipelineModelDB.cs
+++ /dev/null
@@ -1,814 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using DevComponents.DotNetBar;
-using GeoScene.Globe;
-using GeoScene.Engine;
-using GeoScene.Data;
-using System.IO;
-using System.Collections;
-using System.Xml;
-
-namespace Cyberpipe
-{
- public partial class FrmMultiPipelineModelDB : Office2007Form
- {
- private GeoScene.Globe.GSOGlobeControl globeControl1;
- GSODataSource ds = null;
- public GSOLayer rukuLayer = null;
- private Hashtable en_cns = new Hashtable();
- private Hashtable fields_types = new Hashtable();
-
- public FrmMultiPipelineModelDB(GSOGlobeControl _globeControl,GSODataSource _ds)
- {
- globeControl1 = _globeControl;
- ds = _ds;
- InitializeComponent();
-
- cmbReference.Text = "管顶";
- chkDeep.Checked = true;
- }
-
- private void FrmMultiPipelineModelDB_Load(object sender, EventArgs e)
- {
- string pipelinetype = Utility.pipelinetype;
- string[] pipelinetypes = pipelinetype.Split(',');
- for (int i = 0; i < pipelinetypes.Length; i++)
- {
- pipelineTypeCbo.Items.Add(pipelinetypes[i]);
- }
-
- comboBoxShpLayerList.Items.Clear();
-
- for (int i = 0; i < globeControl1.Globe.Layers.Count; i++)
- {
- GSOLayer layer = globeControl1.Globe.Layers[i];
- if (layer != null && layer.Name.ToLower().EndsWith(".shp"))
- {
- comboBoxShpLayerList.Items.Add(layer.Caption);
- }
- }
-
- string filename = Application.StartupPath + "\\FormText.xml";
- if (File.Exists(filename))
- {
- XmlTextReader XmlReader = new XmlTextReader(filename);
- try
- {
- while (XmlReader.Read())
- {
- if (XmlReader.Name == "Field")
- {
- string str1 = XmlReader["label"];
- string str3 = XmlReader["type"];
- string str2 = XmlReader.ReadElementString();
- en_cns.Add(str1, str2);
- fields_types.Add(str1, str3);
- }
- }
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- }
-
- private void cmbLayer_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- return;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- return;
- }
- string txtMessage = valiPipeData(layer);
- if (txtMessage != "")
- {
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- FrmValiDataShowErrorMessage showErrorMessage = new FrmValiDataShowErrorMessage(comboBoxShpLayerList.SelectedItem.ToString().Trim(), txtMessage);
- showErrorMessage.ShowDialog();
- return;
- }
- else
- {
- textBoxNewLayerName.Text = layer.Caption;
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- return;
-
- cmbFrom.Items.Clear();
- cmbTo.Items.Clear();
- cmbRadius.Items.Clear();
- cmbID.Items.Clear();
- cmbWidthNum.Items.Clear();
- cmbHeightNum.Items.Clear();
-
- for (int i = 0; i < features[0].GetFieldCount(); i++)
- {
- cmbFrom.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbTo.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbRadius.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbID.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbWidthNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- cmbHeightNum.Items.Add(((GeoScene.Data.GSOFieldDefn)(features[0].GetFieldDefn(i))).Name);
- }
- cmbFrom.SelectedItem = "Deep1";
- cmbTo.SelectedItem = "Deep2";
- cmbRadius.SelectedItem = "Diameter";
- cmbWidthNum.SelectedItem = "Hor_Num";// "Weight";
- cmbHeightNum.SelectedItem = "Ver_Num";// "Height";
- cmbID.SelectedItem = "Handle";
- }
-
- }
-
- private void btnPipelineColor_Click(object sender, EventArgs e)
- {
- colorDialog1.Color = btnPipelineColor.BackColor;
-
- if (colorDialog1.ShowDialog() == DialogResult.OK)
- {
- btnPipelineColor.BackColor = colorDialog1.Color;
- }
- }
-
- private void btnCreateModel_Click(object sender, EventArgs e)
- {
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return;
- }
- if (string.IsNullOrEmpty(textBoxNewLayerName.Text))
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return;
- }
- if (ds.GetDatasetByName(textBoxNewLayerName.Text) != null)
- {
- MessageBox.Show("图层名称已存在!", "提示");
- return;
- }
- try
- {
- GSOLayer ShpSourceLayer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- GSOFeatureDataset pipeline = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim());
- if (pipeline == null)
- {
- MessageBox.Show("输入的图层名称不符合要求!", "提示");
- return;
- }
- pipeline.Open();
- GSOFeatureDataset pipelineRect = CreateDBFeatureDataset(textBoxNewLayerName.Text.Trim() + "_Rect");
- if (pipelineRect == null)
- {
- return;
- }
- pipelineRect.Open();
-
- GSOFeatures features = ShpSourceLayer.GetAllFeatures();
- string message = "";
- for (int j = 0; j < features.Length; j++)
- {
- GSOFeature f = features[j];
-
- GSOFeature newFeature = pipeline.CreateFeature();
-
- GSOPipeLineStyle3D style = new GSOPipeLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numericUpDownLineOpaque.Value), btnPipelineColor.BackColor);
-
- double radius = 0;
- if (cmbRadius.SelectedItem == null)
- {
- cmbRadius.SelectedIndex = 0;
- }
- GSOFieldDefn diameterfield = (GSOFieldDefn)f.GetFieldDefn(cmbRadius.SelectedItem.ToString());
- string fieldText = f.GetFieldAsString(cmbRadius.SelectedItem.ToString());
- if (diameterfield.Type == EnumFieldType.Text)
- {
- if (double.TryParse(fieldText, out radius))
- {
- radius = radius / 2000;
- }
- else
- {
- message += "ID为" + f.ID + "的对象的管径字段值不符合要求!\r\n";
- continue;
- }
- }
- else
- {
- radius = f.GetFieldAsDouble(cmbRadius.SelectedItem.ToString()) / 2000; // 探测数据的单位一般是毫米,需换算为米; 管径一般是 直径, 这个需要半径, 所有除以2000
- }
-
- if (cmbID.SelectedItem == null)
- {
- cmbID.SelectedIndex = 0;
- }
- if (cmbWidthNum.SelectedItem == null)
- {
- cmbWidthNum.SelectedIndex = 0;
- }
- if (cmbHeightNum.SelectedItem == null)
- {
- cmbHeightNum.SelectedIndex = 0;
- }
- string eventid = f.GetFieldAsString(cmbID.SelectedItem.ToString());
- double interval = radius * 2;
- int num_width = 0;
- int num_height = 0;
- if (!int.TryParse(f.GetFieldAsString(cmbWidthNum.SelectedItem.ToString()), out num_width))
- {
- message += "ID为" + f.ID + "的对象的宽度字段值不符合要求!\r\n";
- continue;
- }
- if (!int.TryParse(f.GetFieldAsString(cmbHeightNum.SelectedItem.ToString()), out num_height))
- {
- message += "ID为" + f.ID + "的对象的高度字段值不符合要求!\r\n";
- continue;
- }
-
- double rectWidth = Math.Round( radius * 2.0 * num_width + 0.08,5);// 两端空出0.04
- double rectHeight = Math.Round(radius * 2.0 * num_height + 0.08, 5);
- if (radius == 0)
- {
- message += "ID为" + f.ID + "的对象的管径字段值为0!\r\n";
- continue;
- }
-
- int intSlice = 0;
- double cornerSliceAngle = 0;
- if (!int.TryParse(txtSlice.Text.Trim(), out intSlice))
- {
- message += "ID为" + f.ID + "的对象的截面分段数字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(textBoxCornerSliceAngle.Text.Trim(), out cornerSliceAngle))
- {
- message += "ID为" + f.ID + "的对象的拐弯平滑度字段值不符合要求!\r\n";
- continue;
- }
- style.Radius = radius;
- style.Slice = intSlice;
- style.CornerSliceAngle = cornerSliceAngle;
-
- f.Geometry.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- GSOGeoPolyline3D line = f.Geometry as GSOGeoPolyline3D;
- if (line == null)
- {
- message += "ID为" + f.ID + "的对象不是一个线对象!\r\n";
- continue;
- }
-
- if (cmbFrom.SelectedItem == null)
- {
- cmbFrom.SelectedIndex = 0;
- }
- if (cmbTo.SelectedItem == null)
- {
- cmbTo.SelectedIndex = 0;
- }
- double deep1 = 0;
- double deep2 = 0;
- if (!double.TryParse(f.GetFieldAsString(cmbFrom.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep1))
- {
- message += "ID为" + f.ID + "的对象的起点埋深字段值不符合要求!\r\n";
- continue;
- }
- if (!double.TryParse(f.GetFieldAsString(cmbTo.Items[cmbTo.SelectedIndex].ToString().Trim()), out deep2))
- {
- message += "ID为" + f.ID + "的对象的终点埋深字段值不符合要求!\r\n";
- continue;
- }
-
- if (chkDeep.Checked)
- {
- deep1 = 0 - deep1;
- deep2 = 0 - deep2;
- }
-
- if (cmbReference.SelectedIndex == 0) //管底
- {
- deep1 = deep1 + radius * 2;
- deep2 = deep2 + radius * 2;
- }
- else if (cmbReference.SelectedIndex == 1) //管顶
- {
- deep1 = deep1 - radius * 2;
- deep2 = deep2 - radius * 2;
- }
- GSOPoint3ds ps = line[0];
- for (int n = 0; n < ps.Count; n++)
- {
- GSOPoint3d pt3d = ps[n];
- int pointcount = ps.Count;
- double radio = Math.Sqrt(Math.Pow(pt3d.Y - ps[0].Y, 2) + Math.Pow(pt3d.X - ps[0].X, 2)) / Math.Sqrt(Math.Pow(ps[pointcount - 1].Y - ps[0].Y, 2) + Math.Pow(ps[pointcount - 1].X - ps[0].X, 2));
- pt3d.Z = deep1 + (deep2 - deep1) * radio;
-
- if (double.IsInfinity(pt3d.Z))
- {
- pt3d.Z = deep2;
- }
- ps[n] = pt3d;
- }
- line[0] = ps;
- if (num_height == 0 || num_width == 0) // 直埋
- {
- newFeature.Geometry = line;
- newFeature.Geometry.Style = style;
- //newFeature.Name = eventid;
- newFeature.Name = en_cns.ContainsKey(eventid) == true ? en_cns[eventid].ToString() : eventid;
- SetFields(f, newFeature);
-
- pipeline.AddFeature(newFeature);
- }
- else
- {
- GSOFeature rectfeat = pipelineRect.CreateFeature();
- rectfeat.Geometry = CreatePipeRect(line, rectWidth, rectHeight);
- if (rectfeat != null)
- {
- SetFields(f, rectfeat);
- pipelineRect.AddFeature(rectfeat);
- }
- one2Multi(line, num_width, num_height, interval, style, pipeline, eventid, f);
- }
- }
-
- pipeline.Save();
- pipelineRect.Save();
- string strMessage = "shp文件中共" + features.Length + "个对象,实际入库" + pipeline.GetAllFeatures().Length + "个对象!\r\n";
- pipeline.Close();
- pipelineRect.Close();
- globeControl1.Refresh();
-
- GSOLayer layerRuku = globeControl1.Globe.Layers.Add(textBoxNewLayerName.Text);
- rukuLayer = layerRuku;
-
- if (message == "")
- {
- MessageBox.Show(strMessage, "提示");
- }
- else
- {
- //FrmMessageShow frm = new FrmMessageShow(strMessage + message);
- //frm.ShowDialog();
- MessageBox.Show(strMessage + message, "提示");
- }
-
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- catch (Exception ex)
- {
- //Log.PublishTxt(ex);
- MessageBox.Show(ex.Message);
- }
- }
-
- private void SetFields(GSOFeature oldfeat, GSOFeature newFeature)
- {
- for (int i = 0; i < oldfeat.GetFieldCount(); i++)
- {
- GeoScene.Data.GSOFieldDefn fielddef = (GeoScene.Data.GSOFieldDefn)(oldfeat.GetFieldDefn(i));
-
- object fieldvalue = oldfeat.GetValue(fielddef.Name);
- if (fieldvalue == null)
- continue;
- string fieldName = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- newFeature.SetValue(fieldName, fieldvalue);
- }
- }
-
- private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
- {
- GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;
- GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
- if (style == null)
- {
- return null;
- }
- cloneline.Style = style;
- return cloneline;
- }
-
- private GSOExtendSectionLineStyle3D createRectStyle(double width, double height)
- {
- GSOExtendSectionLineStyle3D style = new GSOExtendSectionLineStyle3D();
- style.LineColor = Color.FromArgb(Convert.ToByte(numOpaqueRect.Value), btnRectColor.BackColor);
- if (width == 0 || height == 0)
- {
- return null;
- }
- GSOPoint3ds sectionpts = new GSOPoint3ds();
- sectionpts.Add(new GSOPoint3d(width / -2, height / 2, 0));
- sectionpts.Add(new GSOPoint3d(width / -2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / -2, 0));
- sectionpts.Add(new GSOPoint3d(width / 2, height / 2, 0));
-
- style.SetSectionPoints(sectionpts);
- style.IsClosed = true;
- style.SetAnchorByAlign(EnumAlign.MiddleCenter);
-
- return style;
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOFeatureDataset layer,string name,GSOFeature oldfeat)
- {
- line = LatLon2Coord_Line(line);
-
- double width_all = interval * (num_width-1);
- double height_all = interval * (num_height-1);
-
- GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3d p1 = line[0][0];
- GSOPoint3d p2 = line[0][1];
- double daltaX = p2.X-p1.X;
- double daltaY = p2.Y-p1.Y;
- double agree = Math.Atan(daltaY/daltaX);
- GSOPoint2d point = new GSOPoint2d((-0.5*width_all-interval)*Math.Sin(agree),(0.5*width_all+interval)*Math.Cos(agree));
- line.MoveXY(point.X,point.Y);
- line.MoveZ(height_all / -2);
-
- for (int i = 0; i < num_width; i++)
- {
- for (int j = 0; j < num_height; j++)
- {
- GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;
- point = new GSOPoint2d((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));
- templine.MoveXY(point.X,point.Y);
- templine.MoveZ(interval*j);
- templine = Coord2LatLon_Line(templine);
- GSOFeature feat = layer.CreateFeature();
- feat.Geometry = templine;
- feat.Geometry.Style = style;
- feat.Name = name;
- SetFields(oldfeat, feat);
- layer.AddFeature(feat);
- }
- }
- }
-
- private GSOGeoPolyline3D LatLon2Coord_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = LatLon2Coord(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOGeoPolyline3D Coord2LatLon_Line(GSOGeoPolyline3D line)
- {
- GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
- GSOPoint3ds ps = newline[0];
- for (int i = 0; i < ps.Count; i++)
- {
- GSOPoint3d pt = ps[i];
- GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
- GSOPoint2d pt2dnew = Coord2LatLon(pt2d);
-
- GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
- ps[i] = ptnew;
- }
- newline[0] = ps;
- return newline;
- }
-
- private GSOPoint2d LatLon2Coord(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Forward(pt2d, id);
- return result;
- }
-
- private GSOPoint2d Coord2LatLon(GeoScene.Data.GSOPoint2d pt2d)
- {
- int id = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=-4869.018 +y_0=-3421238.225 +a=6378140 +b=6356755.288157528 +units=m +no_defs");
- GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, id);
- return result;
- //+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs
- }
-
- private GSOFeatureDataset CreateDBFeatureDataset(string name)
- {
- if (comboBoxShpLayerList.SelectedItem == null)
- {
- MessageBox.Show("请选择一个Shp图层!", "提示");
- return null;
- }
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(comboBoxShpLayerList.SelectedItem.ToString().Trim());
- if (layer == null)
- {
- MessageBox.Show("Shp图层为空!", "提示");
- return null;
- }
- GSOFeatures features = layer.GetAllFeatures();
- if (features.Length == 0)
- {
- MessageBox.Show("图层要素个数为0!", "提示");
- return null;
- }
- GSOFeatureDataset featureDataset = layer.Dataset as GSOFeatureDataset;
- if (featureDataset == null)
- {
- MessageBox.Show("Shp图层不是矢量图层!", "提示");
- return null;
- }
-
- //GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
- if (ds == null)
- {
- MessageBox.Show("选择的目标数据源为空!", "提示");
- return null ;
- }
- GSOFeatureDataset newFeatureDataset = ds.CreateFeatureDataset(name);
- if (newFeatureDataset != null)
- {
- for (int i = 0; i < featureDataset.FieldCount; i++)
- {
- GeoScene.Data.GSOFieldAttr fielddef = featureDataset.GetField(i);
-
- GSOFieldAttr field = new GSOFieldAttr();
- //field.Name = fielddef.Name;
- field.Name = en_cns.ContainsKey(fielddef.Name) == true ? en_cns[fielddef.Name].ToString() : fielddef.Name;
- field.Type = fielddef.Type;
- field.Width = fielddef.Width;
- field.Precision = fielddef.Precision;
- bool res = newFeatureDataset.AddField(field);
- }
- newFeatureDataset.Save();
- }
- return newFeatureDataset;
- }
-
- private void pipelineTypeCbo_SelectedIndexChanged(object sender, EventArgs e)
- {
- if ((pipelineTypeCbo.Text != "给水") && (pipelineTypeCbo.Text != "天然气") &&
- (pipelineTypeCbo.Text != "燃气") && (pipelineTypeCbo.Text != "中水"))
- {
- cmbReference.Text = "管底";
- }
- else
- {
- cmbReference.Text = "管顶";
- }
-
- if (pipelineTypeCbo.Text == "给水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 255);
- }
- else if (pipelineTypeCbo.Text == "供电")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 100, 150);
- }
- else if (pipelineTypeCbo.Text == "雨水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(230, 120, 0);
- }
- else if (pipelineTypeCbo.Text == "污水")
- {
- btnPipelineColor.BackColor = Color.FromArgb(128, 64, 0);
- }
- else if (pipelineTypeCbo.Text == "天然气")
- {
- btnPipelineColor.BackColor = Color.FromArgb(215, 0, 64);
- }
- else if (pipelineTypeCbo.Text == "共通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "电通")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "有线电视")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "监控")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "交通信号")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else if (pipelineTypeCbo.Text == "路灯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(255, 0, 150);
- }
- else if (pipelineTypeCbo.Text == "通讯")
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 255, 0);
- }
- else
- {
- btnPipelineColor.BackColor = Color.FromArgb(0, 0, 0);
- }
- }
-
- private object convertFieldValue(string fieldname, object obj)
- {
- if (obj == null)
- return null;
-
- try
- {
- string type = fields_types[fieldname].ToString();
- switch (type)
- {
- case "string":
- return obj.ToString();
- case "int":
- //return 101;
- int intResult;
- if (int.TryParse(obj.ToString(), out intResult))
- return intResult;
- else
- return null;
- case "double":
- //return 202.5;
- double doubleResult;
- if (double.TryParse(obj.ToString(), out doubleResult))
- return doubleResult;
- else
- return null;
- case "date":
- DateTime dtResult;
- if (DateTime.TryParse(obj.ToString(), out dtResult))
- return dtResult;
- else
- return null;
- }
- return null;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- return null;
- }
- }
-
- ///
- /// 验证shp格式文件
- ///
- ///
- ///
- private string valiPipeData(GSOLayer layer) //验证shp格式文件
- {
- 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 (fields_types.ContainsKey(fieldName))
- {
- string fieldType = fields_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("Deep1"))
- {
- txtMessage += "Deep1字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep1");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep1字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Deep2"))
- {
- txtMessage += "Deep2字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Deep2");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Deep2字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Diameter"))
- {
- txtMessage += "Diameter字段不存在!\r\n";
- }
- else
- {
- GSOFieldAttr fieldDeep1 = featDataSet.GetField("Diameter");
- if (fieldDeep1.Type != EnumFieldType.Double && fieldDeep1.Type != EnumFieldType.Float && fieldDeep1.Type != EnumFieldType.INT16 && fieldDeep1.Type != EnumFieldType.INT32)
- {
- txtMessage += "Diameter字段必须为数值类型\r\n";
- }
- }
- if (!lstField.Contains("Handle"))
- {
- txtMessage += "Handle字段不存在!\r\n";
- }
- List lstHandle = new List();
- 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 (fields_types.ContainsKey(fieldName))
- {
- if (f.GetValue(fieldName).ToString().Trim().Length > 8000)
- {
- txtMessage += "ID为" + f.ID + "的要素的字段" + fieldName + "的长度大于8000 !\r\n";
- }
- }
- }
- if (f.GetFieldAsFloat("Diameter") <= 0)
- {
- txtMessage += "ID为" + f.ID + "\"Diameter\"字段中的值必须大于0 \r\n";
- }
- if (!lstHandle.Contains(f.GetFieldAsString("Handle")))
- {
- lstHandle.Add(f.GetFieldAsString("Handle"));
- }
- else
- {
- txtMessage += "ID为" + f.ID + "的\"Handle\"字段中的值重复\r\n";
- }
- }
- }
- return txtMessage;
- }
-
- }
-}
\ No newline at end of file
diff --git a/FrmMultiPipelineModelDB.resx b/FrmMultiPipelineModelDB.resx
deleted file mode 100644
index 1d40cb6..0000000
--- a/FrmMultiPipelineModelDB.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
-
-
- 156, 16
-
-
- 25
-
-
\ No newline at end of file
diff --git a/MainFrm.cs b/MainFrm.cs
index 30a34a5..8e37fde 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -6324,9 +6324,6 @@
buttonItemSH4.Checked = globeControl1.Globe.StatusBar.Visible;
globeControl1.Globe.Refresh();
}
-
-
-
///
/// 添加指定路径下的数据 功能
///
@@ -6368,7 +6365,6 @@
node.SelectedImageIndex = 0;
node.Checked = terrain.Visible;
// 注意用insert不要用add,因为后加入的图层在上层
- // terrainManagerNode.Nodes.Add(node);
layerManagerNode.Nodes.Insert(0, node);
}
newlayername = terrain.Caption;
@@ -8386,9 +8382,6 @@
}
}
}
-
-
-
///
/// 管线自动缩进 菜单
///
@@ -8399,71 +8392,6 @@
FrmPipelineIndented frm = new FrmPipelineIndented(globeControl1, m_PipelineLayerNames, workwellLayerNames);
frm.ShowDialog(this);
}
-
- private void btnExportCADs_Click(object sender, EventArgs e)
- {
-
- }
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 统计指定图层在指定范围内的所有feature对象
///
@@ -8576,17 +8504,19 @@
try
{
-
string dbIp = Utility.sgdbip;
string database = Utility.sgdbname;
string user = Utility.sgdbuser;
string pass = Utility.sgdbpwd;
- shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "", user, pass);
+ shds = globeControl1.Globe.DataManager.OpenOracleDataSource(dbIp + "/" + database, "", "",
+ user, pass);
if (shds == null)
{
MessageBox.Show("数据库连接失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+
+ //Cyberpipe.Forms.FrmPipelineModelDataOneStep frm = new Cyberpipe.Forms.FrmPipelineModelDataOneStep(globeControl1, shds, layerTree);
+ Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -8598,7 +8528,6 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
}
///
@@ -11196,137 +11125,6 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
///
/// 数据质量检查
///
@@ -12463,7 +12261,6 @@
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
//zhanshi = false;
@@ -12646,231 +12443,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
-
private void btn_check_history_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_check_history.Text);
@@ -12973,18 +12545,6 @@
LogManager.saveLog(Utility.userName, this.btn_document_info.Text);
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //FormDocumentManager frm = new FormDocumentManager();
- //frm.ShowDialog();
-
- //if (FormDocumentManager.IS_OPEN)
- //{
- // return;
- //}
- //new FormDocumentManager().ShowDialog();
if (FormDocumentManager.IS_OPEN)
{
return;
@@ -13121,31 +12681,7 @@
FrmChangePassword frm = new FrmChangePassword();
frm.ShowDialog();
}
- ///
- /// 多孔管线入库
- ///
- ///
- ///
- private void buttonItem9_Click(object sender, EventArgs e)
- {
- //保存日志
- LogManager.saveLog(Utility.userName, this.buttonItemSJGL4_2.Text);
-
- if (ds == null)
- {
- MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- ConnectDB(null, null);
- }
- if (ds == null)
- return;
-
- FrmMultiPipelineModelDB frm = new FrmMultiPipelineModelDB(globeControl1, ds);
- if (frm.ShowDialog() == DialogResult.OK)
- {
- addNodeToLayerManagerNode(frm.rukuLayer);
- }
- //frm.Show();
- }
+
private void 导出CADToolStripMenuItem1_Click(object sender, EventArgs e)
{
TreeNode node = layerNodeContexMenu.Tag as TreeNode;
diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs
index 426beb3..fd0ef22 100644
--- a/MainFrm.designer.cs
+++ b/MainFrm.designer.cs
@@ -241,15 +241,6 @@
this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
- this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
- this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
- this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
- this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
- this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
- this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar();
this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem();
@@ -271,7 +262,6 @@
this.buttonItemSJGL4 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_1 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_2 = new DevComponents.DotNetBar.ButtonItem();
- this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL4_3 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL5 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemSJGL6 = new DevComponents.DotNetBar.ButtonItem();
@@ -419,6 +409,15 @@
this.buttonItemBZ9 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ10 = new DevComponents.DotNetBar.ButtonItem();
this.buttonItemBZ11 = new DevComponents.DotNetBar.ButtonItem();
+ this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel();
+ this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar();
+ this.btn_user_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_resc_info = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_role_resc = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem();
+ this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem();
+ this.buttonItemPasswordReset = new DevComponents.DotNetBar.ButtonItem();
this.ribbonPanel4 = new DevComponents.DotNetBar.RibbonPanel();
this.ribbonBar1 = new DevComponents.DotNetBar.RibbonBar();
this.btn_document_info = new DevComponents.DotNetBar.ButtonItem();
@@ -651,8 +650,8 @@
this.contextMenuStrip3.SuspendLayout();
this.contextMenuStripDeleteLayerNode.SuspendLayout();
this.ribbonControl1.SuspendLayout();
- this.ribbonPanel2.SuspendLayout();
this.ribbonPanel15.SuspendLayout();
+ this.ribbonPanel2.SuspendLayout();
this.ribbonPanel4.SuspendLayout();
this.ribbonPanel6.SuspendLayout();
this.ribbonPanel5.SuspendLayout();
@@ -841,7 +840,7 @@
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21);
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20);
this.toolStripDropDownButton1.Text = "帮助";
this.toolStripDropDownButton1.Visible = false;
//
@@ -2362,137 +2361,6 @@
this.ribbonControl1.Text = "ribbonControl1";
this.ribbonControl1.UseCustomizeDialog = false;
//
- // ribbonPanel2
- //
- this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonPanel2.Controls.Add(this.ribbonBar3);
- this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
- this.ribbonPanel2.Name = "ribbonPanel2";
- this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
- this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
- //
- //
- //
- this.ribbonPanel2.Style.Class = "";
- this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseDown.Class = "";
- this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonPanel2.StyleMouseOver.Class = "";
- this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonPanel2.TabIndex = 39;
- this.ribbonPanel2.Visible = false;
- //
- // ribbonBar3
- //
- this.ribbonBar3.AutoOverflowEnabled = true;
- //
- //
- //
- this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
- this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.BackgroundStyle.Class = "";
- this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.ContainerControlProcessDialogKey = true;
- this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
- this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
- this.btn_user_info,
- this.btn_role_info,
- this.btn_resc_info,
- this.btn_role_resc,
- this.btn_user_role,
- this.btn_password_edit,
- this.buttonItemPasswordReset});
- this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
- this.ribbonBar3.Name = "ribbonBar3";
- this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
- this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.ribbonBar3.TabIndex = 1;
- //
- //
- //
- this.ribbonBar3.TitleStyle.Class = "";
- this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- //
- //
- //
- this.ribbonBar3.TitleStyleMouseOver.Class = "";
- this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.ribbonBar3.TitleVisible = false;
- //
- // btn_user_info
- //
- this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
- this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_info.Name = "btn_user_info";
- this.btn_user_info.SubItemsExpandWidth = 14;
- this.btn_user_info.Text = "用户管理";
- this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
- //
- // btn_role_info
- //
- this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
- this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_info.Name = "btn_role_info";
- this.btn_role_info.SubItemsExpandWidth = 14;
- this.btn_role_info.Text = "角色管理";
- this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
- //
- // btn_resc_info
- //
- this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
- this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_resc_info.Name = "btn_resc_info";
- this.btn_resc_info.SubItemsExpandWidth = 14;
- this.btn_resc_info.Text = "资源管理";
- this.btn_resc_info.Visible = false;
- this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
- //
- // btn_role_resc
- //
- this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
- this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_role_resc.Name = "btn_role_resc";
- this.btn_role_resc.SubItemsExpandWidth = 14;
- this.btn_role_resc.Text = "角色授权";
- this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
- //
- // btn_user_role
- //
- this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
- this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_user_role.Name = "btn_user_role";
- this.btn_user_role.SubItemsExpandWidth = 14;
- this.btn_user_role.Text = "用户授权";
- this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
- //
- // btn_password_edit
- //
- this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
- this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.btn_password_edit.Name = "btn_password_edit";
- this.btn_password_edit.SubItemsExpandWidth = 14;
- this.btn_password_edit.Text = "密码修改";
- this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
- //
- // buttonItemPasswordReset
- //
- this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
- this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
- this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
- this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
- this.buttonItemPasswordReset.Text = "重置密码";
- this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
- //
// ribbonPanel15
//
this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -2549,7 +2417,7 @@
this.buttonItemBZ});
this.ribbonBar20.Location = new System.Drawing.Point(3, 0);
this.ribbonBar20.Name = "ribbonBar20";
- this.ribbonBar20.Size = new System.Drawing.Size(814, 59);
+ this.ribbonBar20.Size = new System.Drawing.Size(785, 59);
this.ribbonBar20.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.ribbonBar20.TabIndex = 0;
//
@@ -2711,7 +2579,6 @@
this.buttonItemSJGL4.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.buttonItemSJGL4_1,
this.buttonItemSJGL4_2,
- this.buttonItem9,
this.buttonItemSJGL4_3});
this.buttonItemSJGL4.Text = "数据批量入库";
//
@@ -2727,12 +2594,6 @@
this.buttonItemSJGL4_2.Text = "线矢量入库";
this.buttonItemSJGL4_2.Click += new System.EventHandler(this.buttonItemSJGL4_2_Click);
//
- // buttonItem9
- //
- this.buttonItem9.Name = "buttonItem9";
- this.buttonItem9.Text = "多孔入库";
- this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click);
- //
// buttonItemSJGL4_3
//
this.buttonItemSJGL4_3.Name = "buttonItemSJGL4_3";
@@ -3869,6 +3730,137 @@
this.buttonItemBZ11.Text = "标注管理";
this.buttonItemBZ11.Click += new System.EventHandler(this.buttonItemBZ11_Click);
//
+ // ribbonPanel2
+ //
+ this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonPanel2.Controls.Add(this.ribbonBar3);
+ this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ribbonPanel2.Location = new System.Drawing.Point(0, 33);
+ this.ribbonPanel2.Name = "ribbonPanel2";
+ this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
+ this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62);
+ //
+ //
+ //
+ this.ribbonPanel2.Style.Class = "";
+ this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseDown.Class = "";
+ this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel2.StyleMouseOver.Class = "";
+ this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonPanel2.TabIndex = 39;
+ this.ribbonPanel2.Visible = false;
+ //
+ // ribbonBar3
+ //
+ this.ribbonBar3.AutoOverflowEnabled = true;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundMouseOverStyle.Class = "";
+ this.ribbonBar3.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.BackgroundStyle.Class = "";
+ this.ribbonBar3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.ContainerControlProcessDialogKey = true;
+ this.ribbonBar3.Dock = System.Windows.Forms.DockStyle.Left;
+ this.ribbonBar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
+ this.btn_user_info,
+ this.btn_role_info,
+ this.btn_resc_info,
+ this.btn_role_resc,
+ this.btn_user_role,
+ this.btn_password_edit,
+ this.buttonItemPasswordReset});
+ this.ribbonBar3.Location = new System.Drawing.Point(3, 0);
+ this.ribbonBar3.Name = "ribbonBar3";
+ this.ribbonBar3.Size = new System.Drawing.Size(551, 59);
+ this.ribbonBar3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonBar3.TabIndex = 1;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyle.Class = "";
+ this.ribbonBar3.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar3.TitleStyleMouseOver.Class = "";
+ this.ribbonBar3.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar3.TitleVisible = false;
+ //
+ // btn_user_info
+ //
+ this.btn_user_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_info.Image")));
+ this.btn_user_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_info.Name = "btn_user_info";
+ this.btn_user_info.SubItemsExpandWidth = 14;
+ this.btn_user_info.Text = "用户管理";
+ this.btn_user_info.Click += new System.EventHandler(this.btn_user_info_Click);
+ //
+ // btn_role_info
+ //
+ this.btn_role_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_info.Image")));
+ this.btn_role_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_info.Name = "btn_role_info";
+ this.btn_role_info.SubItemsExpandWidth = 14;
+ this.btn_role_info.Text = "角色管理";
+ this.btn_role_info.Click += new System.EventHandler(this.btn_role_info_Click);
+ //
+ // btn_resc_info
+ //
+ this.btn_resc_info.Image = ((System.Drawing.Image)(resources.GetObject("btn_resc_info.Image")));
+ this.btn_resc_info.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_resc_info.Name = "btn_resc_info";
+ this.btn_resc_info.SubItemsExpandWidth = 14;
+ this.btn_resc_info.Text = "资源管理";
+ this.btn_resc_info.Visible = false;
+ this.btn_resc_info.Click += new System.EventHandler(this.btn_resc_info_Click);
+ //
+ // btn_role_resc
+ //
+ this.btn_role_resc.Image = ((System.Drawing.Image)(resources.GetObject("btn_role_resc.Image")));
+ this.btn_role_resc.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_role_resc.Name = "btn_role_resc";
+ this.btn_role_resc.SubItemsExpandWidth = 14;
+ this.btn_role_resc.Text = "角色授权";
+ this.btn_role_resc.Click += new System.EventHandler(this.btn_role_resc_Click);
+ //
+ // btn_user_role
+ //
+ this.btn_user_role.Image = ((System.Drawing.Image)(resources.GetObject("btn_user_role.Image")));
+ this.btn_user_role.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_user_role.Name = "btn_user_role";
+ this.btn_user_role.SubItemsExpandWidth = 14;
+ this.btn_user_role.Text = "用户授权";
+ this.btn_user_role.Click += new System.EventHandler(this.btn_user_role_Click);
+ //
+ // btn_password_edit
+ //
+ this.btn_password_edit.Image = ((System.Drawing.Image)(resources.GetObject("btn_password_edit.Image")));
+ this.btn_password_edit.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.btn_password_edit.Name = "btn_password_edit";
+ this.btn_password_edit.SubItemsExpandWidth = 14;
+ this.btn_password_edit.Text = "密码修改";
+ this.btn_password_edit.Click += new System.EventHandler(this.btn_password_edit_Click);
+ //
+ // buttonItemPasswordReset
+ //
+ this.buttonItemPasswordReset.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemPasswordReset.Image")));
+ this.buttonItemPasswordReset.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+ this.buttonItemPasswordReset.Name = "buttonItemPasswordReset";
+ this.buttonItemPasswordReset.SubItemsExpandWidth = 14;
+ this.buttonItemPasswordReset.Text = "重置密码";
+ this.buttonItemPasswordReset.Click += new System.EventHandler(this.buttonItemPasswordReset_Click);
+ //
// ribbonPanel4
//
this.ribbonPanel4.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -5522,7 +5514,7 @@
this.dataGridViewX2.ReadOnly = true;
this.dataGridViewX2.RowHeadersVisible = false;
this.dataGridViewX2.RowTemplate.Height = 23;
- this.dataGridViewX2.Size = new System.Drawing.Size(20389, 92);
+ this.dataGridViewX2.Size = new System.Drawing.Size(20983, 92);
this.dataGridViewX2.TabIndex = 11;
//
// dataGridViewTextBoxColumn10
@@ -5616,7 +5608,7 @@
this.dataGridViewX3.ReadOnly = true;
this.dataGridViewX3.RowHeadersVisible = false;
this.dataGridViewX3.RowTemplate.Height = 23;
- this.dataGridViewX3.Size = new System.Drawing.Size(20388, 127);
+ this.dataGridViewX3.Size = new System.Drawing.Size(20982, 127);
this.dataGridViewX3.TabIndex = 5;
this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick);
//
@@ -5874,7 +5866,7 @@
this.dataGridViewX8.ReadOnly = true;
this.dataGridViewX8.RowHeadersVisible = false;
this.dataGridViewX8.RowTemplate.Height = 23;
- this.dataGridViewX8.Size = new System.Drawing.Size(125, 92);
+ this.dataGridViewX8.Size = new System.Drawing.Size(91, 92);
this.dataGridViewX8.TabIndex = 11;
//
// dataGridViewTextBoxColumn12
@@ -5969,7 +5961,7 @@
this.dataGridViewX9.ReadOnly = true;
this.dataGridViewX9.RowHeadersVisible = false;
this.dataGridViewX9.RowTemplate.Height = 23;
- this.dataGridViewX9.Size = new System.Drawing.Size(124, 127);
+ this.dataGridViewX9.Size = new System.Drawing.Size(90, 127);
this.dataGridViewX9.TabIndex = 5;
this.dataGridViewX9.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX9_MouseDoubleClick);
//
@@ -6834,8 +6826,8 @@
this.contextMenuStripDeleteLayerNode.ResumeLayout(false);
this.ribbonControl1.ResumeLayout(false);
this.ribbonControl1.PerformLayout();
- this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel15.ResumeLayout(false);
+ this.ribbonPanel2.ResumeLayout(false);
this.ribbonPanel4.ResumeLayout(false);
this.ribbonPanel6.ResumeLayout(false);
this.ribbonPanel5.ResumeLayout(false);
@@ -7328,7 +7320,6 @@
private System.Windows.Forms.ToolStripMenuItem 定位ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem LayerFlyMenuItem;
private DevComponents.DotNetBar.ButtonItem btn_password_edit;
- private DevComponents.DotNetBar.ButtonItem buttonItem9;
private System.Windows.Forms.ToolStripMenuItem 导出CADToolStripMenuItem1;
private DevComponents.DotNetBar.ButtonItem buttonItemGBJC;
private System.Windows.Forms.ContextMenuStrip RightScreenToolMenu;
diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe
index 924ae08..e7980a2 100644
--- a/bin/x86/Debug/Cyberpipe.exe
+++ b/bin/x86/Debug/Cyberpipe.exe
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.pdb b/bin/x86/Debug/Cyberpipe.pdb
index a87794a..4935fa1 100644
--- a/bin/x86/Debug/Cyberpipe.pdb
+++ b/bin/x86/Debug/Cyberpipe.pdb
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.vshost.exe.manifest b/bin/x86/Debug/Cyberpipe.vshost.exe.manifest
deleted file mode 100644
index 061c9ca..0000000
--- a/bin/x86/Debug/Cyberpipe.vshost.exe.manifest
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bin/x86/Debug/log.txt b/bin/x86/Debug/log.txt
index 0849c66..5603359 100644
--- a/bin/x86/Debug/log.txt
+++ b/bin/x86/Debug/log.txt
@@ -699,3 +699,179 @@
exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 16:31:34---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Void comboBoxExLayer_SelectedIndexChanged(System.Object, System.EventArgs)
+
+ e.StackTrace: 在 Cyberpipe.Forms.FrmPipelineModelDB.comboBoxExLayer_SelectedIndexChanged(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 210
+ 在 System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
+ 在 DevComponents.DotNetBar.Controls.ComboBoxEx.OnSelectedIndexChanged(EventArgs e)
+ 在 System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.buttonOpen_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 336
+ 在 DevComponents.DotNetBar.ButtonX.OnClick(EventArgs e)
+ 在 DevComponents.DotNetBar.ButtonX.OnMouseUp(MouseEventArgs e)
+ 在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
+ 在 System.Windows.Forms.Control.WndProc(Message& m)
+ 在 DevComponents.DotNetBar.PopupItemControl.WndProc(Message& m)
+ 在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
+ 在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
+ 在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
+ 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
+ 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
+ 在 System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
+ 在 Cyberpipe.MainFrm.buttonItem127_Click_2(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\MainFrm.cs:行号 8524
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 17:58:23---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:11:21---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:12:13---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:12:33---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:12:43---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:12:53---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:13:31---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
+
+ exception begin -----------------2016/11/7 18:16:04---------------------
+
+
+
+ e.Message:未将对象引用设置到对象的实例。
+
+ e.Source:Cyberpipe
+
+ e.TargetSite:Boolean doBuild(Cyberpipe.EnumUpdateMode, Cyberpipe.EnumBuildMode, Cyberpipe.BaseParam)
+
+ e.StackTrace: 在 Cyberpipe.LineBuilder.doBuild(EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\LineBuilder.cs:行号 37
+ 在 Cyberpipe.ModelBuilder.build(GSOLayer layer, EnumUpdateMode updateMode, EnumBuildMode buildMode, BaseParam param) 位置 D:\GHFX\GHFX_REFACTOR\ModelBuilder.cs:行号 55
+ 在 Cyberpipe.Forms.FrmPipelineModelDB.btnCreateModel_Click(Object sender, EventArgs e) 位置 D:\GHFX\GHFX_REFACTOR\Forms\FrmPipelineModelDataBase.cs:行号 132
+
+
+
+ exception over ------------------------------------------------------------
diff --git a/bin/x86/Debug/log/2016/201611/20161107.txt b/bin/x86/Debug/log/2016/201611/20161107.txt
index 883d0b7..cd32fa6 100644
--- a/bin/x86/Debug/log/2016/201611/20161107.txt
+++ b/bin/x86/Debug/log/2016/201611/20161107.txt
@@ -86,3 +86,67 @@
�����ࣺCyberpipe.Forms.FrmPipelineModelDB property: [(null)] -
����������δ�������������õ������ʵ����
+
+
+��¼ʱ�䣺2016-11-07 17:58:24,384
+�߳�ID:[10]
+��־���� ERROR
+�����ࣺCyberpipe.Forms.FrmPipelineModelDB property: [(null)] -
+����������δ�������������õ������ʵ����
+
+
+
+��¼ʱ�䣺2016-11-07 18:11:22,114
+�߳�ID:[8]
+��־���� ERROR
+�����ࣺCyberpipe.Forms.FrmPipelineModelDB property: [(null)] -
+����������δ�������������õ������ʵ����
+
+
+
+��¼ʱ�䣺2016-11-07 18:12:13,619
+�߳�ID:[8]
+��־���� ERROR
+�����ࣺCyberpipe.Forms.FrmPipelineModelDB property: [(null)] -
+����������δ�������������õ������ʵ����
+
+
+
+��¼ʱ�䣺2016-11-07 18:12:33,268
+�߳�ID:[8]
+��־���� ERROR
+�����ࣺCyberpipe.Forms.FrmPipelineModelDB property: [(null)] -
+����������δ�������������õ������ʵ����
+
+
+
+��¼ʱ�䣺2016-11-07 18:12:43,628
+�߳�ID:[8]
+��־���� ERROR
+�����ࣺCyberpipe.Forms.FrmPipelineModelDB property: [(null)] -
+����������δ�������������õ������ʵ����
+
+
+
+��¼ʱ�䣺2016-11-07 18:12:53,488
+�߳�ID:[8]
+��־���� ERROR
+�����ࣺCyberpipe.Forms.FrmPipelineModelDB property: [(null)] -
+����������δ�������������õ������ʵ����
+
+
+
+��¼ʱ�䣺2016-11-07 18:13:31,996
+�߳�ID:[8]
+��־���� ERROR
+�����ࣺCyberpipe.Forms.FrmPipelineModelDB property: [(null)] -
+����������δ�������������õ������ʵ����
+
+
+
+��¼ʱ�䣺2016-11-07 18:16:05,234
+�߳�ID:[9]
+��־���� ERROR
+�����ࣺCyberpipe.Forms.FrmPipelineModelDB property: [(null)] -
+����������δ�������������õ������ʵ����
+