Could you explain your manual mapping? From your source, it would seem like your methods are all doing the same thing...
Code:
if (this.RadioButton1.Checked)
{
if (processesByName.Length == 0)
{
this.Label3.ForeColor = Color.Red;
this.Label3.Text = "Waiting for " + this.TextBox1.Text + ".exe....";
}
else
{
this.Timer1.Stop();
this.Label3.ForeColor = Color.Green;
this.Label3.Text = "Successfully Injected!";
this.Inject();
if (this.CheckBox1.Checked)
{
this.Close();
}
}
if (this.RadioButton2.Checked)
{
if (processesByName.Length == 0)
{
this.Label4.ForeColor = Color.Red;
this.Label4.Text = "Waiting for " + this.ComboBox1.Text + ".exe....";
}
else
{
this.Timer1.Stop();
this.Label4.ForeColor = Color.Green;
this.Label4.Text = "Successfully Injected!";
this.Inject();
if (this.CheckBox1.Checked)
{
this.Close();
}
}
}