示例#1
0
 public static void AddBoolBoxForAllFunction(string fileWithConfigPath)
 {
     OpenConfigFile(fileWithConfigPath);
     foreach (KeyValuePair <string, OptionValueString> pair in actualModConfig.configFiles.Last().Value.options)
     {
         ModConfigClasses.BoolBox Box = new ModConfigClasses.BoolBox(fileWithConfigPath, pair.Key, pair.Key);
         //Box.ContextMenuStrip = GUIContextMenu;
         ((ModConfigClasses.ModConfigBox)Box).ApplyValue(actualModConfig.configFiles, ModConfigClasses.ApplyType.inGoose);
         setPosition(Box);
         actualModConfig.configGUI.Add(Box);
     }
 }
示例#2
0
        public static void AddBoolBoxFunction(string fileWithConfigPath, string configOptionName, string showedName)
        {
            OpenConfigFile(fileWithConfigPath);

            if (File.Exists(fileWithConfigPath))
            {
                ModConfigClasses.BoolBox Box = new ModConfigClasses.BoolBox(fileWithConfigPath, configOptionName, showedName);
                //Box.ContextMenuStrip = GUIContextMenu;
                ((ModConfigClasses.ModConfigBox)Box).ApplyValue(actualModConfig.configFiles, ModConfigClasses.ApplyType.inGoose);
                setPosition(Box);
                actualModConfig.configGUI.Add(Box);
            }
            else
            {
                Console.WriteLine(fileWithConfigPath);
            }
        }