Example #1
0
        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;
        }
Example #2
0
        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;
        }
Example #3
0
        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;
        }
Example #4
0
 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;
 }