private void LongOperation_Completed(object sender, LongOperationCompletedEventArgs e) { if (form != null) { form.Invoke(new MethodInvoker(form.Close)); } }