📄 zhucheframe.cs
字号:
#region 命名空间...
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Data;
#endregion
namespace WindowsApplication
{
public class ZhuCheFrame : System.Windows.Forms.Form
{
#region 控件声明...
private System.Windows.Forms.ImageList imageList1;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.PictureBox LeftImage;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textUserHao;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textUserName;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textUserPassword;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textUserRepassword;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ComboBox QuanXianHaoCombo;
private System.Windows.Forms.Button btnRead;
private System.Windows.Forms.Button btnAddUser;
private System.Windows.Forms.Button btnModifyUser;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Label titleLabel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label userLabel;
private System.Windows.Forms.Label dateLabel;
private System.Windows.Forms.Label PasswordLabel;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter;
private System.Data.SqlClient.SqlConnection sqlConnection;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Windows.Forms.Button btnCancel;
#endregion
#region 构造函数...
public ZhuCheFrame()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ZhuCheFrame));
this.titleLabel = new System.Windows.Forms.Label();
this.LeftImage = new System.Windows.Forms.PictureBox();
this.label2 = new System.Windows.Forms.Label();
this.textUserHao = new System.Windows.Forms.TextBox();
this.textUserName = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.textUserPassword = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.textUserRepassword = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.QuanXianHaoCombo = new System.Windows.Forms.ComboBox();
this.btnRead = new System.Windows.Forms.Button();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.btnAddUser = new System.Windows.Forms.Button();
this.btnModifyUser = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.userLabel = new System.Windows.Forms.Label();
this.dateLabel = new System.Windows.Forms.Label();
this.PasswordLabel = new System.Windows.Forms.Label();
this.sqlDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
this.sqlConnection = new System.Data.SqlClient.SqlConnection();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.SuspendLayout();
//
// titleLabel
//
this.titleLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.titleLabel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.titleLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.titleLabel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.titleLabel.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.titleLabel.Location = new System.Drawing.Point(0, 0);
this.titleLabel.Name = "titleLabel";
this.titleLabel.Size = new System.Drawing.Size(528, 40);
this.titleLabel.TabIndex = 0;
this.titleLabel.Text = "注册窗口";
this.titleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.titleLabel.MouseUp += new System.Windows.Forms.MouseEventHandler(this.titleLabel_MouseUp);
this.titleLabel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.titleLabel_MouseMove);
this.titleLabel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.titleLabel_MouseDown);
//
// LeftImage
//
this.LeftImage.Image = ((System.Drawing.Image)(resources.GetObject("LeftImage.Image")));
this.LeftImage.Location = new System.Drawing.Point(0, 48);
this.LeftImage.Name = "LeftImage";
this.LeftImage.Size = new System.Drawing.Size(176, 200);
this.LeftImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.LeftImage.TabIndex = 1;
this.LeftImage.TabStop = false;
//
// label2
//
this.label2.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.label2.Location = new System.Drawing.Point(176, 48);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 23);
this.label2.TabIndex = 2;
this.label2.Text = "用户号:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// textUserHao
//
this.textUserHao.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.textUserHao.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textUserHao.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.textUserHao.Location = new System.Drawing.Point(256, 48);
this.textUserHao.Name = "textUserHao";
this.textUserHao.Size = new System.Drawing.Size(128, 21);
this.textUserHao.TabIndex = 3;
this.textUserHao.Text = "";
//
// textUserName
//
this.textUserName.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.textUserName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textUserName.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.textUserName.Location = new System.Drawing.Point(256, 88);
this.textUserName.Name = "textUserName";
this.textUserName.Size = new System.Drawing.Size(128, 21);
this.textUserName.TabIndex = 5;
this.textUserName.Text = "";
this.textUserName.TextChanged += new System.EventHandler(this.textUserName_TextChanged);
//
// label3
//
this.label3.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.label3.Location = new System.Drawing.Point(176, 88);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(80, 23);
this.label3.TabIndex = 4;
this.label3.Text = "用户名:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// textUserPassword
//
this.textUserPassword.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.textUserPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textUserPassword.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.textUserPassword.Location = new System.Drawing.Point(256, 128);
this.textUserPassword.Name = "textUserPassword";
this.textUserPassword.PasswordChar = '*';
this.textUserPassword.Size = new System.Drawing.Size(128, 21);
this.textUserPassword.TabIndex = 7;
this.textUserPassword.Text = "";
this.textUserPassword.TextChanged += new System.EventHandler(this.textUserPassword_TextChanged);
//
// label4
//
this.label4.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.label4.Location = new System.Drawing.Point(176, 128);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(80, 23);
this.label4.TabIndex = 6;
this.label4.Text = "密码:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// textUserRepassword
//
this.textUserRepassword.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.textUserRepassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textUserRepassword.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.textUserRepassword.Location = new System.Drawing.Point(256, 168);
this.textUserRepassword.Name = "textUserRepassword";
this.textUserRepassword.PasswordChar = '*';
this.textUserRepassword.Size = new System.Drawing.Size(128, 21);
this.textUserRepassword.TabIndex = 9;
this.textUserRepassword.Text = "";
this.textUserRepassword.TextChanged += new System.EventHandler(this.textUserRepassword_TextChanged);
//
// label5
//
this.label5.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.label5.Location = new System.Drawing.Point(176, 168);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(80, 23);
this.label5.TabIndex = 8;
this.label5.Text = "确认密码:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label6
//
this.label6.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.label6.Location = new System.Drawing.Point(177, 208);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(80, 23);
this.label6.TabIndex = 10;
this.label6.Text = "权限号:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// QuanXianHaoCombo
//
this.QuanXianHaoCombo.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.QuanXianHaoCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.QuanXianHaoCombo.Enabled = false;
this.QuanXianHaoCombo.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.QuanXianHaoCombo.Location = new System.Drawing.Point(256, 208);
this.QuanXianHaoCombo.Name = "QuanXianHaoCombo";
this.QuanXianHaoCombo.Size = new System.Drawing.Size(128, 20);
this.QuanXianHaoCombo.TabIndex = 11;
this.QuanXianHaoCombo.SelectedIndexChanged += new System.EventHandler(this.QuanXianHaoCombo_SelectedIndexChanged);
//
// btnRead
//
this.btnRead.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRead.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.btnRead.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnRead.ImageIndex = 4;
this.btnRead.ImageList = this.imageList1;
this.btnRead.Location = new System.Drawing.Point(416, 48);
this.btnRead.Name = "btnRead";
this.btnRead.Size = new System.Drawing.Size(80, 24);
this.btnRead.TabIndex = 12;
this.btnRead.Text = "读取(&R)";
this.btnRead.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnRead.Click += new System.EventHandler(this.btnRead_Click);
this.btnRead.MouseEnter += new System.EventHandler(this.btnRead_MouseEnter);
this.btnRead.MouseLeave += new System.EventHandler(this.btnRead_MouseLeave);
//
// imageList1
//
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -