In one project (class library), I have a class that acts as the main engine for my application. Let's call this class "Engine". The "Engine" class contains a public property of type "LocationManager"-- another class in my application. The "LocationManager" class manages a collection of "Network"s-- yes, another class of mine. A "Network" has two public properties: a Guid called "NetworkID" and a string called "Label".
My ultimate goal is to have a visual control (ListView? DataGridView?) in a separate project that binds to the collection of Networks, displaying the Labels and having access to the NetworkIDs. I would like to accomplish this with WinForms and/or WPF.
My problem is that I'm not sure how to set up the data source in my second project. Do I bind to my Engine? If I do, I can only seem to see the LocationManager property, so how would I dig down to the networks within the location manager? How do I ensure that my collection of Networks can be bound to? (ObservableCollection?)
Or do I have to set up a data source specifically for the collection of networks? Does that mean I have to set up a data source in my WinForms project for every collection within my class library project? There will be, literally, about 100. A network manages a collection of facilities. A facility manages a collection of departments. A department manages a collection... Oh, and there are some entities that manage multiple collections. (There's a ProductInstance that has multiple Contracts and multiple Lots and multiple Barcodes.) And at runtime, how will it know which instance of an object to bind to?
