예제 #1
0
        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);
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
        protected override void OnNoClick(Game g, Widget w)
        {
            CloseOverlay();
            EntryList denied = PluginLoader.Denied;

            if (IndexOfWidget(w) >= 2 && !denied.Has(Metadata))
            {
                denied.Add(Metadata);
            }
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
            }
        }
예제 #7
0
        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);
        }