01.
public
partial
class
Form1 : Form
02.
{
03.
public
Form1()
04.
{
05.
InitializeComponent();
06.
}
07.
08.
private
void
button1_Click(
object
sender, EventArgs e)
09.
{
10.
new
Form2() { _control =
"button1"
}.Show();
11.
}
12.
13.
private
void
button2_Click(
object
sender, EventArgs e)
14.
{
15.
new
Form2() { _control =
"button2"
}.Show();
16.
}
17.
18.
private
void
button3_Click(
object
sender, EventArgs e)
19.
{
20.
new
Form2() { _control =
"button3"
}.Show();
21.
}
22.
23.
private
void
button4_Click(
object
sender, EventArgs e)
24.
{
25.
new
Form2() { _control =
"button4"
}.Show();
26.
}
27.
28.
private
void
button5_Click(
object
sender, EventArgs e)
29.
{
30.
new
Form2() { _control =
"button5"
}.Show();
31.
}
32.
}