How to wait until BackgroundWorker finish all calls

前端 未结 4 629
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-26 10:30

I have Add button click event how add file:

private void btnAddfiles_Click(object sender, EventArgs e)
{
    if (openFileDialog1.ShowDialog() == Sys         


        
4条回答
  •  梦毁少年i
    2021-01-26 10:47

    I just had the same problem, this worked for me.

     private void Worker_DoWork(object sender, EventArgs e)
        {
            if (Worker.IsBusy == false) { //...Finished execution }
        }
    

提交回复
热议问题