in my program pre-project, I have a first form. In this form, there are three radio buttons. The radiobttns say "option 1", "option 2", "option 3". Then I pick one of them. Based on my decision one object will be instantiated: if I choose "option 1", the object will be from class "option1", if I choose "option2", it will be from class "option2" and so on... At the same time, one WinForm will appear based on that decision too, if I choose "option 1" will be "WinForm1", if I choose "option 2" will be "WinForm2" and so on...
The idea on this second WinForm (the first was that with the radiobuttons) is to make the fields for filling the properties of the choosen object appear. After filling it all, I perform some calculations and do other stuff.
My question is: How do I instantiate the object I am gonna use (basically, I choose dynamically the object I am gonna use) ? Do I put it inside the "Load Event" of the Form ? If I do that I can´t work on the object on different events. Do I initialize it on each form ? Which is the better approach ?
Remembering, this is just and idea, there is no code yet. If you don´t understand, please let me now.
Thanks,
Ricardo S.