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); } }
public void AddPlugin(string key, ref PluginBase plugin) { this.AddPlugin(key, ref plugin, false); }
protected abstract void RemoveFromPluginsMenu(PluginBase plugin);
protected abstract void AddToPluginsMenu(PluginBase plugin);
public virtual void UnloadPlugin(PluginBase plugin) { this.PluginsLoaded.Remove(plugin); RemoveFromPluginsMenu(plugin); }
public void RemovePlugin(PluginBase plugin) { _Plugins.RemoveByKey(plugin.GetType().FullName); _PluginsLoaded.Remove(plugin); }