Esempio n. 1
0
        public void AddPlugin(string key, ref PluginBase plugin, bool loaded)
        {
            Assembly plugAss = plugin.GetType().Assembly;

            string fileName = Path.GetFileName(plugAss.Location);

            _Plugins.Add(key, new PluginLoadInfo(loaded, fileName, plugin.GetType().FullName));

            if (loaded)
            {
                _PluginsLoaded.Add(key, plugin);
            }
        }
Esempio n. 2
0
 public void AddPlugin(string key, ref PluginBase plugin)
 {
     this.AddPlugin(key, ref plugin, false);
 }
Esempio n. 3
0
 protected abstract void RemoveFromPluginsMenu(PluginBase plugin);
Esempio n. 4
0
 protected abstract void AddToPluginsMenu(PluginBase plugin);
Esempio n. 5
0
 public virtual void UnloadPlugin(PluginBase plugin)
 {
     this.PluginsLoaded.Remove(plugin);
     RemoveFromPluginsMenu(plugin);
 }
Esempio n. 6
0
 public void RemovePlugin(PluginBase plugin)
 {
     _Plugins.RemoveByKey(plugin.GetType().FullName);
     _PluginsLoaded.Remove(plugin);
 }