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?