📄 form1.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using BVA.ActiveDirectory;
namespace TesteAD
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
#region Constructor
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
#endregion
#region Required Components
private System.Windows.Forms.TreeView trvAD;
private System.Windows.Forms.Label lblAdDomain;
private System.Windows.Forms.TextBox txtAdDomain;
private System.Windows.Forms.TextBox txtAdUser;
private System.Windows.Forms.Label lblAdUser;
private System.Windows.Forms.TextBox txtAdPass;
private System.Windows.Forms.Label lblAdPass;
private System.Windows.Forms.Button btnLoadTree;
private System.Windows.Forms.GroupBox separator;
private System.Windows.Forms.GroupBox grpDetails;
private System.Windows.Forms.TextBox txtObjectType;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
public System.Windows.Forms.StatusBarPanel statusBarQueryTime;
public System.Windows.Forms.StatusBarPanel otherStatusBar;
private System.Windows.Forms.StatusBar statusBar;
private System.Windows.Forms.CheckBox chkEnabled;
private System.Windows.Forms.TextBox txtEmail;
private System.Windows.Forms.TextBox txtName;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
#endregion
#region Required Overrides
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.trvAD = new System.Windows.Forms.TreeView();
this.lblAdDomain = new System.Windows.Forms.Label();
this.txtAdDomain = new System.Windows.Forms.TextBox();
this.txtAdUser = new System.Windows.Forms.TextBox();
this.lblAdUser = new System.Windows.Forms.Label();
this.txtAdPass = new System.Windows.Forms.TextBox();
this.lblAdPass = new System.Windows.Forms.Label();
this.btnLoadTree = new System.Windows.Forms.Button();
this.separator = new System.Windows.Forms.GroupBox();
this.grpDetails = new System.Windows.Forms.GroupBox();
this.chkEnabled = new System.Windows.Forms.CheckBox();
this.txtEmail = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtObjectType = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.statusBar = new System.Windows.Forms.StatusBar();
this.statusBarQueryTime = new System.Windows.Forms.StatusBarPanel();
this.otherStatusBar = new System.Windows.Forms.StatusBarPanel();
this.grpDetails.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.statusBarQueryTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.otherStatusBar)).BeginInit();
this.SuspendLayout();
//
// trvAD
//
this.trvAD.ImageIndex = -1;
this.trvAD.Location = new System.Drawing.Point(8, 48);
this.trvAD.Name = "trvAD";
this.trvAD.SelectedImageIndex = -1;
this.trvAD.Size = new System.Drawing.Size(256, 240);
this.trvAD.TabIndex = 0;
this.trvAD.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.trvAD_AfterSelect);
//
// lblAdDomain
//
this.lblAdDomain.AutoSize = true;
this.lblAdDomain.Location = new System.Drawing.Point(8, 8);
this.lblAdDomain.Name = "lblAdDomain";
this.lblAdDomain.Size = new System.Drawing.Size(65, 16);
this.lblAdDomain.TabIndex = 1;
this.lblAdDomain.Text = "AD Domain:";
//
// txtAdDomain
//
this.txtAdDomain.Location = new System.Drawing.Point(72, 6);
this.txtAdDomain.Name = "txtAdDomain";
this.txtAdDomain.TabIndex = 2;
this.txtAdDomain.Text = "";
//
// txtAdUser
//
this.txtAdUser.Location = new System.Drawing.Point(240, 6);
this.txtAdUser.Name = "txtAdUser";
this.txtAdUser.TabIndex = 4;
this.txtAdUser.Text = "";
//
// lblAdUser
//
this.lblAdUser.AutoSize = true;
this.lblAdUser.Location = new System.Drawing.Point(184, 8);
this.lblAdUser.Name = "lblAdUser";
this.lblAdUser.Size = new System.Drawing.Size(50, 16);
this.lblAdUser.TabIndex = 3;
this.lblAdUser.Text = "AD User:";
//
// txtAdPass
//
this.txtAdPass.Location = new System.Drawing.Point(408, 6);
this.txtAdPass.Name = "txtAdPass";
this.txtAdPass.PasswordChar = '*';
this.txtAdPass.TabIndex = 6;
this.txtAdPass.Text = "";
//
// lblAdPass
//
this.lblAdPass.AutoSize = true;
this.lblAdPass.Location = new System.Drawing.Point(352, 8);
this.lblAdPass.Name = "lblAdPass";
this.lblAdPass.Size = new System.Drawing.Size(51, 16);
this.lblAdPass.TabIndex = 5;
this.lblAdPass.Text = "AD Pass:";
//
// btnLoadTree
//
this.btnLoadTree.Location = new System.Drawing.Point(520, 4);
this.btnLoadTree.Name = "btnLoadTree";
this.btnLoadTree.Size = new System.Drawing.Size(160, 24);
this.btnLoadTree.TabIndex = 7;
this.btnLoadTree.Text = "Load Tree";
this.btnLoadTree.Click += new System.EventHandler(this.btnLoadTree_Click);
//
// separator
//
this.separator.Location = new System.Drawing.Point(8, 32);
this.separator.Name = "separator";
this.separator.Size = new System.Drawing.Size(672, 8);
this.separator.TabIndex = 8;
this.separator.TabStop = false;
//
// grpDetails
//
this.grpDetails.Controls.Add(this.chkEnabled);
this.grpDetails.Controls.Add(this.txtEmail);
this.grpDetails.Controls.Add(this.label3);
this.grpDetails.Controls.Add(this.txtName);
this.grpDetails.Controls.Add(this.label2);
this.grpDetails.Controls.Add(this.txtObjectType);
this.grpDetails.Controls.Add(this.label1);
this.grpDetails.Location = new System.Drawing.Point(272, 40);
this.grpDetails.Name = "grpDetails";
this.grpDetails.Size = new System.Drawing.Size(408, 144);
this.grpDetails.TabIndex = 9;
this.grpDetails.TabStop = false;
this.grpDetails.Text = "Details";
//
// chkEnabled
//
this.chkEnabled.Enabled = false;
this.chkEnabled.Location = new System.Drawing.Point(16, 112);
this.chkEnabled.Name = "chkEnabled";
this.chkEnabled.Size = new System.Drawing.Size(376, 24);
this.chkEnabled.TabIndex = 16;
this.chkEnabled.Text = "Enabled User?";
//
// txtEmail
//
this.txtEmail.Enabled = false;
this.txtEmail.Location = new System.Drawing.Point(56, 88);
this.txtEmail.Name = "txtEmail";
this.txtEmail.Size = new System.Drawing.Size(336, 20);
this.txtEmail.TabIndex = 15;
this.txtEmail.Text = "";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(16, 90);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(36, 16);
this.label3.TabIndex = 14;
this.label3.Text = "Email:";
//
// txtName
//
this.txtName.Enabled = false;
this.txtName.Location = new System.Drawing.Point(56, 54);
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(336, 20);
this.txtName.TabIndex = 13;
this.txtName.Text = "";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(16, 56);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(38, 16);
this.label2.TabIndex = 12;
this.label2.Text = "Name:";
//
// txtObjectType
//
this.txtObjectType.Enabled = false;
this.txtObjectType.Location = new System.Drawing.Point(56, 22);
this.txtObjectType.Name = "txtObjectType";
this.txtObjectType.Size = new System.Drawing.Size(336, 20);
this.txtObjectType.TabIndex = 11;
this.txtObjectType.Text = "";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(16, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(33, 16);
this.label1.TabIndex = 10;
this.label1.Text = "Type:";
//
// statusBar
//
this.statusBar.Location = new System.Drawing.Point(0, 304);
this.statusBar.Name = "statusBar";
this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
this.statusBarQueryTime,
this.otherStatusBar});
this.statusBar.ShowPanels = true;
this.statusBar.Size = new System.Drawing.Size(696, 22);
this.statusBar.TabIndex = 10;
//
// statusBarQueryTime
//
this.statusBarQueryTime.Width = 120;
//
// otherStatusBar
//
this.otherStatusBar.Width = 600;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(696, 326);
this.Controls.Add(this.statusBar);
this.Controls.Add(this.grpDetails);
this.Controls.Add(this.separator);
this.Controls.Add(this.btnLoadTree);
this.Controls.Add(this.txtAdPass);
this.Controls.Add(this.lblAdPass);
this.Controls.Add(this.txtAdUser);
this.Controls.Add(this.lblAdUser);
this.Controls.Add(this.txtAdDomain);
this.Controls.Add(this.lblAdDomain);
this.Controls.Add(this.trvAD);
this.Name = "Form1";
this.Text = "AD Object Navigator";
this.Load += new System.EventHandler(this.Form1_Load);
this.grpDetails.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.statusBarQueryTime)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.otherStatusBar)).EndInit();
this.ResumeLayout(false);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -