internal static void RunConfigCheck() { if (!ini_file.Exists()) { CreateINIFile(); } user = ini_file.ReadString("SETTINGS", "LoginName"); pass = ini_file.ReadString("SETTINGS", "LoginPass"); skip = ini_file.ReadBoolean("SETTINGS", "SkipLogin"); unit = ini_file.ReadString("SETTINGS", "UnitNumber"); if (String.IsNullOrWhiteSpace(user)) { user = "******"; } if (String.IsNullOrWhiteSpace(pass)) { pass = "******"; } if (String.IsNullOrWhiteSpace(unit)) { unit = "1-A-12"; } foreach (string key in ini_file.GetKeyNames("VEHICLE BACKGROUNDS")) { bgs.Add(Game.GetHashKey(key), ini_file.ReadString("VEHICLE BACKGROUNDS", key)); } }
internal static void RunConfigCheck() { if (!ini_file.Exists()) { CreateINIFile(); } user = ini_file.ReadString("SETTINGS", "LoginName"); pass = ini_file.ReadString("SETTINGS", "LoginPass"); skip = ini_file.ReadBoolean("SETTINGS", "SkipLogin"); unit = ini_file.ReadString("SETTINGS", "UnitNumber"); FontSize = ini_file.ReadInt32("SETTINGS", "FontSize"); FontName = ini_file.ReadString("SETTINGS", "FontName"); randomHistoryRecords = ini_file.ReadBoolean("SETTINGS", "RandomHistoryRecords", true); displayPedImage = ini_file.ReadBoolean("SETTINGS", "DisplayPedImage", true); displayVehicleImage = ini_file.ReadBoolean("SETTINGS", "DisplayVehicleImage", true); enableLSPDFRPlusIntegration = ini_file.ReadBoolean("SETTINGS", "EnableLSPDFRPlusIntegration", true); if (String.IsNullOrWhiteSpace(user)) { user = "******"; } if (String.IsNullOrWhiteSpace(pass)) { pass = "******"; } if (String.IsNullOrWhiteSpace(unit)) { unit = "1-A-12"; } FontSize = FontSize > 0 ? FontSize : 16; FontName = !String.IsNullOrWhiteSpace(FontName) ? FontName : "Microsoft Sans Serif"; foreach (string key in ini_file.GetKeyNames("VEHICLE BACKGROUNDS")) { bgs.Add(Game.GetHashKey(key), ini_file.ReadString("VEHICLE BACKGROUNDS", key)); } ParseKeybindings(); }