public int mode = 0;
public string name ="";
private void button1_Click(object sender, EventArgs e)
{
if (radioButton1.Checked == true)
{
mode = 1;
name = textBox1.text;
}
if (radioButton2.Checked == true)
{
mode =2;
name = textBox1.text;
}
if (radioButton3.Checked == true)
{
mode = 3;
name = textBox1.text;
}
this.Close();
}