public SettingsManager() { this.settings = new Settings(); this.settingsFilePath = System.IO.Directory.GetCurrentDirectory() + "\\" + "settings.xml"; }
public bool Read() { try { XmlSerializer serializer = XmlSerializer.FromTypes(new[] { typeof(Settings) })[0]; using (FileStream fs = new FileStream(this.settingsFilePath, FileMode.Open)) { this.settings = (Settings)serializer.Deserialize(fs); } } catch (Exception) { return false; } return true; }