CodeTV.FrequencyEditorForm.FrequencyForm_Load C# (CSharp) Method

FrequencyForm_Load() private method

private FrequencyForm_Load ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        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;
            }
        }