📄 userform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using HotelsManage.BusinessLevel;
namespace HotelsManage.UILevel
{
/// <summary>
/// UserForm 的摘要说明。
/// </summary>
public class UserForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtUserName;
private System.Windows.Forms.TextBox txtPwd;
private System.Windows.Forms.ComboBox cmbSort;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.TextBox txtSearch;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnSearch;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Button btnNew;
/// <summary>
/// 必需的设计器变量。
/// </summary>
///
bool result=false;
private System.ComponentModel.Container components = null;
public UserForm()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// 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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(UserForm));
this.panel1 = new System.Windows.Forms.Panel();
this.cmbSort = new System.Windows.Forms.ComboBox();
this.txtPwd = new System.Windows.Forms.TextBox();
this.txtUserName = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.btnExit = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnSearch = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button();
this.btnNew = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
this.txtSearch = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.button4 = new System.Windows.Forms.Button();
this.listView1 = new System.Windows.Forms.ListView();
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.cmbSort);
this.panel1.Controls.Add(this.txtPwd);
this.panel1.Controls.Add(this.txtUserName);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label2);
this.panel1.Location = new System.Drawing.Point(16, 32);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(472, 72);
this.panel1.TabIndex = 0;
//
// cmbSort
//
this.cmbSort.Items.AddRange(new object[] {
"system",
"user"});
this.cmbSort.Location = new System.Drawing.Point(336, 16);
this.cmbSort.Name = "cmbSort";
this.cmbSort.Size = new System.Drawing.Size(121, 20);
this.cmbSort.TabIndex = 10;
//
// txtPwd
//
this.txtPwd.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtPwd.Location = new System.Drawing.Point(200, 16);
this.txtPwd.Name = "txtPwd";
this.txtPwd.TabIndex = 9;
this.txtPwd.Text = "";
//
// txtUserName
//
this.txtUserName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtUserName.Enabled = false;
this.txtUserName.Location = new System.Drawing.Point(56, 16);
this.txtUserName.Multiline = true;
this.txtUserName.Name = "txtUserName";
this.txtUserName.TabIndex = 8;
this.txtUserName.Text = "";
//
// label4
//
this.label4.ForeColor = System.Drawing.SystemColors.Highlight;
this.label4.Location = new System.Drawing.Point(304, 24);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(32, 23);
this.label4.TabIndex = 7;
this.label4.Text = "类型";
//
// label3
//
this.label3.ForeColor = System.Drawing.SystemColors.Highlight;
this.label3.Location = new System.Drawing.Point(168, 24);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(32, 23);
this.label3.TabIndex = 6;
this.label3.Text = "密码";
//
// label2
//
this.label2.BackColor = System.Drawing.SystemColors.Window;
this.label2.ForeColor = System.Drawing.SystemColors.Desktop;
this.label2.Location = new System.Drawing.Point(8, 24);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(48, 23);
this.label2.TabIndex = 5;
this.label2.Text = "用户ID";
//
// panel2
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.btnExit);
this.panel2.Controls.Add(this.btnSave);
this.panel2.Controls.Add(this.btnCancel);
this.panel2.Controls.Add(this.btnSearch);
this.panel2.Controls.Add(this.btnDelete);
this.panel2.Controls.Add(this.btnNew);
this.panel2.Controls.Add(this.panel3);
this.panel2.Dock = System.Windows.Forms.DockStyle.Right;
this.panel2.Location = new System.Drawing.Point(520, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(96, 446);
this.panel2.TabIndex = 1;
//
// btnExit
//
this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExit.ForeColor = System.Drawing.SystemColors.Desktop;
this.btnExit.Image = ((System.Drawing.Image)(resources.GetObject("btnExit.Image")));
this.btnExit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnExit.Location = new System.Drawing.Point(16, 392);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(56, 23);
this.btnExit.TabIndex = 6;
this.btnExit.Text = "退出";
this.btnExit.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// btnSave
//
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSave.ForeColor = System.Drawing.SystemColors.Desktop;
this.btnSave.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.Image")));
this.btnSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnSave.Location = new System.Drawing.Point(16, 288);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(56, 23);
this.btnSave.TabIndex = 5;
this.btnSave.Text = "保存";
this.btnSave.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnCancel
//
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCancel.ForeColor = System.Drawing.SystemColors.Desktop;
this.btnCancel.Image = ((System.Drawing.Image)(resources.GetObject("btnCancel.Image")));
this.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnCancel.Location = new System.Drawing.Point(16, 248);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(56, 23);
this.btnCancel.TabIndex = 4;
this.btnCancel.Text = "取消";
this.btnCancel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnSearch
//
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSearch.ForeColor = System.Drawing.SystemColors.Desktop;
this.btnSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnSearch.Image")));
this.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnSearch.Location = new System.Drawing.Point(16, 80);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(56, 23);
this.btnSearch.TabIndex = 2;
this.btnSearch.Text = "查找";
this.btnSearch.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -