private void cbLocaleGroups_SelectionChanged_1(object sender, SelectionChangedEventArgs e) { LocaleGroup group = cbLocaleGroups.SelectedItem as LocaleGroup; if (group != null) { _currentRange = group.Range; _localeView.Refresh(); } }
/// <summary> /// Loads the list of locale groups. /// </summary> private void LoadGroups() { // Make a default group that shows everything LocaleRange allLocales = new LocaleRange(0, _locales.Count); _currentRange = allLocales; _groups.Add(new LocaleGroup() { Name = "(show all)", Range = allLocales }); // Load the groups stored in the cache file foreach (ILocaleGroup group in _cache.LocaleGroups) { string name = _cache.FileNames.FindTagName(group.TagIndex); LocaleRange range = group.Ranges[_languageIndex]; _groups.Add(new LocaleGroup() { Name = name, Range = range }); } Dispatcher.Invoke(new Action(delegate { cbLocaleGroups.ItemsSource = _groups; cbLocaleGroups.SelectedIndex = 0; })); }