I am developing a Winforms MDI application after an MVP template, and I am stuck with some issues related to the connection between the various parts of my application.
Here is a simple picture of this application: 1 - Left - tree 2- In the middle of the drawing component 3- right, form of ownership. These 3 parts are controlled using the MVP triad (well, in fact, the model is not common to all triads)
When I click on a node in the tree, I want to see the drawing of the corresponding selected object in the drawing component, and I want to see some properties that correspond to this selected object in the property form.
My main question is: a) Where to store the "Selected Object" information? b) How to warn the component of the Drawing component and the Properties that changed the Selected Object?
I began to present some solutions, but I am very unhappy.
I do not buy the "Selected Object" in the Model and synchronize the observer. "Selected Object" does not apply to the model
I suppose I would save this information in the lead. If I put the "Selected object" in the Treeview presenter, it seems to me that Presenter for drawing the component and for Presenter for Property will contain a link to the treeview presenter to represent this information.
It creates some connection between the presenters, and I also do not like it.
So I'm looking for other ideas and comments. thank you for your time.