private void LoadUserDataA(string filename) { EPGUserData = new CEPGUserData(); if (!File.Exists(filename)) { return; } XmlSerializer xs = null; FileStream fs = null; try { xs = new XmlSerializer(typeof(CEPGUserData)); fs = new FileStream(filename, FileMode.Open); EPGUserData = (CEPGUserData)xs.Deserialize(fs); } catch (Exception e) { LogError(e.Message); EPGUserData = new CEPGUserData(); } finally { if (fs != null) { fs.Close(); } } EPGUserData.HasChanged = true; }
private void LoadUserDataA(string filename) { EPGUserData = new CEPGUserData(); if (!File.Exists(filename)) return; XmlSerializer xs = null; FileStream fs = null; try { xs = new XmlSerializer(typeof(CEPGUserData)); fs = new FileStream(filename, FileMode.Open); EPGUserData = (CEPGUserData)xs.Deserialize(fs); } catch (Exception e) { LogError(e.Message); EPGUserData = new CEPGUserData(); } finally { if (fs != null) fs.Close(); } EPGUserData.HasChanged = true; }