[C#] Loading Libraries Outside of Project?

Started by G_G, December 26, 2010, 01:39:13 pm

Previous topic - Next topic

G_G

December 26, 2010, 01:39:13 pm Last Edit: February 18, 2013, 03:26:58 pm by Ryex
I want to be able to have a plugin system for my event editor or for later programs that can have customization and what not. So basically what I need (if its possible) is to be able to load a dll thats been coded in c# but I'll need to load it externally.

So basically I'll have a "Plugins" folder and the program will read all files from it and insert the plugin where its defined. My plugin template would look something like this for my event editor.
using Statements;
namespace Plugin_Name
{
    public class EvPlugin // Name may need to be specific depending if this system even works
    {
        // Variables must be named this way
        string event_name = ""; // Name of event command
        string event_code = ""; // Code that gets executed or something
       
    }
    public class EvPluginForm : System.Windows.Forms.Form // Form dialog that sets event command settings and what not
    {
        public EvPluginForm()
        {
           
        }
    }
}


Something like that. It'll be more advanced and have more options and stuff.

Blizzard

Eh, monster necro here.

I can give you the source code of Class Tools. I have implemented a relatively simple plugin system. Adding an additional control to plugins isn't a problem.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G


Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

February 25, 2011, 06:09:11 pm #4 Last Edit: February 25, 2011, 06:18:00 pm by game_guy
Blizz because of you I can now do what I've wanted to do.

Create a full fledge ToA config app. Each add-on has its own Form to configure the options which is coded in a DLL. I think imma start on it now. Which'll make updating the ToA app and add-ons much much easier when ToA gets updated.