CodeTV.TransponderReader.GetFrequencies C# (CSharp) Method

GetFrequencies() public static method

public static GetFrequencies ( TunerType type ) : Dictionary>>
type TunerType
return Dictionary>>
        public static Dictionary<string, Dictionary<string, List<string>>> GetFrequencies(TunerType type)
        {
            switch (type)
            {
                case TunerType.DVBT:
                    if (dvbtChannels == null)
                        Read("\\Transponders\\TerFiles\\", "TERTYPE", out dvbtChannels);
                    return dvbtChannels;
                case TunerType.DVBC:
                    if (dvbcChannels == null)
                        Read("\\Transponders\\CabFiles\\", "CABTYPE", out dvbcChannels);
                    return dvbcChannels;
                case TunerType.DVBS:
                    if (dvbsChannels == null)
                        Read("\\Transponders\\SatFiles\\", "SATTYPE", out dvbsChannels);
                    return dvbsChannels;
                case TunerType.Analogic:
                    return null;
            }
            return null;
        }

Usage Example

コード例 #1
0
        private void FrequencyForm_Load(object sender, EventArgs e)
        {
            if (this.channel is ChannelDVBT)
            {
                this.currentFrequencies = TransponderReader.GetFrequencies(TunerType.DVBT);
            }
            else if (this.channel is ChannelDVBC)
            {
                this.currentFrequencies = TransponderReader.GetFrequencies(TunerType.DVBC);
            }
            else if (this.channel is ChannelDVBS)
            {
                this.currentFrequencies = TransponderReader.GetFrequencies(TunerType.DVBS);
            }

            if (this.currentFrequencies != null)
            {
                this.comboBoxCountry.Items.Clear();
                if (currentFrequencies != null)
                {
                    foreach (string country in this.currentFrequencies.Keys)
                    {
                        this.comboBoxCountry.Items.Add(country);
                    }
                }
                if (this.comboBoxCountry.Items.Count > 0)
                {
                    this.comboBoxCountry.SelectedIndex = 0;
                }
            }
        }
All Usage Examples Of CodeTV.TransponderReader::GetFrequencies