예제 #1
0
        static private ConfigSection GetSectionForPlugin(ModToolPlugin tool)
        {
            string sectionName = tool.GetType().Name;

            if (!s_pluginsConfig.ContainsValue(sectionName))
            {
                s_pluginsConfig[sectionName] = new ConfigSection(sectionName);
            }
            return(s_pluginsConfig[sectionName]);
        }
예제 #2
0
        static public string PlugInGetValue(ModToolPlugin tool, string key)
        {
            ConfigSection pluginSection = GetSectionForPlugin(tool);

            if (pluginSection.ContainsValue(key))
            {
                return(pluginSection[key]);
            }
            return(null);
        }
예제 #3
0
        static public void PlugInRemoveValue(ModToolPlugin tool, string key)
        {
            ConfigSection pluginSection = GetSectionForPlugin(tool);

            pluginSection.RemoveValue(key);
        }
예제 #4
0
        static public void PlugInSetValue(ModToolPlugin tool, string key, string val)
        {
            ConfigSection pluginSection = GetSectionForPlugin(tool);

            pluginSection[key] = val;
        }