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

📄 form2.cs

📁 C#示例代码,刚刚注册随便找了一个东西测试一下好不好用
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using mima;

namespace book
{
	/// <summary>
	/// Summary description for Form2.
	/// </summary>
	public class Form2 : System.Windows.Forms.Form
	{
		private   mima.UserControl1  mycontrol;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Button button3;
		private System.Windows.Forms.Button button4;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Form2()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// 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.mycontrol = new mima.UserControl1();
			this.button4 = new System.Windows.Forms.Button();
			this.button1 = new System.Windows.Forms.Button();
			this.button2 = new System.Windows.Forms.Button();
			this.button3 = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// mycontrol
			// 
			this.mycontrol.Location = new System.Drawing.Point(8, 8);
			this.mycontrol.Name = "mycontrol";
			this.mycontrol.Size = new System.Drawing.Size(368, 200);
			this.mycontrol.TabIndex = 0;
			// 
			// button4
			// 
			this.button4.Location = new System.Drawing.Point(232, 240);
			this.button4.Name = "button4";
			this.button4.TabIndex = 4;
			this.button4.Text = "关闭";
			this.button4.Click += new System.EventHandler(this.button4_Click);
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(72, 208);
			this.button1.Name = "button1";
			this.button1.TabIndex = 1;
			this.button1.Text = "插入数据";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(72, 240);
			this.button2.Name = "button2";
			this.button2.TabIndex = 2;
			this.button2.Text = "删除数据";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// button3
			// 
			this.button3.Location = new System.Drawing.Point(232, 208);
			this.button3.Name = "button3";
			this.button3.TabIndex = 3;
			this.button3.Text = "更新数据";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// Form2
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(384, 273);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.button4,
																		  this.button3,
																		  this.button2,
																		  this.button1,
																		  this.mycontrol});
			this.MaximizeBox = false;
			this.Name = "Form2";
			this.Text = "超级用户";
			this.ResumeLayout(false);

		}
		#endregion

		private void button1_Click(object sender, System.EventArgs e)
		{
			Form3 form3 =new Form3();
			if(mycontrol.aaa==mycontrol.bbb)
			{
				form3.Show();
			}
			else{MessageBox.Show("您输入的密码不正确!请重新登录!");}


		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			Form4 form4 =new Form4();
			if(mycontrol.aaa==mycontrol.bbb)
			{
				form4.Show();
			}
			else{MessageBox.Show("您输入的密码不正确!请重新登录!");}


		}

		private void button3_Click(object sender, System.EventArgs e)
		{
			Form5 form5 =new Form5();
			if(mycontrol.aaa==mycontrol.bbb)
			{
				form5.Show();
			}
			else{MessageBox.Show("您输入的密码不正确!请重新登录!");}

		}

		private void button4_Click(object sender, System.EventArgs e)
		{
Close();
		}
	}
}

⌨️ 快捷键说明

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