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

📄 form3.cs

📁 visual c# 网络编程技术与实践实例包括几个源码
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace client
{
	/// <summary>
	/// Form3 的摘要说明。
	/// </summary>
	public class Form3 : System.Windows.Forms.Form
	{   public string zhuces;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.CheckBox checkBox1;
		private System.Windows.Forms.CheckBox checkBox2;
		private System.Windows.Forms.CheckBox checkBox3;
		private System.Windows.Forms.CheckBox checkBox4;
		private System.Windows.Forms.Button button1;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Form3()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.button2 = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.checkBox1 = new System.Windows.Forms.CheckBox();
			this.checkBox2 = new System.Windows.Forms.CheckBox();
			this.checkBox3 = new System.Windows.Forms.CheckBox();
			this.checkBox4 = new System.Windows.Forms.CheckBox();
			this.button1 = new System.Windows.Forms.Button();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(160, 160);
			this.button2.Name = "button2";
			this.button2.TabIndex = 9;
			this.button2.Text = "关闭";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
																					this.checkBox1,
																					this.checkBox2,
																					this.checkBox3,
																					this.checkBox4});
			this.groupBox1.Location = new System.Drawing.Point(46, 16);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(200, 128);
			this.groupBox1.TabIndex = 7;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "选项";
			// 
			// checkBox1
			// 
			this.checkBox1.Location = new System.Drawing.Point(40, 24);
			this.checkBox1.Name = "checkBox1";
			this.checkBox1.TabIndex = 0;
			this.checkBox1.Text = "可以注销";
			// 
			// checkBox2
			// 
			this.checkBox2.Location = new System.Drawing.Point(40, 48);
			this.checkBox2.Name = "checkBox2";
			this.checkBox2.TabIndex = 1;
			this.checkBox2.Text = "可以关机";
			// 
			// checkBox3
			// 
			this.checkBox3.Location = new System.Drawing.Point(40, 72);
			this.checkBox3.Name = "checkBox3";
			this.checkBox3.TabIndex = 2;
			this.checkBox3.Text = "找回C、D盘";
			// 
			// checkBox4
			// 
			this.checkBox4.Location = new System.Drawing.Point(40, 96);
			this.checkBox4.Name = "checkBox4";
			this.checkBox4.Size = new System.Drawing.Size(128, 24);
			this.checkBox4.TabIndex = 3;
			this.checkBox4.Text = "找回桌面图标";
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(64, 160);
			this.button1.Name = "button1";
			this.button1.TabIndex = 8;
			this.button1.Text = "确定";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// Form3
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(292, 197);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.button2,
																		  this.groupBox1,
																		  this.button1});
			this.Name = "Form3";
			this.groupBox1.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		private void button1_Click(object sender, System.EventArgs e)
		{
			if(checkBox1.Checked){zhuces="zs1000";}
			if(checkBox2.Checked){zhuces="zs0100";}
			if(checkBox3.Checked){zhuces="zs0010";}
			if(checkBox4.Checked){zhuces="zs0001";}
			if(checkBox1.Checked&&checkBox2.Checked){zhuces="zs1100";}
			if(checkBox1.Checked&&checkBox3.Checked){zhuces="zs1010";}
			if(checkBox1.Checked&&checkBox4.Checked){zhuces="zs1001";}
			if(checkBox2.Checked&&checkBox3.Checked){zhuces="zs0110";}
			if(checkBox2.Checked&&checkBox4.Checked){zhuces="zs0101";}
			if(checkBox3.Checked&&checkBox4.Checked){zhuces="zs0011";}
			if(checkBox1.Checked&&checkBox2.Checked&&checkBox3.Checked){zhuces="zs1110";}
			if(checkBox1.Checked&&checkBox2.Checked&&checkBox4.Checked){zhuces="zs1101";}
			if(checkBox1.Checked&&checkBox4.Checked&&checkBox3.Checked){zhuces="zs1011";}

			if(checkBox2.Checked&&checkBox3.Checked&&checkBox4.Checked){zhuces="zs0111";}
			if(checkBox1.Checked&&checkBox2.Checked&&checkBox3.Checked&&checkBox4.Checked){zhuces="zs1111";}

		}

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

⌨️ 快捷键说明

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