Keeping application backend and UI synchronised
- by Deanna
Hi all.
I have an app that works with a list of objects so has one central keyed list.
The main window has a tree containing these object with some information, which is easy enough to populate as a one off event after loading.
Now, the complicated part, any part of the application can add, remove, and more importantly change the details of those objects at any time (all in the same process) and I'd like the tree to update to suit.
I have a few options including passing events back down from the object to the list to the form which seems to be the most flexible way.
I can also do it lazily and repopulate the tree each time or periodically (very hackish).
Does anyone have any better thoughts on how to structure this?
This is being done in C# 2.0 but the concepts apply to any environment.
Thanks