X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=WebThingPlugin.cs;fp=WebThingPlugin.cs;h=56caa4cc43727f4ebf81e211d5fb877e887bae74;hb=fc785e55243b0a680c19ea6ccd77b759fe216766;hp=91c68ca8c9e63a058778d55b2e44f7ce6ce7213f;hpb=85b244419aec2552d114990aa86900aeac83a7e0;p=WebThing.git diff --git a/WebThingPlugin.cs b/WebThingPlugin.cs index 91c68ca..56caa4c 100644 --- a/WebThingPlugin.cs +++ b/WebThingPlugin.cs @@ -1,8 +1,21 @@ +using System; +using System.Collections.Generic; using WebKit; namespace bytex64.WebThing { public abstract class WebThingPlugin { - public abstract void Init(WebThing wt); + protected Dictionary Options; + + public WebThingPlugin() { + string classname = this.GetType().FullName; + + if (Config.PluginOptions.ContainsKey(classname)) + Options = Config.PluginOptions[classname]; + else + Options = new Dictionary(); + } + + public virtual void Init(WebThing wt) {} public virtual void InitWebView(WebView wv) {} } }