コード例 #1
0
 void PopulateDvbCombo(ComboBox combo, DvbTuningInfoPropertyGetter property_getter)
 {
     combo.Items.Clear();
     foreach (int property_value in GetLineupDvbPropertyValues(SelectedLineup, property_getter))
     {
         combo.Items.Add(property_value);
     }
 }
コード例 #2
0
 private static List<int> GetLineupDvbPropertyValues(Lineup lineup, DvbTuningInfoPropertyGetter property_getter)
 {
     List<int> values = new List<int>();
     foreach (Channel ch in lineup.GetChannels())
         if (ch.TuningInfos != null)
             foreach (TuningInfo ti in ch.TuningInfos)
                 if (ti is DvbTuningInfo)
                     values.Add(property_getter((DvbTuningInfo)ti));
     values = values.Distinct().ToList();
     values.Sort();
     return values;
 }
コード例 #3
0
        static private List <int> GetLineupDvbPropertyValues(Lineup lineup, DvbTuningInfoPropertyGetter property_getter)
        {
            List <int> values = new List <int>();

            foreach (Channel ch in lineup.GetChannels())
            {
                if (ch.TuningInfos != null)
                {
                    foreach (TuningInfo ti in ch.TuningInfos)
                    {
                        if (ti is DvbTuningInfo)
                        {
                            values.Add(property_getter((DvbTuningInfo)ti));
                        }
                    }
                }
            }
            values = values.Distinct().ToList();
            values.Sort();
            return(values);
        }
コード例 #4
0
 void PopulateDvbCombo(ComboBox combo, DvbTuningInfoPropertyGetter property_getter)
 {
     combo.Items.Clear();
     foreach (int property_value in GetLineupDvbPropertyValues(SelectedLineup, property_getter))
         combo.Items.Add(property_value);
 }