I have color scheme for my code editor in a settings file in the project. I have a several similar settings files each containing different color scheme.
To make those settings selectable on runtime, I need them to implement ColorScheme interface.
So far so good, code works fine, with only one major annoyance: each time settings are changed, the interface part is removed from Designer file, so the code doesn't find them anymore.
Is there a way to force code generator to add my interface to generated class? Or is it other workaround for this? I tried to make designer file readonly, but then I see lots of annoying VS dialogs.
Without the interface, I can't cast settings class on anything. I could probably read its properties via Reflection, but this approach looks like an ugly hack.