Example #1
0
        private static void CreateFileSettings(string path)
        {
            INIManager manager = new INIManager(path);

            manager.WritePrivateString("SizeWindow", "width", "110");
            manager.WritePrivateString("SizeWindow", "height", "33");

            manager.WritePrivateString("Game", "SizeArea", "5");
            manager.WritePrivateString("Game", "ColorAreaBackground", "Black");
            manager.WritePrivateString("Game", "ColorAreaText", "White");
            manager.WritePrivateString("Game", "ColorHighlighting", "Gray");
            manager.WritePrivateString("Game", "ColorHighlightingWord", "Gray");
            manager.WritePrivateString("Game", "ColorGuessedWord", "Red");
            manager.WritePrivateString("Game", "ColorRandomGuessedWord", "True");
        }
Example #2
0
        public static void ChangeFileSettings(string path, string[] setting)
        {
            // setting[0] - Поле настройки
            // setting[1] - Имя настройки
            // setting[2] - Значение настройки
            if (!File.Exists(path))
            {
                CreateFileSettings(path);
            }
            INIManager manager = new INIManager(path);

            manager.WritePrivateString(setting[0], setting[1], setting[2]);
        }