public void ReadXml() { if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "//Gnome Extractor//settings.xml")) { XmlSerializer ser = new XmlSerializer(typeof(SettingsFields)); TextReader reader = new StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "//Gnome Extractor//settings.xml"); Fields = ser.Deserialize(reader) as SettingsFields; reader.Close(); Globals.Logger.Debug("Settings.xml has been loaded"); } else Globals.Logger.Error("Settings.xml not found"); }
public void ReadXml() { if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "//Gnome Extractor//settings.xml")) { XmlSerializer ser = new XmlSerializer(typeof(SettingsFields)); TextReader reader = new StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "//Gnome Extractor//settings.xml"); Fields = ser.Deserialize(reader) as SettingsFields; reader.Close(); Globals.Logger.Debug("Settings.xml has been loaded"); } else { Globals.Logger.Error("Settings.xml not found"); } }
public Settings() { Fields = new SettingsFields(); }