private void PopulateComboBox(DefaultSettings settings) { this.cboxLanguage.Items.Clear(); // Populate the ComboBox dbRoot myMeta = new dbRoot(); myMeta.LanguageMappingFileName = settings.LanguageMappingFile; myMeta.Language = settings.Language; string[] languages = myMeta.GetLanguageMappings(settings.DbDriver); if (null != languages) { for (int i = 0; i < languages.Length; i++) { this.cboxLanguage.Items.Add(languages[i]); } this.cboxLanguage.SelectedItem = myMeta.Language; if (this.cboxLanguage.SelectedIndex == -1) { // The default doesn't exist, set it to the first in the list this.cboxLanguage.SelectedIndex = 0; } } }
private void PopulateLanguages() { LanguageComboBox.Items.Clear(); LanguageComboBox.SelectedText = ""; string[] languages = _myMeta.GetLanguageMappings(DbDriverComboBox.SelectedValue as string); if (null != languages) { foreach (string language in languages) { LanguageComboBox.Items.Add(language); } } }
private void PopulateLanguages() { this.cboLanguage.Items.Clear(); this.cboLanguage.SelectedText = ""; string[] languages = myMeta.GetLanguageMappings(this.cboDbDriver.SelectedValue as string); if (null != languages) { foreach (string language in languages) { this.cboLanguage.Items.Add(language); } } }