private void ActionForm_FormClosing(object sender, FormClosingEventArgs e) { if(worker != null && worker.IsBusy) worker.CancelAsync(); }