private void btnLanguagesSettings_Click(object sender, RoutedEventArgs e) { if (this.cbLanguages.SelectedIndex > -1) { int index = cbLanguages.SelectedIndex; LanguagesForm setting = new LanguagesForm(true, index); setting.ShowDialog(); if (setting.DialogResult.HasValue && setting.DialogResult.Value) { this.RefreshLanguageList(); this.cbLanguages.SelectedIndex = index; } } }
private void btnLanguagesAdd_Click(object sender, RoutedEventArgs e) { if (this.cbPages.SelectedIndex > -1) { LanguagesForm add = new LanguagesForm(); add.ShowDialog(); if (add.DialogResult.HasValue && add.DialogResult.Value) { RefreshLanguageList(); } this.cbLanguages.SelectedIndex = this.cbLanguages.Items.Count - 1; } else { showPageNotSelectedError(); } }