[C#] 纯文本查看 复制代码
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace RepairMe_Ui
{
public class frmMain : Form
{
private IContainer components = null;
private TextBox txtCode;
private Button btnReg;
private Label lblInfo;
public frmMain()
{
this.InitializeComponent();
}
private void btnReg_Click(object sender, EventArgs e)
{
if (this.txtCode.Text == "我已经修复")
{
this.lblInfo.Text = "提示信息:恭喜";
}
else
{
this.lblInfo.Text = "提示信息:失败";
}
}
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.txtCode = new TextBox();
this.btnReg = new Button();
this.lblInfo = new Label();
base.SuspendLayout();
this.txtCode.Location = new Point(19, 13);
this.txtCode.Name = "txtCode";
this.txtCode.Size = new Size(285, 21);
this.txtCode.TabIndex = 0;
this.btnReg.Location = new Point(35, 60);
this.btnReg.Name = "btnReg";
this.btnReg.Size = new Size(240, 45);
this.btnReg.TabIndex = 1;
this.btnReg.Text = "注册";
this.btnReg.UseVisualStyleBackColor = true;
this.btnReg.Click += new EventHandler(this.btnReg_Click);
this.lblInfo.AutoSize = true;
this.lblInfo.Location = new Point(34, 132);
this.lblInfo.Name = "lblInfo";
this.lblInfo.Size = new Size(65, 12);
this.lblInfo.TabIndex = 2;
this.lblInfo.Text = "提示信息:";
base.AutoScaleDimensions = new SizeF(6f, 12f);
base.AutoScaleMode = AutoScaleMode.Font;
base.ClientSize = new Size(318, 185);
base.Controls.Add(this.lblInfo);
base.Controls.Add(this.btnReg);
base.Controls.Add(this.txtCode);
base.Name = "frmMain";
this.Text = "UC_Me(UnPack+Crack)";
base.ResumeLayout(false);
base.PerformLayout();
}
}
}
|