View Single Post
  #5 (permalink)  
Old 02-17-2009, 6:54 PM
JohnH's Avatar
JohnH JohnH is offline
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,317
Reputation: 1315
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

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.
__________________
Reply With Quote