⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.cs

📁 软件工程的课程作业
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace PSMS
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class login : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button OK;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Button Cancel;
		public System.Windows.Forms.TextBox username;
		public System.Windows.Forms.TextBox userkey;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public login()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			this.Enabled = true;
			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#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.OK = new System.Windows.Forms.Button();
			this.label1 = new System.Windows.Forms.Label();
			this.username = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.userkey = new System.Windows.Forms.TextBox();
			this.Cancel = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// OK
			// 
			this.OK.Location = new System.Drawing.Point(32, 120);
			this.OK.Name = "OK";
			this.OK.Size = new System.Drawing.Size(72, 23);
			this.OK.TabIndex = 0;
			this.OK.Text = "登录";
			this.OK.Click += new System.EventHandler(this.OK_Click);
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(32, 24);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(56, 16);
			this.label1.TabIndex = 1;
			this.label1.Text = "用户名:";
			// 
			// username
			// 
			this.username.Location = new System.Drawing.Point(112, 24);
			this.username.Name = "username";
			this.username.TabIndex = 2;
			this.username.Text = "";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(32, 64);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(56, 23);
			this.label2.TabIndex = 3;
			this.label2.Text = "密码:";
			// 
			// userkey
			// 
			this.userkey.Location = new System.Drawing.Point(112, 64);
			this.userkey.Name = "userkey";
			this.userkey.PasswordChar = '*';
			this.userkey.TabIndex = 4;
			this.userkey.Text = "";
			// 
			// Cancel
			// 
			this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.Cancel.Location = new System.Drawing.Point(152, 120);
			this.Cancel.Name = "Cancel";
			this.Cancel.Size = new System.Drawing.Size(72, 23);
			this.Cancel.TabIndex = 5;
			this.Cancel.Text = "退出";
			this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
			// 
			// login
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.BackColor = System.Drawing.Color.AliceBlue;
			this.CancelButton = this.Cancel;
			this.ClientSize = new System.Drawing.Size(256, 158);
			this.ControlBox = false;
			this.Controls.Add(this.Cancel);
			this.Controls.Add(this.userkey);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.username);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.OK);
			this.MaximizeBox = false;
			this.MaximumSize = new System.Drawing.Size(264, 192);
			this.MinimumSize = new System.Drawing.Size(264, 192);
			this.Name = "login";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "售前管理系统登录界面";
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>

		private void OK_Click(object sender, System.EventArgs e)
		{
			this.Enabled = false;
			Close();
			//return 1;
		}

		private void Cancel_Click(object sender, System.EventArgs e)
		{
			this.Enabled = false;
			this.BackColor = Color.Gold;
			Close();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -