I am experimenting with the plugin architecture for my company's internal business system. I was able to read all .DLLs in the Plugin folder that implement a specific interface. What I'm trying to figure out is the best way to communicate between the parent MDI host application and the forms that will be in the .DLL that I intend to make MDI children.
Currently, I am only returning ToolStripMenuItem objects from .DLL to be added to the parent MDI. I also tested that events connected in .LLL to ToolStripMenuItems propagate to code in .LLL. I also managed to return the Form object through the interface and open this form, as the plugin folder is "scanned".
However, I do not quite understand how I will make these forms MDI children. In addition, any other forms living in .LLL must also be MDI children. I created the VS 2008 Addin project to see what is happening, and it seems that Addin is accepting the Application object to which it adds ToolStripMenuItems, and performs other operations. Code for creating a menu inside .DLL. This is the opposite of what I have done so far when the MDI requests a ToolStripMenuItem from each .DLL and adds the returned object to its own menu.
Will my plugin architecture accept an application object in the same way as I could get forms to open as an MDI parent? Am I asking others, currently unknown to me, for headaches, NOT passing the application object to .DLL?