static List <string> LoadPlugins(string dir) { string[] dlls = Directory.GetFiles(dir, "*.dll"); List <string> nonLoaded = null; for (int i = 0; i < dlls.Length; i++) { string plugin = Path.GetFileNameWithoutExtension(dlls[i]); if (Denied.Has(plugin)) { continue; } if (Accepted.Has(plugin)) { Load(plugin, false); } else if (nonLoaded == null) { nonLoaded = new List <string>(); nonLoaded.Add(plugin); } else { nonLoaded.Add(plugin); } } return(nonLoaded); }
protected override void OnNoClick(Game g, Widget w) { game.Gui.DisposeOverlay(this); EntryList denied = PluginLoader.Denied; if (IsAlways(w) && !denied.Has(Plugin)) { denied.Add(Plugin); } }
protected override void OnNoClick(Game g, Widget w) { CloseOverlay(); EntryList denied = PluginLoader.Denied; if (IndexOfWidget(w) >= 2 && !denied.Has(Metadata)) { denied.Add(Metadata); } }
protected override void OnYesClick(Game g, Widget w) { game.Gui.DisposeOverlay(this); EntryList accepted = PluginLoader.Accepted; if (IsAlways(w) && !accepted.Has(Plugin)) { accepted.Add(Plugin); } PluginLoader.Load(Plugin, true); }
protected override void OnYesClick(Game g, Widget w) { CloseOverlay(); EntryList accepted = PluginLoader.Accepted; if (IndexOfWidget(w) >= 2 && !accepted.Has(Metadata)) { accepted.Add(Metadata); } PluginLoader.Load(Metadata, true); }
protected override void OnNoClick(Game g, Widget w, MouseButton btn, int x, int y) { if (btn != MouseButton.Left) { return; } CloseOverlay(); EntryList denied = PluginLoader.Denied; if (IndexOfWidget(w) >= 2 && !denied.Has(Metadata)) { denied.Add(Metadata); } }
protected override void OnYesClick(Game g, Widget w, MouseButton btn, int x, int y) { if (btn != MouseButton.Left) { return; } CloseOverlay(); EntryList accepted = PluginLoader.Accepted; if (IndexOfWidget(w) >= 2 && !accepted.Has(Metadata)) { accepted.Add(Metadata); } PluginLoader.Load(Metadata, true); }