void contextMenuResxFile_Opening(object sender, CancelEventArgs e) { this.cbCultureInfos.Items.Clear(); var file = ((ResourceFileTreeNode)this.treeView.SelectedNode).File; var otherUsedCultures = file.FileGroup.Files.Keys .Except(new CultureInfo[] { file.Culture }); var list = allCultures.Except(otherUsedCultures); foreach (CultureInfo culture in list.OrderBy(c => c.DisplayName)) { var item = new CulturesComboBoxItem(culture); this.cbCultureInfos.Items.Add(item); if (culture.Name == file.Culture.Name) { this.cbCultureInfos.SelectedItem = item; } } this.cbCultureInfos.SelectedIndexChanged += new EventHandler(cbCultureInfos_SelectedIndexChanged); }
void contextMenuResxFile_Opening(object sender, CancelEventArgs e) { this.cbCultureInfos.Items.Clear(); var file = ((ResourceFileTreeNode)this.treeView.SelectedNode).File; var otherUsedCultures = file.FileGroup.Files.Keys .Except(new CultureInfo[] {file.Culture}); var list = allCultures.Except(otherUsedCultures); foreach (CultureInfo culture in list.OrderBy(c => c.DisplayName)) { var item = new CulturesComboBoxItem(culture); this.cbCultureInfos.Items.Add(item); if(culture.Name == file.Culture.Name) this.cbCultureInfos.SelectedItem = item; } this.cbCultureInfos.SelectedIndexChanged += new EventHandler(cbCultureInfos_SelectedIndexChanged); }