I am currently writing a GUI for a C# application that adheres to the following software requirements (and am struggling with the conceptual design):
- Have a GUI with some choices of different operations to run.
- Each possible selection choice on the GUI should have a few sub-selections that the user can pick from.
- Each of the selections should correspond with a certain object to be utilized.
- Each of the sub-selections should correspond with a certain method to run (belonging to the selected object).
In one sentence, I am looking to associate the choices/options with different parts of executable code.
I really want to figure out a way to separate these "choices/selections" from the application, but with my current level experience, the only thing that I know how to do is make a big switch statement and hard-code the selections/sub-selection operations based on the hard-coded strings. There has got to be another way of associating the selections with the operations but I am failing to understand.
Let's say that I did decide to use XML and coded all of the possible selections, all that would allow me to do is populate them on the GUI. I would still have to hard-code the values in the application to make the decisions about what to do when they are selected right? I just don't see any other way.
In case anyone is curious, I am using WPF to build this application.