/[xmltv_parser]/trunk/libxmltv/Core/XMLTVChannelCollection.cs
ViewVC logotype

Diff of /trunk/libxmltv/Core/XMLTVChannelCollection.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 36 by william, Fri Mar 8 02:13:59 2013 UTC revision 43 by william, Fri Mar 8 03:09:49 2013 UTC
# Line 5  using System.Text; Line 5  using System.Text;
5  using libxmltv.Interfaces;  using libxmltv.Interfaces;
6  using System.Diagnostics;  using System.Diagnostics;
7  using System.Xml.Linq;  using System.Xml.Linq;
8    using System.Windows.Forms;
9    
10  namespace libxmltv.Core  namespace libxmltv.Core
11  {  {
# Line 38  namespace libxmltv.Core Line 39  namespace libxmltv.Core
39              {              {
40                  Channel channel = new Channel(c);                  Channel channel = new Channel(c);
41                  entries.Add(channel.Id, channel);                  entries.Add(channel.Id, channel);
42                    Application.DoEvents();
43              }              }
44          }          }
45          public override string ToString()          public override string ToString()
46          {          {
47              //return string.Format("XmlTv Source: '{0}' (Generated by: '{1}') (support: '{2}')", SourceName, GeneratorName, GeneratorUrl);              return string.Format("Channel Count: {0}", Collection == null ? 0 : Collection.Count);
             return string.Empty;  
48          }          }
49      }      }
50      [Serializable]      [Serializable]
# Line 61  namespace libxmltv.Core Line 62  namespace libxmltv.Core
62          {          {
63              // get the channel id              // get the channel id
64              Id = e.Attribute(XMLTVConstants.Channels.ChannelId).Value;              Id = e.Attribute(XMLTVConstants.Channels.ChannelId).Value;
65                XMLTV_LOGGER.Log.Verbose.Debug.WriteLine("\tchannel_id: {0}", Id);
66              var names = e.Descendants(XMLTVConstants.Channels.ChannelDisplayName).ToList();              var names = e.Descendants(XMLTVConstants.Channels.ChannelDisplayName).ToList();
67              Number = Convert.ToInt32(names[1].Value);              Number = Convert.ToInt32(names[1].Value);
68                XMLTV_LOGGER.Log.Verbose.Debug.WriteLine("\tchannel_number: {0}", Number);
69              CallSign = names[2].Value;              CallSign = names[2].Value;
70                XMLTV_LOGGER.Log.Verbose.Debug.WriteLine("\tchannel_callsign: {0}", CallSign);
71              Name = names[3].Value;              Name = names[3].Value;
72                XMLTV_LOGGER.Log.Verbose.Debug.WriteLine("\tchannel_name: {0}", Name);
73          }          }
74          #region IXMLTVChannel members          #region IXMLTVChannel members
75          public string Id { get; private set; }          public string Id { get; private set; }

Legend:
Removed from v.36  
changed lines
  Added in v.43

  ViewVC Help
Powered by ViewVC 1.1.22