private ACSSettings GetACSSettings(string path) { ACSSettings settings = null; try { XmlSerializer serializer = new XmlSerializer(typeof(ACSSettings)); Stream fs = File.OpenRead(path); settings = (ACSSettings)serializer.Deserialize(fs); fs.Close(); } catch (Exception ex) { Trace.WriteLine("Failed to load ACSSettings: " + ex.Message); } return(settings); }
/// <summary> /// SaveACSSettings to XML File /// </summary> /// <param name="setting">ACS Settings to write to disk.</param> public void SaveACSSettings(ACSSettings setting) { string path = GetFullPath(ACSSettingsFileName); SaveXML <ACSSettings>(setting, path); }