GetFrequencies() public static method

public static GetFrequencies ( TunerType type ) : Dictionary>>
type TunerType
return Dictionary>>
コード例 #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;
                }
            }
        }
コード例 #2
0
ファイル: WizardForm.cs プロジェクト: friman/Digital-Signage
        // wizardPageScanner

        private void InitializeWizardPageScanner()
        {
            ChannelTV channelTV = this.propertyGridChannel.SelectedObject as ChannelTV;

            if (channelTV != null)
            {
                switch (channelTV.TunerType)
                {
                case TunerType.DVBT:
                    this.currentFrequencies = TransponderReader.GetFrequencies(TunerType.DVBT);
                    break;

                case TunerType.DVBC:
                    this.currentFrequencies = TransponderReader.GetFrequencies(TunerType.DVBC);
                    break;

                case TunerType.DVBS:
                    this.currentFrequencies = TransponderReader.GetFrequencies(TunerType.DVBS);
                    break;

                case TunerType.Analogic:
                    this.currentFrequencies = TransponderReader.GetFrequencies(TunerType.Analogic);
                    break;
                }

                if (this.currentFrequencies != null)
                {
                    this.comboBoxScanCountry.Items.Clear();
                    if (this.currentFrequencies != null)
                    {
                        foreach (string country in this.currentFrequencies.Keys)
                        {
                            this.comboBoxScanCountry.Items.Add(country);
                        }
                    }
                    if (this.comboBoxScanCountry.Items.Count > 0)
                    {
                        this.comboBoxScanCountry.SelectedIndex = 0;
                    }

                    this.tabControlScanner.Enabled = true;
                }
                else
                {
                    this.comboBoxScanCountry.Items.Clear();
                    this.comboBoxScanRegion.Items.Clear();
                    this.tabControlScanner.Enabled = false;
                }
            }
        }