|
-
Dec 26th, 2011, 01:35 PM
#40
Re: The "What do you think of how my app looks" thread
In my case it's quite simple. I just have (in a separate project) a Plugin abstract class with some properties that the inheritor has to implement, like the title of the window and a Content property which is a UserControl displayed in the dockable pane. In my main app I check a folder for DLL files and load them into an Assembly object, from which I can get all the types that inherit Plugin. I create an instance of those types (Activator.CreateInstance), and for each type i create a new dockable pane into which i put the UserControl (what the Content property of the plugin returns). That's basically it. The plugins then have an abstract method that I call 4 times a second with new information from the sim, and they can do with that what they want
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|