Best way to update UI from other classes?
Posted
by Jack
on Stack Overflow
See other posts from Stack Overflow
or by Jack
Published on 2010-05-19T16:50:03Z
Indexed on
2010/05/19
16:50 UTC
Read the original article
Hit count: 193
I've got several nested classes, with the following structure:
BackupLocation contains list of BackupClients
BackupClients contains a list of BackupVersions
BackupVersions contains a list of BackupFiles
In my UI - Im populating a combo box with BackupLocations - and have several listboxes for the clients, versions, and files.
When processing the BackupLocations - I can update my status bar easily because thats the top level class that the UI creates. But how can I update the status bar and progress bar on each file being processed? Since the BackupFiles are 3 levels deep, I cant see any way to update the UI. The actual processing of the files are within the BackupVersion class - which loads its files.
I think it probably has something to do with events and delegates - but am unsure exactly how to proceed with this, any help would be appreciated.
© Stack Overflow or respective owner