My Project
I'm writing a Winform application using VS C# 2.0 which consists in several libraries and two executables, each in its own project file and all part of the same solution.
Each project has its own Settings Class which configuration parameters. Some parameters are project specific, some are needed by more than one project (but none for all), and others depend on the model of a hardware device connected via USB to the user machine (and are selected at runtime).
The Setting Class consists on enumerations, properties and Load and Save methods.
Currently I have a form with a property grid which instantiates all the settings from all the classes and lets the user change the configuration. It belongs to the main executable project.
My problem
I need a way for the users to configure the whole application (let's call it a configurator), so I tried to create another project which would have the form with the property grid, but ended with a circular reference problem between the configurator and my main executable. The configurator needs to run on its own or be called from the main executable.
Also, I don't know a good way to replicate changes to the value of a common parameter to its counterparts. For instance, if parameter p is common to the settings classes of projects A and B, when a user changes A.p value, the configurator would have to change B.p value (and the same for the inverse). The only solution I've thought to resolve this involves a nightmare of if clauses on the PropertyValueChanged event handler of the property grid.
Thanks, Heiddy