当前位置:
文档之家› net反编译工具Reflector使用详解
net反编译工具Reflector使用详解
{
this.InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (this.textBox1.Text.Trim() == "1")
{
this.ClearLabel();
bel1.Text = this.strTEST1;
base.Controls.Add(bel2);
base.Controls.Add(this.button1);
base.Controls.Add(bel1);
= "Form1";
this.Text = "TEST_DISCOM";
base.ResumeLayout(false);
{
ponents.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
bel1 = new Label();
this.button1 = new Button();
bel2 = new Label();
}
else
{
ClearLabel();
bel4.Text = "NO SELECT";
}
}
private void ClearLabel()
{
bel1.Text = String.Empty;
bel2.Text = String.Empty;
bel3.Text = String.Empty;
base.AutoScaleMode = (AutoScaleMode) 1;
base.ClientSize = new Size(0x16d, 0xf8);
base.Controls.Add(this.textBox1);
base.Controls.Add(bel4);
base.Controls.Add(bel3);
this.button1.set_UseVisualStyleBackColor(true);
this.button1.Click += new EventHandler(this.button1_Click);
bel2.set_AutoSize(true);
bel2.set_BorderStyle(BorderStyle.FixedSingle);
bel3.Text = this.strTEST3;
}
else
{
this.ClearLabel();
bel4.Text = "NO SELECT";
}
}
private void ClearLabel()
{
bel1.Text = string.Empty;
bel2.Text = string.Empty;
this.textBox1.Location = new Point(0x33, 0x5e);
= "textBox1";
this.textBox1.Size = new Size(100, 0x13);
this.textBox1.TabIndex = 5;
base.AutoScaleDimensions = new SizeF(6f, 12f);
bel4.Text = String.Empty;
}
}
}
反编译之后生成的代码
namespace WindowsApplication1
{
using System;
using ponentModel;
using System.Drawing;
using System.Windows.Forms;
this.button1.Location = new Point(0x33, 0x2a);
= "button1";
this.button1.Size = new Size(0x6b, 0x1c);
this.button1.TabIndex = 1;
this.button1.Text = "button1";
namespace WindowsApplication1
{
public partial class Form1 : Form
{
private String strTEST1 = "strTEST1";
protected String strTEST2 = "strTEST2";
public String strTEST3 = "strTEST3";
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (this.textBox1.Text.Trim() == "1")
{
ClearLabel();
bel1.Text = strTEST1;
bel3.Size = new Size(0x25, 14);
bel3.TabIndex = 3;
bel3.Text = "label3";
bel4.set_AutoSize(true);
bel4.set_BorderStyle(BorderStyle.FixedSingle);
事例被反编译的程序c#:
using System;
using System.Collections.Generic;
using ponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
bel1.Location = new Point(0x33, 0x92);
= "label1";
bel1.Size = new Size(0x25, 14);
bel1.TabIndex = 0;
bel1.Text = "label1";
bel3.Text = string.Empty;
bel4.Text = string.Empty;
}
protected override void Dispose(bool disposing)
{
if (disposing && (ponents != null))
public class Form1 : Form
{
private Button button1;
private IContainer components = null;
private Label label1;
private Label label2;
private Label label3;
private Label label4;
bel2.Location = new Point(0x33, 160);
= "label2";
bel2.Size = new Size(0x25, 14);
bel2.TabIndex = 2;
bel2.Text = "label2";
}
else if ("2")
{
this.ClearLabel();
bel2.Text = this.strTEST2;
}
else if (this.textBox1.Text.Trim() == "3")
{
this.ClearLabel();
private string strTEST1 = "strTEST1";
protected string strTEST2 = "strTEST2";
public string strTEST3 = "strTEST3";
private TextBox textBox1;
public Form1()
base.PerformLayout();
}
}
}
bel4.Location = new Point(0x33, 0xbc);
= "label4";
bel4.Size = new Size(0x25, 14);
bel4.TabIndex = 4;
bel4.Text = "label4";
bel3.set_AutoSize(true);
bel3.set_BorderStyle(BorderStyle.FixedSingle);
bel3.Location = new Point(0x33, 0xae);
= "label3";
}
else if(this.textBox1.Text.Trim() == "2")
{
ClearLabel();
bel2.Text = strTEST2;
}
else if(this.textBox1.Text.Trim() == "3")
{
ClearLabel();
bel3.Text = strTEST3;
bel3 = new Label();
bel4 = new Label();