private void button5_Click(object sender, EventArgs e) { if (bw.IsBusy) { MessageBox.Show("Please wait for enumeration to complete.", "Please wait", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } else { if (Targets.Count > 0) { HolePunch holepunch = new HolePunch(Targets); holepunch.Show(); } else { MessageBox.Show("There are no targets yet.", "No targets", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } } }