Update progress bar from for loop

前端 未结 5 729
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-18 23:26

I am processing some xml files in for loop and according to the number of files has been processed I want to show the progress bar. Suppose there are 100 files in directory

5条回答
  •  囚心锁ツ
    2021-01-19 00:01

    Process the 100 files using a Background Worker, call ReportProgress every iteration, hook on to the Process changed event of the backgroundworker and update a progressbar accordingly.

    You can check out this tutorial for details.

提交回复
热议问题