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