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

📄 key.cs

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

namespace PSMS
{
	/// <summary>
	/// key 的摘要说明。
	/// </summary>
	public class key : System.Windows.Forms.Form
	{
		public System.Windows.Forms.Label prekey;
		public System.Windows.Forms.Label newkey;
		public System.Windows.Forms.TextBox prebox;
		public System.Windows.Forms.TextBox newbox;
		public System.Windows.Forms.Button config;
		public System.Windows.Forms.Button cancel;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public key()
		{
			//
			// 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()
		{
			this.prekey = new System.Windows.Forms.Label();
			this.newkey = new System.Windows.Forms.Label();
			this.prebox = new System.Windows.Forms.TextBox();
			this.newbox = new System.Windows.Forms.TextBox();
			this.config = new System.Windows.Forms.Button();
			this.cancel = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// prekey
			// 
			this.prekey.Location = new System.Drawing.Point(24, 24);
			this.prekey.Name = "prekey";
			this.prekey.Size = new System.Drawing.Size(56, 23);
			this.prekey.TabIndex = 0;
			this.prekey.Text = "原密码:";
			// 
			// newkey
			// 
			this.newkey.Location = new System.Drawing.Point(24, 72);
			this.newkey.Name = "newkey";
			this.newkey.Size = new System.Drawing.Size(56, 24);
			this.newkey.TabIndex = 1;
			this.newkey.Text = "新密码:";
			// 
			// prebox
			// 
			this.prebox.Location = new System.Drawing.Point(88, 24);
			this.prebox.Name = "prebox";
			this.prebox.Size = new System.Drawing.Size(144, 21);
			this.prebox.TabIndex = 2;
			this.prebox.Text = "";
			// 
			// newbox
			// 
			this.newbox.Location = new System.Drawing.Point(88, 72);
			this.newbox.MaxLength = 20;
			this.newbox.Name = "newbox";
			this.newbox.PasswordChar = '*';
			this.newbox.Size = new System.Drawing.Size(144, 21);
			this.newbox.TabIndex = 3;
			this.newbox.Text = "";
			// 
			// config
			// 
			this.config.Location = new System.Drawing.Point(40, 120);
			this.config.Name = "config";
			this.config.Size = new System.Drawing.Size(64, 24);
			this.config.TabIndex = 4;
			this.config.Text = "确认";
			this.config.Click += new System.EventHandler(this.config_Click);
			// 
			// cancel
			// 
			this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.cancel.Location = new System.Drawing.Point(160, 120);
			this.cancel.Name = "cancel";
			this.cancel.Size = new System.Drawing.Size(64, 24);
			this.cancel.TabIndex = 5;
			this.cancel.Text = "取消";
			this.cancel.Click += new System.EventHandler(this.reset_Click);
			// 
			// key
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.BackColor = System.Drawing.Color.AliceBlue;
			this.CancelButton = this.cancel;
			this.ClientSize = new System.Drawing.Size(272, 158);
			this.ControlBox = false;
			this.Controls.Add(this.cancel);
			this.Controls.Add(this.config);
			this.Controls.Add(this.newbox);
			this.Controls.Add(this.prebox);
			this.Controls.Add(this.newkey);
			this.Controls.Add(this.prekey);
			this.MaximizeBox = false;
			this.MaximumSize = new System.Drawing.Size(280, 192);
			this.MinimumSize = new System.Drawing.Size(280, 192);
			this.Name = "key";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "修改密码";
			this.ResumeLayout(false);

		}
		#endregion

		private void config_Click(object sender, System.EventArgs e)
		{
			//config.BackColor = Color.GreenYellow;
			//Close();
			this.Enabled = false;
			Close();
		}

		private void reset_Click(object sender, System.EventArgs e)
		{
			cancel.BackColor = Color.GreenYellow;
			//config.Enabled = false;
			this.Enabled = false;
			Close();
		
		}
	}
}

⌨️ 快捷键说明

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