Quote:
|
Originally Posted by DanielFL
how can I distinquish which action is completed if I want to use Worker for more than one task
|
From help:
Quote:
|
If your operation produces a result, you can assign the result to the DoWorkEventArgs.Result property. This will be available to the RunWorkerCompleted event handler in the RunWorkerCompletedEventArgs.Result property.
|
The Result is just another "userstate".
When passing multiple work items to a BW I sometimes use ReportProgress to notify "completed" progress for individual items, this method happens to have a "userstate" available also where you can pass any info necessary. The RunWorkerCompleted event would then be just some kind of "finished processing all" notification.