Showing file by file progress

Topics: Updater Application Block
Jul 17, 2004 at 11:17 AM
originally posted by: gloehr

Has anybody had success with the UAB showing file by file (show the file name) download progress? I've spent an entire day trying a million different things to make this work and I've failed.
Jul 22, 2004 at 4:34 PM
originally posted by: Kennon2000

I have successfully created a new event of UpdateUnavailable using similar way of other updater event, I think you should go in that direction.
Aug 31, 2004 at 11:27 PM
originally posted by: m_geiss

Hi did you eventually succeed with displayingn the file by file progress.
I think about doing the same thing and wondered if you can give me any hints.
Thanks a lot!
Sep 2, 2004 at 11:22 AM
originally posted by: pccoxDMR

I haven't done a file by file progress indicator, but I have added some custom events (NoUpdateNeeded, DownloadError, IPPRunning, IPPStopped) to the DownloaderManager class (with corresponding handler stubs in ApplicationUpdater) to provide a bit more feedback than what came out of the box.

You can take the same approach to create a custom event (e.g., DownloadFileAdded) in your IDownloader implementation class (BITSDownloader -- or better yet to the Interface itself), and raise that event in the IDownloader.Download (for the manifest) and/or IDownloader.BeginDownload (for the files) method implementations.

If you do that, then you'll have to handle those events somewhere -- most likely bubble up through DownloaderManager and ApplicationUpdater. You'll probably also need to create a custom UpdaterActionEventArgs subclass to include the filename you want to pass back in your notification, and you'll have to be sure to handle the events in your UI DownloadController class in a threadsafe manner, with the proper Invoke() stuff, to publish the notification to your users.

Hope that helps...

Paul C.