I am charged with designing a system composed of 1) a GUI that handles communication with a device and 2) DLLs that represent modes in which the device will operate.
Each mode requires different configuration details so the idea is to have each DLL contain a method to produce a control-filled panel that can be placed in the GUI.
My work in C# up to now has been a bit less involved and I’m not sure how to implement this kind of functionality. I have not been successful in locating help or examples of this kind of implementation. Can someone point me in the right direction?
You will need a base dll that has your interfaces and base classes. The other dll’s will then reference that base dll and extend/derive/implement those base classes/interfaces.
For example, if you have a dll (Base.dll) that has an interface like:
Then your other two dll’s (One.dll and Two.dll) will reference Base.dll and implement CoolGui in their UI.
EDIT:
And of course, you will need to load in your dll’s dynamically and use reflection to get the correct instances of your interface/base class. Here’s a codeproject article to help: http://www.codeproject.com/KB/cs/DynLoadClassInvokeMethod.aspx