CodeTV.FrequencyEditorForm.comboBoxCountry_SelectedIndexChanged C# (CSharp) Method

comboBoxCountry_SelectedIndexChanged() private method

private comboBoxCountry_SelectedIndexChanged ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void comboBoxCountry_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.currentFrequencies != null)
            {
                this.comboBoxRegion.Items.Clear();
                if (this.currentFrequencies.TryGetValue((string)this.comboBoxCountry.SelectedItem, out this.currentCountries))
                {
                    foreach (string region in this.currentCountries.Keys)
                        this.comboBoxRegion.Items.Add(region);
                }
                this.comboBoxRegion.SelectedIndex = 0;
            }
        }