Beispiel #1
0
        public bool RegistWindow(string name, Form window, ModuleBase module)
        {
            WindowItem wi = new WindowItem();

            wi.Name   = name;
            wi.Window = window;
            Windows.Add(wi);
            return(true);
        }
Beispiel #2
0
        public bool RegistPlugin(PluginItem pl)
        {
            bool       rlt;
            ModuleBase module = pl.Module;

            rlt = EnumPluginItem(delegate(PluginItem existedPl)
            {
                ModuleBase existedModule = existedPl.Module;
                if (module.Name.Equals(existedModule.Name))
                {
                    if (existedModule.IsSingleton)
                    {
                        return(false);
                    }
                }
                return(true);
            });
            Plugins.Add(pl);
            pl.IsRegisted = true;
            //* Debug
            Logger.Log("Registing: " + pl.Module.Name + " " + pl.IsRegisted);
            //*/
            return(rlt);
        }