示例#1
0
        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);
        }
示例#2
0
        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);
        }