📄 form_sde.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.MapControl;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.DataSourcesGDB;
namespace Cstest1.WindowsForm
{
/// <summary>
/// Form_SDE 的摘要说明。
/// </summary>
public class Form_SDE : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label_ServerName;
private System.Windows.Forms.Label label_InstanceName;
private System.Windows.Forms.Label label_DatabaseName;
private System.Windows.Forms.TextBox textBox_Server;
private System.Windows.Forms.TextBox textBox_Database;
private System.Windows.Forms.TextBox textBox_Instance;
private System.Windows.Forms.GroupBox groupBox_User;
private System.Windows.Forms.Label label_UserName;
private System.Windows.Forms.Label label_Password;
private System.Windows.Forms.TextBox textBox_User;
private System.Windows.Forms.TextBox textBox_Password;
private System.Windows.Forms.Button button_Enter;
private System.Windows.Forms.Button button_Cancel;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.GroupBox groupBox_Results;
private System.Windows.Forms.Button button_LoadFile;
private System.Windows.Forms.ListBox listBox_DataFiles;
public ESRI.ArcGIS.MapControl.AxMapControl m_MapControl;
private System.Windows.Forms.Label label_Version;
private System.Windows.Forms.TextBox textBox_Version;
IWorkspace m_SdeWorkSpace;
public Form_SDE(ESRI.ArcGIS.MapControl.AxMapControl m_MainMap)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
m_MapControl=m_MainMap;
}
/// <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.label_ServerName = new System.Windows.Forms.Label();
this.label_InstanceName = new System.Windows.Forms.Label();
this.label_DatabaseName = new System.Windows.Forms.Label();
this.textBox_Server = new System.Windows.Forms.TextBox();
this.textBox_Database = new System.Windows.Forms.TextBox();
this.textBox_Instance = new System.Windows.Forms.TextBox();
this.groupBox_User = new System.Windows.Forms.GroupBox();
this.textBox_Password = new System.Windows.Forms.TextBox();
this.textBox_User = new System.Windows.Forms.TextBox();
this.label_Password = new System.Windows.Forms.Label();
this.label_UserName = new System.Windows.Forms.Label();
this.button_Enter = new System.Windows.Forms.Button();
this.button_Cancel = new System.Windows.Forms.Button();
this.groupBox_Results = new System.Windows.Forms.GroupBox();
this.listBox_DataFiles = new System.Windows.Forms.ListBox();
this.button_LoadFile = new System.Windows.Forms.Button();
this.label_Version = new System.Windows.Forms.Label();
this.textBox_Version = new System.Windows.Forms.TextBox();
this.groupBox_User.SuspendLayout();
this.groupBox_Results.SuspendLayout();
this.SuspendLayout();
//
// label_ServerName
//
this.label_ServerName.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label_ServerName.Location = new System.Drawing.Point(8, 16);
this.label_ServerName.Name = "label_ServerName";
this.label_ServerName.Size = new System.Drawing.Size(64, 24);
this.label_ServerName.TabIndex = 0;
this.label_ServerName.Text = "服务器:";
//
// label_InstanceName
//
this.label_InstanceName.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label_InstanceName.Location = new System.Drawing.Point(8, 48);
this.label_InstanceName.Name = "label_InstanceName";
this.label_InstanceName.Size = new System.Drawing.Size(64, 24);
this.label_InstanceName.TabIndex = 1;
this.label_InstanceName.Text = "实例名:";
//
// label_DatabaseName
//
this.label_DatabaseName.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label_DatabaseName.Location = new System.Drawing.Point(8, 80);
this.label_DatabaseName.Name = "label_DatabaseName";
this.label_DatabaseName.Size = new System.Drawing.Size(64, 24);
this.label_DatabaseName.TabIndex = 2;
this.label_DatabaseName.Text = "数据库:";
//
// textBox_Server
//
this.textBox_Server.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox_Server.Location = new System.Drawing.Point(72, 8);
this.textBox_Server.Name = "textBox_Server";
this.textBox_Server.Size = new System.Drawing.Size(144, 23);
this.textBox_Server.TabIndex = 3;
this.textBox_Server.Text = "";
this.textBox_Server.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_Server_KeyPress);
//
// textBox_Database
//
this.textBox_Database.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox_Database.Location = new System.Drawing.Point(72, 72);
this.textBox_Database.Name = "textBox_Database";
this.textBox_Database.Size = new System.Drawing.Size(144, 23);
this.textBox_Database.TabIndex = 4;
this.textBox_Database.Text = "";
this.textBox_Database.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_Database_KeyPress);
//
// textBox_Instance
//
this.textBox_Instance.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox_Instance.Location = new System.Drawing.Point(72, 40);
this.textBox_Instance.Name = "textBox_Instance";
this.textBox_Instance.Size = new System.Drawing.Size(144, 23);
this.textBox_Instance.TabIndex = 5;
this.textBox_Instance.Text = "";
this.textBox_Instance.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_Instance_KeyPress);
//
// groupBox_User
//
this.groupBox_User.Controls.Add(this.textBox_Password);
this.groupBox_User.Controls.Add(this.textBox_User);
this.groupBox_User.Controls.Add(this.label_Password);
this.groupBox_User.Controls.Add(this.label_UserName);
this.groupBox_User.Location = new System.Drawing.Point(0, 144);
this.groupBox_User.Name = "groupBox_User";
this.groupBox_User.Size = new System.Drawing.Size(224, 80);
this.groupBox_User.TabIndex = 6;
this.groupBox_User.TabStop = false;
this.groupBox_User.Text = "用户登录";
//
// textBox_Password
//
this.textBox_Password.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox_Password.Location = new System.Drawing.Point(72, 40);
this.textBox_Password.Name = "textBox_Password";
this.textBox_Password.PasswordChar = '*';
this.textBox_Password.Size = new System.Drawing.Size(144, 23);
this.textBox_Password.TabIndex = 6;
this.textBox_Password.Text = "";
this.textBox_Password.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_Password_KeyPress);
//
// textBox_User
//
this.textBox_User.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox_User.Location = new System.Drawing.Point(72, 16);
this.textBox_User.Name = "textBox_User";
this.textBox_User.Size = new System.Drawing.Size(144, 23);
this.textBox_User.TabIndex = 5;
this.textBox_User.Text = "";
this.textBox_User.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_User_KeyPress);
//
// label_Password
//
this.label_Password.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label_Password.Location = new System.Drawing.Point(8, 48);
this.label_Password.Name = "label_Password";
this.label_Password.Size = new System.Drawing.Size(64, 24);
this.label_Password.TabIndex = 2;
this.label_Password.Text = "密 码:";
//
// label_UserName
//
this.label_UserName.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label_UserName.Location = new System.Drawing.Point(8, 24);
this.label_UserName.Name = "label_UserName";
this.label_UserName.Size = new System.Drawing.Size(64, 24);
this.label_UserName.TabIndex = 1;
this.label_UserName.Text = "用户名:";
//
// button_Enter
//
this.button_Enter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.button_Enter.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button_Enter.Location = new System.Drawing.Point(104, 232);
this.button_Enter.Name = "button_Enter";
this.button_Enter.Size = new System.Drawing.Size(48, 32);
this.button_Enter.TabIndex = 7;
this.button_Enter.Text = "确定";
this.button_Enter.Click += new System.EventHandler(this.button_Enter_Click);
//
// button_Cancel
//
this.button_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -