private void btnClose_Click(object sender, EventArgs e) { if ((job != null) && job.Running) { job.Abort(); } this.Close(); }
public void Abort() { job.Abort(); t.Wait(); }