Will the .disposed
event handler pick it up? I can't seem to figure out how to assign this event handler- this is how I am assigning the other event handlers:
bw.ProgressChanged += new ProgressChangedEventHandler(
delegate(object o, ProgressChangedEventArgs args)
{
lb_status.Text = args.ProgressPercentage.ToString() + "%";
this.Refresh();
});
bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(
delegate(object o, RunWorkerCompletedEventArgs args)
{
lb_status.Text = "Ready";
BindingSource source = new BindingSource();
source.DataSource = ds.Tables[0];
dataGridView1.DataSource = source;
source.ResetBindings(false);
button1.Enabled = true;
});
I'm aborting the thread during a try/catch using System.Threading.Thread.CurrentThread.Abort()
.