internal static void SaveSettings(Settings settings) { string path = GetSettingsPath(); string xml = SimpleXmlSerializer.Serialize(settings); File.WriteAllText(path, xml); }
internal static Settings GetSettings() { if (currentSettings == null) { string path = GetSettingsPath(); string xml; if (File.Exists(path)) { xml = File.ReadAllText(path); currentSettings = (Settings)SimpleXmlSerializer.Deserialize(xml); } else { currentSettings = Settings.GetDefault(); } } return(currentSettings); }