From 788fdf4fe224a5e2641922f9e5a3b217a8ddb49b Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Tue, 10 Sep 2019 00:00:55 +0200 Subject: [PATCH] Add new icons for many member types and other tree view entries, added icons for some more menu commands --- ILSpy/Analyzers/AnalyzeCommand.cs | 2 +- ILSpy/Commands/OpenFromGacCommand.cs | 2 +- ILSpy/Commands/OpenListCommand.cs | 2 +- ILSpy/Commands/SaveCodeContextMenuEntry.cs | 2 +- ILSpy/Commands/SaveCommand.cs | 2 +- ILSpy/ContextMenuEntry.cs | 16 ++-- ILSpy/ILSpy.csproj | 79 +++++++++++++++++++ ILSpy/Images/Assembly.xaml | 11 +++ ILSpy/Images/AssemblyList.xaml | 20 +++++ ILSpy/Images/AssemblyListGAC.xaml | 20 +++++ ILSpy/Images/AssemblyWarning.xaml | 11 +++ ILSpy/Images/EnumValue.xaml | 10 +++ ILSpy/Images/Event.xaml | 9 +++ ILSpy/Images/ExtensionMethod.xaml | 11 +++ ILSpy/Images/Field.xaml | 10 +++ ILSpy/Images/Folder.Closed.xaml | 10 +++ ILSpy/Images/Folder.Open.xaml | 9 +++ ILSpy/Images/Images.cs | 46 +++++------ ILSpy/Images/Indexer.xaml | 9 +++ ILSpy/Images/Library.xaml | 12 +++ ILSpy/Images/Literal.xaml | 11 +++ ILSpy/Images/Method.xaml | 10 +++ ILSpy/Images/Namespace.xaml | 9 +++ ILSpy/Images/OK.xaml | 20 +++++ ILSpy/Images/Operator.xaml | 10 +++ ILSpy/Images/Property.xaml | 9 +++ ILSpy/Images/Resource.xaml | 23 ++++++ ILSpy/Images/ResourceImage.xaml | 13 +++ ILSpy/Images/ResourceXml.xaml | 10 +++ ILSpy/Images/ResourceXslt.xaml | 10 +++ ILSpy/Images/Save.xaml | 20 +++++ ILSpy/Images/ViewCode.xaml | 20 +++++ ILSpy/TreeNodes/BaseTypesEntryNode.cs | 3 +- ILSpy/TreeNodes/BaseTypesTreeNode.cs | 2 +- ILSpy/TreeNodes/ModuleReferenceTreeNode.cs | 2 +- ILSpy/TreeNodes/NamespaceTreeNode.cs | 2 +- .../ResourceNodes/CursorResourceEntryNode.cs | 2 +- .../ResourceNodes/IconResourceEntryNode.cs | 2 +- .../ImageListResourceEntryNode.cs | 2 +- .../ResourceNodes/ImageResourceEntryNode.cs | 2 +- .../ResourceNodes/ResourceEntryNode.cs | 2 +- .../ResourceNodes/ResourceTreeNode.cs | 2 +- .../ResourceNodes/ResourcesFileTreeNode.cs | 2 +- .../ResourceNodes/XmlResourceNode.cs | 8 +- 44 files changed, 440 insertions(+), 49 deletions(-) create mode 100644 ILSpy/Images/Assembly.xaml create mode 100644 ILSpy/Images/AssemblyList.xaml create mode 100644 ILSpy/Images/AssemblyListGAC.xaml create mode 100644 ILSpy/Images/AssemblyWarning.xaml create mode 100644 ILSpy/Images/EnumValue.xaml create mode 100644 ILSpy/Images/Event.xaml create mode 100644 ILSpy/Images/ExtensionMethod.xaml create mode 100644 ILSpy/Images/Field.xaml create mode 100644 ILSpy/Images/Folder.Closed.xaml create mode 100644 ILSpy/Images/Folder.Open.xaml create mode 100644 ILSpy/Images/Indexer.xaml create mode 100644 ILSpy/Images/Library.xaml create mode 100644 ILSpy/Images/Literal.xaml create mode 100644 ILSpy/Images/Method.xaml create mode 100644 ILSpy/Images/Namespace.xaml create mode 100644 ILSpy/Images/OK.xaml create mode 100644 ILSpy/Images/Operator.xaml create mode 100644 ILSpy/Images/Property.xaml create mode 100644 ILSpy/Images/Resource.xaml create mode 100644 ILSpy/Images/ResourceImage.xaml create mode 100644 ILSpy/Images/ResourceXml.xaml create mode 100644 ILSpy/Images/ResourceXslt.xaml create mode 100644 ILSpy/Images/Save.xaml create mode 100644 ILSpy/Images/ViewCode.xaml diff --git a/ILSpy/Analyzers/AnalyzeCommand.cs b/ILSpy/Analyzers/AnalyzeCommand.cs index 7d73e9039..3d8ae667c 100644 --- a/ILSpy/Analyzers/AnalyzeCommand.cs +++ b/ILSpy/Analyzers/AnalyzeCommand.cs @@ -25,7 +25,7 @@ using ICSharpCode.ILSpy.TreeNodes; namespace ICSharpCode.ILSpy.Analyzers { - [ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "images/Search", Category = nameof(Resources.Analyze), InputGestureText = "Ctrl+R", Order = 100)] + [ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "Images/Search", Category = nameof(Resources.Analyze), InputGestureText = "Ctrl+R", Order = 100)] internal sealed class AnalyzeCommand : SimpleCommand, IContextMenuEntry { public bool IsVisible(TextViewContext context) diff --git a/ILSpy/Commands/OpenFromGacCommand.cs b/ILSpy/Commands/OpenFromGacCommand.cs index 8f7f008e7..bcac992ce 100644 --- a/ILSpy/Commands/OpenFromGacCommand.cs +++ b/ILSpy/Commands/OpenFromGacCommand.cs @@ -19,7 +19,7 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy { - [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.OpenFrom_GAC), MenuIcon = "Images/AssemblyListGAC.png", MenuCategory = nameof(Resources.Open), MenuOrder = 1)] + [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.OpenFrom_GAC), MenuIcon = "Images/AssemblyListGAC", MenuCategory = nameof(Resources.Open), MenuOrder = 1)] sealed class OpenFromGacCommand : SimpleCommand { public override void Execute(object parameter) diff --git a/ILSpy/Commands/OpenListCommand.cs b/ILSpy/Commands/OpenListCommand.cs index e5fe22139..807171875 100644 --- a/ILSpy/Commands/OpenListCommand.cs +++ b/ILSpy/Commands/OpenListCommand.cs @@ -21,7 +21,7 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy { - [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.Open_List), MenuIcon = "Images/AssemblyList.png", MenuCategory = nameof(Resources.Open), MenuOrder = 1.7)] + [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.Open_List), MenuIcon = "Images/AssemblyList", MenuCategory = nameof(Resources.Open), MenuOrder = 1.7)] sealed class OpenListCommand : SimpleCommand { public override void Execute(object parameter) diff --git a/ILSpy/Commands/SaveCodeContextMenuEntry.cs b/ILSpy/Commands/SaveCodeContextMenuEntry.cs index ef395f265..3715b588d 100644 --- a/ILSpy/Commands/SaveCodeContextMenuEntry.cs +++ b/ILSpy/Commands/SaveCodeContextMenuEntry.cs @@ -29,7 +29,7 @@ using Microsoft.Win32; namespace ICSharpCode.ILSpy.TextView { - [ExportContextMenuEntry(Header = nameof(Resources._SaveCode), Category = nameof(Resources.Save), Icon = "Images/SaveFile.png")] + [ExportContextMenuEntry(Header = nameof(Resources._SaveCode), Category = nameof(Resources.Save), Icon = "Images/Save")] sealed class SaveCodeContextMenuEntry : IContextMenuEntry { public void Execute(TextViewContext context) diff --git a/ILSpy/Commands/SaveCommand.cs b/ILSpy/Commands/SaveCommand.cs index 22da9c57c..fe18990ce 100644 --- a/ILSpy/Commands/SaveCommand.cs +++ b/ILSpy/Commands/SaveCommand.cs @@ -21,7 +21,7 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy { - [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._SaveCode), MenuIcon = "Images/SaveFile.png", MenuCategory = nameof(Resources.Save), MenuOrder = 0)] + [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._SaveCode), MenuIcon = "Images/Save", MenuCategory = nameof(Resources.Save), MenuOrder = 0)] sealed class SaveCommand : CommandWrapper { public SaveCommand() diff --git a/ILSpy/ContextMenuEntry.cs b/ILSpy/ContextMenuEntry.cs index f2a94ae09..ce1f104d6 100644 --- a/ILSpy/ContextMenuEntry.cs +++ b/ILSpy/ContextMenuEntry.cs @@ -20,7 +20,7 @@ using System; using System.ComponentModel.Composition; using System.Linq; using System.Windows.Controls; - +using System.Windows.Media; using ICSharpCode.AvalonEdit; using ICSharpCode.ILSpy.TextView; using ICSharpCode.TreeView; @@ -222,11 +222,15 @@ namespace ICSharpCode.ILSpy menuItem.Header = MainWindow.GetResourceString( entryPair.Metadata.Header); menuItem.InputGestureText = entryPair.Metadata.InputGestureText; if (!string.IsNullOrEmpty(entryPair.Metadata.Icon)) { - menuItem.Icon = new Image { - Width = 16, - Height = 16, - Source = Images.LoadImage(entry, entryPair.Metadata.Icon) - }; + object image = Images.Load(entryPair.Value, entryPair.Metadata.Icon); + if (!(image is Viewbox)) { + image = new Image { + Width = 16, + Height = 16, + Source = (ImageSource)image + }; + } + menuItem.Icon = image; } if (entryPair.Value.IsEnabled(context)) { menuItem.Click += delegate { entry.Execute(context); }; diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index a7d106eed..01d7a6caf 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -312,19 +312,41 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -412,6 +434,12 @@ Designer MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + Designer MSBuild:Compile @@ -432,18 +460,51 @@ Designer MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + Designer MSBuild:Compile + + MSBuild:Compile + Designer MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + Designer MSBuild:Compile + + MSBuild:Compile + Designer MSBuild:Compile @@ -460,10 +521,28 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ILSpy/Images/Assembly.xaml b/ILSpy/Images/Assembly.xaml new file mode 100644 index 000000000..3f7ffdc99 --- /dev/null +++ b/ILSpy/Images/Assembly.xaml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ILSpy/Images/AssemblyList.xaml b/ILSpy/Images/AssemblyList.xaml new file mode 100644 index 000000000..fc8715236 --- /dev/null +++ b/ILSpy/Images/AssemblyList.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/AssemblyListGAC.xaml b/ILSpy/Images/AssemblyListGAC.xaml new file mode 100644 index 000000000..fc8715236 --- /dev/null +++ b/ILSpy/Images/AssemblyListGAC.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/AssemblyWarning.xaml b/ILSpy/Images/AssemblyWarning.xaml new file mode 100644 index 000000000..6b3c3531a --- /dev/null +++ b/ILSpy/Images/AssemblyWarning.xaml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ILSpy/Images/EnumValue.xaml b/ILSpy/Images/EnumValue.xaml new file mode 100644 index 000000000..14d6bc387 --- /dev/null +++ b/ILSpy/Images/EnumValue.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Event.xaml b/ILSpy/Images/Event.xaml new file mode 100644 index 000000000..cbf6d0879 --- /dev/null +++ b/ILSpy/Images/Event.xaml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ILSpy/Images/ExtensionMethod.xaml b/ILSpy/Images/ExtensionMethod.xaml new file mode 100644 index 000000000..e7c4ad20c --- /dev/null +++ b/ILSpy/Images/ExtensionMethod.xaml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ILSpy/Images/Field.xaml b/ILSpy/Images/Field.xaml new file mode 100644 index 000000000..c432096c8 --- /dev/null +++ b/ILSpy/Images/Field.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/Folder.Closed.xaml b/ILSpy/Images/Folder.Closed.xaml new file mode 100644 index 000000000..b6956e77e --- /dev/null +++ b/ILSpy/Images/Folder.Closed.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/Folder.Open.xaml b/ILSpy/Images/Folder.Open.xaml new file mode 100644 index 000000000..fdbccfc54 --- /dev/null +++ b/ILSpy/Images/Folder.Open.xaml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index f4d089535..6fe4bb002 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -63,8 +63,8 @@ namespace ICSharpCode.ILSpy public static readonly object AssemblyWarning = Load("AssemblyWarning"); public static readonly object AssemblyLoading = Load("FindAssembly"); - public static readonly BitmapImage Library = LoadBitmap("Library"); - public static readonly BitmapImage Namespace = LoadBitmap("NameSpace"); + public static readonly object Library = Load("Library"); + public static readonly object Namespace = Load("Namespace"); public static readonly BitmapImage ReferenceFolderOpen = LoadBitmap("ReferenceFolder.Open"); public static readonly BitmapImage ReferenceFolderClosed = LoadBitmap("ReferenceFolder.Closed"); @@ -72,40 +72,40 @@ namespace ICSharpCode.ILSpy public static readonly BitmapImage SubTypes = LoadBitmap("SubTypes"); public static readonly BitmapImage SuperTypes = LoadBitmap("SuperTypes"); - public static readonly BitmapImage FolderOpen = LoadBitmap("Folder.Open"); - public static readonly BitmapImage FolderClosed = LoadBitmap("Folder.Closed"); + public static readonly object FolderOpen = Load("Folder.Open"); + public static readonly object FolderClosed = Load("Folder.Closed"); - public static readonly BitmapImage Resource = LoadBitmap("Resource"); - public static readonly BitmapImage ResourceImage = LoadBitmap("ResourceImage"); + public static readonly object Resource = Load("Resource"); + public static readonly object ResourceImage = Load("ResourceImage"); public static readonly BitmapImage ResourceResourcesFile = LoadBitmap("ResourceResourcesFile"); - public static readonly BitmapImage ResourceXml = LoadBitmap("ResourceXml"); - public static readonly BitmapImage ResourceXsd = LoadBitmap("ResourceXsd"); - public static readonly BitmapImage ResourceXslt = LoadBitmap("ResourceXslt"); + public static readonly object ResourceXml = Load("ResourceXml"); + public static readonly object ResourceXsd = Load("ResourceXslt"); + public static readonly object ResourceXslt = Load("ResourceXslt"); public static readonly object Class = Load("Class"); public static readonly object Struct = Load("Struct"); public static readonly object Interface = Load("Interface"); public static readonly object Delegate = Load("Delegate"); public static readonly object Enum = Load("Enum"); - public static readonly BitmapImage StaticClass = LoadBitmap("StaticClass"); + public static readonly object StaticClass = Load("StaticClass"); - public static readonly BitmapImage Field = LoadBitmap("Field"); - public static readonly BitmapImage FieldReadOnly = LoadBitmap("FieldReadOnly"); - public static readonly BitmapImage Literal = LoadBitmap("Literal"); - public static readonly BitmapImage EnumValue = LoadBitmap("EnumValue"); + public static readonly object Field = Load("Field"); + public static readonly object FieldReadOnly = Load("Field"); + public static readonly object Literal = Load("Literal"); + public static readonly object EnumValue = Load("EnumValue"); - public static readonly BitmapImage Method = LoadBitmap("Method"); - public static readonly BitmapImage Constructor = LoadBitmap("Constructor"); - public static readonly BitmapImage VirtualMethod = LoadBitmap("VirtualMethod"); - public static readonly BitmapImage Operator = LoadBitmap("Operator"); - public static readonly BitmapImage ExtensionMethod = LoadBitmap("ExtensionMethod"); - public static readonly BitmapImage PInvokeMethod = LoadBitmap("PInvokeMethod"); + public static readonly object Method = Load("Method"); + public static readonly object Constructor = Load("Method"); + public static readonly object VirtualMethod = Load("Method"); + public static readonly object Operator = Load("Operator"); + public static readonly object ExtensionMethod = Load("ExtensionMethod"); + public static readonly object PInvokeMethod = Load("Method"); - public static readonly BitmapImage Property = LoadBitmap("Property"); - public static readonly BitmapImage Indexer = LoadBitmap("Indexer"); + public static readonly object Property = Load("Property"); + public static readonly object Indexer = Load("Indexer"); - public static readonly BitmapImage Event = LoadBitmap("Event"); + public static readonly object Event = Load("Event"); private static readonly object OverlayProtected = Load("OverlayProtected"); private static readonly object OverlayInternal = Load("OverlayInternal"); diff --git a/ILSpy/Images/Indexer.xaml b/ILSpy/Images/Indexer.xaml new file mode 100644 index 000000000..053a93e5d --- /dev/null +++ b/ILSpy/Images/Indexer.xaml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ILSpy/Images/Library.xaml b/ILSpy/Images/Library.xaml new file mode 100644 index 000000000..d1a8a5f86 --- /dev/null +++ b/ILSpy/Images/Library.xaml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ILSpy/Images/Literal.xaml b/ILSpy/Images/Literal.xaml new file mode 100644 index 000000000..693bba38e --- /dev/null +++ b/ILSpy/Images/Literal.xaml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ILSpy/Images/Method.xaml b/ILSpy/Images/Method.xaml new file mode 100644 index 000000000..784ade333 --- /dev/null +++ b/ILSpy/Images/Method.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/Namespace.xaml b/ILSpy/Images/Namespace.xaml new file mode 100644 index 000000000..9b3348860 --- /dev/null +++ b/ILSpy/Images/Namespace.xaml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ILSpy/Images/OK.xaml b/ILSpy/Images/OK.xaml new file mode 100644 index 000000000..79200bf8a --- /dev/null +++ b/ILSpy/Images/OK.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Operator.xaml b/ILSpy/Images/Operator.xaml new file mode 100644 index 000000000..45da6efb0 --- /dev/null +++ b/ILSpy/Images/Operator.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/Property.xaml b/ILSpy/Images/Property.xaml new file mode 100644 index 000000000..a7ced2d70 --- /dev/null +++ b/ILSpy/Images/Property.xaml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ILSpy/Images/Resource.xaml b/ILSpy/Images/Resource.xaml new file mode 100644 index 000000000..22555471b --- /dev/null +++ b/ILSpy/Images/Resource.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/ResourceImage.xaml b/ILSpy/Images/ResourceImage.xaml new file mode 100644 index 000000000..47f992d43 --- /dev/null +++ b/ILSpy/Images/ResourceImage.xaml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/ILSpy/Images/ResourceXml.xaml b/ILSpy/Images/ResourceXml.xaml new file mode 100644 index 000000000..b20527426 --- /dev/null +++ b/ILSpy/Images/ResourceXml.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/ResourceXslt.xaml b/ILSpy/Images/ResourceXslt.xaml new file mode 100644 index 000000000..91a0b26a4 --- /dev/null +++ b/ILSpy/Images/ResourceXslt.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/Save.xaml b/ILSpy/Images/Save.xaml new file mode 100644 index 000000000..5742adf56 --- /dev/null +++ b/ILSpy/Images/Save.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/ViewCode.xaml b/ILSpy/Images/ViewCode.xaml new file mode 100644 index 000000000..cc231567f --- /dev/null +++ b/ILSpy/Images/ViewCode.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/TreeNodes/BaseTypesEntryNode.cs b/ILSpy/TreeNodes/BaseTypesEntryNode.cs index 3c96c40dd..70aaa280e 100644 --- a/ILSpy/TreeNodes/BaseTypesEntryNode.cs +++ b/ILSpy/TreeNodes/BaseTypesEntryNode.cs @@ -69,7 +69,8 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text => this.Language.TypeToString(type, includeNamespace: true) + handle.ToSuffixString(); - public override object Icon => isInterface ? Images.Interface : Images.Class; + public override object Icon => + isInterface ? Images.GetIcon(Images.Interface) : Images.GetIcon(Images.Class); protected override void LoadChildren() { diff --git a/ILSpy/TreeNodes/BaseTypesTreeNode.cs b/ILSpy/TreeNodes/BaseTypesTreeNode.cs index 8cbdb2304..1ae86016d 100644 --- a/ILSpy/TreeNodes/BaseTypesTreeNode.cs +++ b/ILSpy/TreeNodes/BaseTypesTreeNode.cs @@ -44,7 +44,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text => "Base Types"; - public override object Icon => Images.SuperTypes; + public override object Icon => Images.GetIcon(Images.SuperTypes); protected override void LoadChildren() { diff --git a/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs b/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs index 4d51f46af..4a5f5a6e7 100644 --- a/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs +++ b/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs @@ -61,7 +61,7 @@ namespace ICSharpCode.ILSpy.TreeNodes get { return moduleName + ((EntityHandle)handle).ToSuffixString(); } } - public override object Icon => Images.Library; + public override object Icon => Images.GetIcon(Images.Library); public override void ActivateItem(System.Windows.RoutedEventArgs e) { diff --git a/ILSpy/TreeNodes/NamespaceTreeNode.cs b/ILSpy/TreeNodes/NamespaceTreeNode.cs index d054603dc..a189b79b3 100644 --- a/ILSpy/TreeNodes/NamespaceTreeNode.cs +++ b/ILSpy/TreeNodes/NamespaceTreeNode.cs @@ -45,7 +45,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } public override object Icon { - get { return Images.Namespace; } + get { return Images.GetIcon(Images.Namespace); } } public override FilterResult Filter(FilterSettings settings) diff --git a/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs index 2dbbcc271..1095a7ab8 100644 --- a/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs @@ -61,7 +61,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { - get { return Images.ResourceImage; } + get { return Images.GetIcon(Images.ResourceImage); } } public override bool View(DecompilerTextView textView) diff --git a/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs index de98a7aa1..bacdb7689 100644 --- a/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs @@ -60,7 +60,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { - get { return Images.ResourceImage; } + get { return Images.GetIcon(Images.ResourceImage); } } public override bool View(DecompilerTextView textView) diff --git a/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs index fb8b2199f..8781fc913 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs @@ -60,7 +60,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { - get { return Images.ResourceImage; } + get { return Images.GetIcon(Images.ResourceImage); } } protected override void LoadChildren() diff --git a/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs index 0c8ff07ea..c572e5782 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs @@ -67,7 +67,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { - get { return Images.ResourceImage; } + get { return Images.GetIcon(Images.ResourceImage); } } public override bool View(DecompilerTextView textView) diff --git a/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs index ec74ad193..9fd431838 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs @@ -39,7 +39,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { - get { return Images.Resource; } + get { return Images.GetIcon(Images.Resource); } } protected Stream Data diff --git a/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs b/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs index 3433f70d7..348d093bc 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs @@ -54,7 +54,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } public override object Icon { - get { return Images.Resource; } + get { return Images.GetIcon(Images.Resource); } } public override FilterResult Filter(FilterSettings settings) diff --git a/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs b/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs index c1d908481..1d28bbfcb 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs @@ -61,7 +61,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } public override object Icon { - get { return Images.ResourceResourcesFile; } + get { return Images.GetIcon(Images.ResourceResourcesFile); } } protected override void LoadChildren() diff --git a/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs b/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs index 7af53dd99..c252f4eb3 100644 --- a/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs @@ -69,13 +69,13 @@ namespace ICSharpCode.ILSpy.Xaml { string text = (string)Text; if (text.EndsWith(".xml", StringComparison.OrdinalIgnoreCase)) - return Images.ResourceXml; + return Images.GetIcon(Images.ResourceXml); else if (text.EndsWith(".xsd", StringComparison.OrdinalIgnoreCase)) - return Images.ResourceXsd; + return Images.GetIcon(Images.ResourceXsd); else if (text.EndsWith(".xslt", StringComparison.OrdinalIgnoreCase)) - return Images.ResourceXslt; + return Images.GetIcon(Images.ResourceXslt); else - return Images.Resource; + return Images.GetIcon(Images.Resource); } }