Пример #1
0
        private void ReadAnalogChannels(SQLiteCommand cmd)
        {
            string[] fieldNames = { "channel_handle", "channel_number", "list_bits", "channel_label", "frequency" };
            var      sql        = this.GetQuery("EuroATVChanList", fieldNames);
            var      fields     = this.GetFieldMap(fieldNames);

            cmd.CommandText = sql;
            using (var r = cmd.ExecuteReader())
            {
                while (r.Read())
                {
                    ChannelInfo channel = new DbChannel(SignalSource.Analog, r, fields, this.DataRoot, this.channelInfoByUid);
                    if (!channel.IsDeleted)
                    {
                        this.DataRoot.AddChannel(this.atvChannels, channel);
                    }
                }
            }
        }
Пример #2
0
        private void ReadDigitalChannels(SQLiteCommand cmd, string table, SignalSource signalSource, ChannelList tvChannels, ChannelList radioChannels)
        {
            string[] fieldNames = { "channel_handle",   "channel_number", "channel_label", "frequency", "list_bits",
                                    "dvb_service_type", "onid",           "tsid",          "sid",       "sat_id", "channel_order" };
            var      sql    = this.GetQuery(table, fieldNames);
            var      fields = this.GetFieldMap(fieldNames);

            cmd.CommandText = sql;
            using (var r = cmd.ExecuteReader())
            {
                while (r.Read())
                {
                    ChannelInfo channel = new DbChannel(signalSource, r, fields, this.DataRoot, this.channelInfoByUid);
                    if (!channel.IsDeleted)
                    {
                        var channelList = (channel.SignalSource & SignalSource.Radio) != 0 ? radioChannels : tvChannels;
                        this.DataRoot.AddChannel(channelList, channel);
                    }
                }
            }
        }
Пример #3
0
    private void ReadDigitalChannels(SQLiteCommand cmd, string table, SignalSource signalSource, ChannelList tvChannels, ChannelList radioChannels)
    {
      string[] fieldNames = { "channel_handle", "channel_number", "channel_label", "frequency", "list_bits",
                            "dvb_service_type", "onid", "tsid", "sid", "sat_id", "channel_order" };
      var sql = this.GetQuery(table, fieldNames);
      var fields = this.GetFieldMap(fieldNames);

      cmd.CommandText = sql;
      using (var r = cmd.ExecuteReader())
      {
        while (r.Read())
        {
          ChannelInfo channel = new DbChannel(signalSource, r, fields, this.DataRoot, this.channelInfoByUid);
          if (!channel.IsDeleted)
          {
            var channelList = (channel.SignalSource & SignalSource.Radio) != 0 ? radioChannels : tvChannels;
            this.DataRoot.AddChannel(channelList, channel);
          }
        }
      }
    }
Пример #4
0
 private void ReadAnalogChannels(SQLiteCommand cmd)
 {
   string[] fieldNames = {"channel_handle", "channel_number", "list_bits", "channel_label", "frequency"};
   var sql = this.GetQuery("EuroATVChanList", fieldNames);
   var fields = this.GetFieldMap(fieldNames);
   
   cmd.CommandText = sql;
   using (var r = cmd.ExecuteReader())
   {
     while (r.Read())
     {
       ChannelInfo channel = new DbChannel(SignalSource.Analog, r, fields, this.DataRoot, this.channelInfoByUid);
       if (!channel.IsDeleted)
         this.DataRoot.AddChannel(this.atvChannels, channel);
     }
   }
 }