private void LoadEpgA(string filename) { EPGData = new CEPGData(); if (!File.Exists(filename)) { return; } XmlSerializer xs = null; FileStream fs = null; try { xs = new XmlSerializer(typeof(CEPGData)); fs = new FileStream(filename, FileMode.Open); EPGData = (CEPGData)xs.Deserialize(fs); } catch (Exception e) { LogError(e.Message); EPGData = new CEPGData(); } finally { if (fs != null) { fs.Close(); } } EPGData.MakeDictionary(); EPGData.CheckReferences(); EPGData.Sort(); EPGData.SplitByDate(); GetUsedDates(); EPGData.HasChanged = false; }
void AfterUpdateAll(bool succeeded) { if (!succeeded) { ClearEPG(); OnTaskEvent(ESimpleEvent.failed); return; } EPGData.Sort(); EPGData.SplitByDate(); GetUsedDates(); EPGData.HasChanged = true; EPGUserData.DoAutoSchedule(); OnTaskEvent(ESimpleEvent.finished); }
private void LoadXMLTvFileA(string filename) { EPGData = new CEPGData(); if (!File.Exists(filename)) { return; } try { EPGData.ReadData(filename); } catch (Exception e) { LogError(e.Message); EPGData = new CEPGData(); } EPGData.MakeDictionary(); EPGData.CheckReferences(); EPGData.Sort(); EPGData.SplitByDate(); GetUsedDates(); EPGData.HasChanged = true; }
private void LoadXMLTvFileA(string filename) { EPGData = new CEPGData(); if (!File.Exists(filename)) return; try { EPGData.ReadData(filename); } catch (Exception e) { LogError(e.Message); EPGData = new CEPGData(); } EPGData.MakeDictionary(); EPGData.CheckReferences(); EPGData.Sort(); EPGData.SplitByDate(); GetUsedDates(); EPGData.HasChanged = true; }
private void LoadEpgA(string filename) { EPGData = new CEPGData(); if (!File.Exists(filename)) return; XmlSerializer xs = null; FileStream fs = null; try { xs = new XmlSerializer(typeof(CEPGData)); fs = new FileStream(filename, FileMode.Open); EPGData = (CEPGData)xs.Deserialize(fs); } catch (Exception e) { LogError(e.Message); EPGData = new CEPGData(); } finally { if (fs != null) fs.Close(); } EPGData.MakeDictionary(); EPGData.CheckReferences(); EPGData.Sort(); EPGData.SplitByDate(); GetUsedDates(); EPGData.HasChanged = false; }