Exemplo n.º 1
0
        private bool ProcessCITEvents(CITPremiere table)
        {
            // Check
            if (null == table)
            {
                return(false);
            }
            if (!table.IsValid)
            {
                return(true);
            }

            // Process all descriptors
            foreach (Descriptor descriptor in table.Descriptors)
            {
                // Load type
                ContentTransmissionPremiere ctp = descriptor as ContentTransmissionPremiere;
                if ((null != ctp) && ctp.IsValid)
                {
                    AddEntry(ctp);
                }
            }

            // Did it
            return(true);
        }
Exemplo n.º 2
0
        private void AddEntry(ContentTransmissionPremiere entry)
        {
            // Attach to the table
            CITPremiere table = (CITPremiere)entry.Table;

            // Information
            string name = null, description = null;

            // Load once once
            bool loaded = false;

            // Process all schedules
            foreach (DateTime schedule in entry.StartTimes)
            {
                // Create a key
                string simpleKey = string.Format("{0}-{1}", entry.ServiceIdentifier, schedule.Ticks);

                // Already collected
                if (m_Entries.ContainsKey(simpleKey))
                {
                    return;
                }

                // Lock out
                m_Entries[simpleKey] = true;

                // Load once
                if (!loaded)
                {
                    // Lock out
                    loaded = true;

                    // Process
                    LoadEventData(out name, out description, table.Descriptors);
                }

                // Remember
                m_ListItems.Add(new EPGEntry(entry.ServiceIdentifier, name, description, schedule.ToLocalTime(), table.Duration, null));
            }
        }