Browse Source

#2105: Update AnalyzerTreeView to use current language, if it is changed.

pull/2147/head
Siegfried Pammer 5 years ago
parent
commit
f40b8e777e
  1. 12
      ILSpy/Analyzers/AnalyzerTreeView.cs

12
ILSpy/Analyzers/AnalyzerTreeView.cs

@ -42,6 +42,18 @@ namespace ICSharpCode.ILSpy.Analyzers
this.BorderThickness = new Thickness(0); this.BorderThickness = new Thickness(0);
ContextMenuProvider.Add(this); ContextMenuProvider.Add(this);
MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged; MainWindow.Instance.CurrentAssemblyListChanged += MainWindow_Instance_CurrentAssemblyListChanged;
MainWindow.Instance.SessionSettings.FilterSettings.PropertyChanged += FilterSettings_PropertyChanged;
}
private void FilterSettings_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
switch (e.PropertyName)
{
case "Language":
case "LanguageVersion":
((AnalyzerRootNode)this.Root).Language = MainWindow.Instance.CurrentLanguage;
break;
}
} }
void MainWindow_Instance_CurrentAssemblyListChanged(object sender, NotifyCollectionChangedEventArgs e) void MainWindow_Instance_CurrentAssemblyListChanged(object sender, NotifyCollectionChangedEventArgs e)

Loading…
Cancel
Save