Esempio n. 1
0
        protected override void Load()
        {
            mmi = MMInterface.GetMMI();
            Database = new DatabaseConnector();

            this.HookEvent("DB/Event/Added", eventAdded);
            this.HookEvent("CList/DoubleClicked", cListDoubleClicked);
        }
Esempio n. 2
0
        /// <summary>
        /// Load method will be called after finishing all preparations for
        /// loading.
        /// </summary>
        protected override void Load()
        {
            LoadedTypes = new List<Type>();

            Database = new DatabaseConnector();

            string[] settings = Database.EnumSettings("HellAdapter");
            // Call new List<Type> here for making copy of list, because list
            // itself can be changed during plugin loading.
            foreach (Type type in new List<Type>(UnloadedTypes))
            {
                bool hasOption = settings.Contains(type.FullName);
                if ((hasOption && (byte)Database.GetSetting("HellAdapter",
                    type.FullName) == 1) || !hasOption)
                {
                    LoadType(type);
                }
            }

            options = new OptionsPage(HInstance, HLangpack, this);
        }