public static void Save() { InIReader IReader = new InIReader(ConfigPath) { AutoSave = false }; //Paths IReader.Write("Paths", "DataPath", DataPath); IReader.Write("Paths", "MapPath", MapPath); IReader.Write("Paths", "SoundPath", SoundPath); //Graphics IReader.Write("Graphics", "FullScreen", FullScreen); IReader.Write("Graphics", "AlwaysOnTop", TopMost); //Network IReader.Write("Network", "IPAddress", IPAddress); IReader.Write("Network", "Port", Port); //Sound IReader.Write("Sound", "SoundOverLap", SoundOverLap); IReader.Write("Sound", "SoundOn", SoundOn); //Logs IReader.Write("Logs", "LogErrors", LogErrors); IReader.Write("Logs", "LogChat", LogChat); //Game Settings IReader.Write("Game Settings", "ShowItemNames", ShowItemNames); IReader.AutoSave = true; IReader.Save(); }
public static void Save() { InIReader IReader = new InIReader(ConfigPath) { AutoSave = false }; //Path IReader.Write("Path", "MapPath", MapPath); IReader.Write("Path", "LogPath", LogPath); IReader.Write("Path", "ClientPath", ClientPath); //Database IReader.Write("Database", "SQLServer", SQLServer); IReader.Write("Database", "SQLDatabase", SQLDatabase); IReader.Write("Database", "SQLUserID", SQLUserID); IReader.Write("Database", "SQLPassword", SQLPassword); //Network IReader.Write("Network", "IPAddress", IPAddress); IReader.Write("Network", "Port", Port); IReader.Write("Network", "TimeOut", TimeOut); IReader.Write("Network", "MaxUser", MaxUser); IReader.Write("Network", "ReLogTime", ReLogTime); //Security IReader.Write("Security", "CheckVersion", CheckVersion); //Permission IReader.Write("Permission", "AllowNewAccount", AllowNewAccount); IReader.Write("Permission", "AllowChangePassword", AllowChangePassword); IReader.Write("Permission", "AllowLogin", AllowLogin); IReader.Write("Permission", "AllowNewCharacter", AllowNewCharacter); IReader.Write("Permission", "AllowDeleteCharacter", AllowDeleteCharacter); IReader.Write("Permission", "AllowStartGame", AllowStartGame); //Game IReader.Write("Game", "DropRange", DropRange); IReader.Write("Game", "DropStackSize", DropStackSize); IReader.Write("Game", "ItemTimeOut", ItemTimeOut); IReader.Write("Game", "ExpRate", ExpRate); IReader.Write("Game", "DropRate", DropRate); IReader.Write("Game", "StartLevel", StartLevel); IReader.Write("Game", "StartGold", StartGold); IReader.AutoSave = true; IReader.Save(); Main.EnqueueMessage("Config file Saved."); }