コード例 #1
0
ファイル: HellManager.cs プロジェクト: ForNeVeR/hell-api
        /// <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);
        }
コード例 #2
0
ファイル: OptionPlugin.cs プロジェクト: ForNeVeR/hell-api
 /// <summary>
 /// Load method will be called on plugin load.
 /// </summary>
 protected override void Load()
 {
     options = new OptionsPage(HInstance, HLangpack);
 }