Organizing forms inheritance - C #

2

I'm doing a program to sell products and I'm having a design problem. The differential of this program is that it can take two different faces: one for sale of chocolates and another for sale of fruit. The forms I organized more or less this way:

I arranged this way so that I could copy the behavior of the base forms, since they are exactly alike at that point and only change visually.

The problem is that the controls on one form are not always the same on another. For example, a Back button in chocolates mode is Button , but fruit% is PictureBox , so I need to associate them in some way with the behavior of the base form. I thought about putting Control properties on the base forms and then I would only do the association on each form, but it looks like it's going to be kind of messy, since I would also have to register the Click events manually. I do not have much confidence that it will be easy to maintain.

Has anyone tried to do something like this and have any tips?

    
asked by anonymous 18.10.2016 / 16:16

1 answer

0

I checked and found MVP Pattern. I think it will work perfectly for this project. In case, it would look like this, I think:

Ifanyonewouldliketoreadabout: link

    
19.10.2016 / 15:31