📄 sdeadmin.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.MapControl;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.DataSourcesGDB;
using System.Xml;
namespace EngineData
{
/// <summary>
/// SdeAdmin 的摘要说明。
/// </summary>
public class SdeAdmin : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TreeView treeView1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
public System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
private ILayer layer;
public IWorkspace ws;
private IVersionedWorkspace pVersionWorkspace;
private IVersion pVersion;
private SdeConn sdeconn;
private ESRI.ArcGIS.MapControl.AxMapControl mapControl;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public SdeAdmin(ILayer layer,ESRI.ArcGIS.MapControl.AxMapControl mapControl)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.layer = layer;
this.mapControl = mapControl;
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button5 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.radioButton3 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.treeView1 = new System.Windows.Forms.TreeView();
this.button6 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button5);
this.groupBox1.Controls.Add(this.button4);
this.groupBox1.Controls.Add(this.button3);
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.richTextBox1);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.treeView1);
this.groupBox1.Location = new System.Drawing.Point(8, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(456, 320);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "版本管理";
//
// button5
//
this.button5.Location = new System.Drawing.Point(368, 288);
this.button5.Name = "button5";
this.button5.TabIndex = 13;
this.button5.Text = "新建连接";
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(288, 288);
this.button4.Name = "button4";
this.button4.TabIndex = 12;
this.button4.Text = "打开连接";
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button3
//
this.button3.Enabled = false;
this.button3.Location = new System.Drawing.Point(400, 248);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(48, 23);
this.button3.TabIndex = 11;
this.button3.Text = "删除";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button2
//
this.button2.Enabled = false;
this.button2.Location = new System.Drawing.Point(344, 248);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(48, 23);
this.button2.TabIndex = 10;
this.button2.Text = "修改";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.Enabled = false;
this.button1.Location = new System.Drawing.Point(288, 248);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(48, 24);
this.button1.TabIndex = 9;
this.button1.Text = "创建";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label4
//
this.label4.Location = new System.Drawing.Point(288, 224);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(160, 16);
this.label4.TabIndex = 8;
//
// richTextBox1
//
this.richTextBox1.Location = new System.Drawing.Point(288, 64);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(160, 32);
this.richTextBox1.TabIndex = 7;
this.richTextBox1.Text = "";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(352, 16);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(96, 21);
this.textBox1.TabIndex = 6;
this.textBox1.Text = "";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.radioButton3);
this.groupBox2.Controls.Add(this.radioButton2);
this.groupBox2.Controls.Add(this.radioButton1);
this.groupBox2.Location = new System.Drawing.Point(288, 104);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(160, 88);
this.groupBox2.TabIndex = 5;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "版本访问";
//
// radioButton3
//
this.radioButton3.Location = new System.Drawing.Point(8, 64);
this.radioButton3.Name = "radioButton3";
this.radioButton3.Size = new System.Drawing.Size(104, 15);
this.radioButton3.TabIndex = 2;
this.radioButton3.Text = "Public";
//
// radioButton2
//
this.radioButton2.Location = new System.Drawing.Point(8, 40);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(104, 15);
this.radioButton2.TabIndex = 1;
this.radioButton2.Text = "Protected";
//
// radioButton1
//
this.radioButton1.Checked = true;
this.radioButton1.Location = new System.Drawing.Point(8, 17);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(104, 15);
this.radioButton1.TabIndex = 0;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "Private";
//
// label3
//
this.label3.Location = new System.Drawing.Point(288, 200);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(160, 16);
this.label3.TabIndex = 4;
//
// label2
//
this.label2.Location = new System.Drawing.Point(288, 48);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 16);
this.label2.TabIndex = 3;
this.label2.Text = "版本描述:";
//
// label1
//
this.label1.Location = new System.Drawing.Point(288, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 16);
this.label1.TabIndex = 2;
this.label1.Text = "版本名称:";
//
// treeView1
//
this.treeView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.treeView1.ImageIndex = -1;
this.treeView1.Location = new System.Drawing.Point(8, 16);
this.treeView1.Name = "treeView1";
this.treeView1.SelectedImageIndex = -1;
this.treeView1.Size = new System.Drawing.Size(264, 296);
this.treeView1.TabIndex = 1;
this.treeView1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.treeView1_MouseDown);
//
// button6
//
this.button6.Location = new System.Drawing.Point(272, 336);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(56, 23);
this.button6.TabIndex = 2;
this.button6.Text = "确 定";
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// button7
//
this.button7.Enabled = false;
this.button7.Location = new System.Drawing.Point(336, 336);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(56, 23);
this.button7.TabIndex = 3;
this.button7.Text = "应 用";
//
// button8
//
this.button8.Location = new System.Drawing.Point(400, 336);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(56, 23);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -