diff --git a/ILSpy/AssemblyTreeNode.cs b/ILSpy/AssemblyTreeNode.cs
index 765a519fc..7efa9c67e 100644
--- a/ILSpy/AssemblyTreeNode.cs
+++ b/ILSpy/AssemblyTreeNode.cs
@@ -128,7 +128,10 @@ namespace ICSharpCode.ILSpy
protected override void LoadChildren()
{
assemblyTask.Wait();
- this.Children.Add(new ReferenceFolderTreeNode(assemblyTask.Result.MainModule, this));
+ ModuleDefinition mainModule = assemblyTask.Result.MainModule;
+ this.Children.Add(new ReferenceFolderTreeNode(mainModule, this));
+ if (mainModule.HasResources)
+ this.Children.Add(new ResourceListTreeNode(mainModule));
foreach (NamespaceTreeNode ns in namespaces.Values) {
ns.Children.Clear();
}
diff --git a/ILSpy/BaseTypesTreeNode.cs b/ILSpy/BaseTypesTreeNode.cs
index f15c8fcbe..073f435bf 100644
--- a/ILSpy/BaseTypesTreeNode.cs
+++ b/ILSpy/BaseTypesTreeNode.cs
@@ -42,7 +42,7 @@ namespace ICSharpCode.ILSpy
}
public override object Icon {
- get { return Images.Undo; }
+ get { return Images.SuperTypes; }
}
protected override void LoadChildren()
diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj
index 00bb03ecd..942f8a806 100644
--- a/ILSpy/ILSpy.csproj
+++ b/ILSpy/ILSpy.csproj
@@ -105,6 +105,7 @@
+
@@ -172,10 +173,6 @@
-
-
-
-
@@ -195,5 +192,12 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs
index d8dd7d7de..dfc427401 100644
--- a/ILSpy/Images/Images.cs
+++ b/ILSpy/Images/Images.cs
@@ -22,9 +22,10 @@ namespace ICSharpCode.ILSpy
public static readonly BitmapImage ReferenceFolderOpen = LoadBitmap("ReferenceFolder.Open");
public static readonly BitmapImage ReferenceFolderClosed = LoadBitmap("ReferenceFolder.Closed");
- public static readonly BitmapImage Redo = LoadBitmap("Redo");
- public static readonly BitmapImage Undo = LoadBitmap("Undo");
+ public static readonly BitmapImage SubTypes = LoadBitmap("SubTypes");
+ public static readonly BitmapImage SuperTypes = LoadBitmap("SuperTypes");
+ public static readonly BitmapImage Resource = LoadBitmap("Resource");
public static readonly BitmapImage Class = LoadBitmap("Class");
public static readonly BitmapImage Delegate = LoadBitmap("Delegate");
diff --git a/ILSpy/Images/Redo.png b/ILSpy/Images/Redo.png
deleted file mode 100644
index 9ce854269..000000000
Binary files a/ILSpy/Images/Redo.png and /dev/null differ
diff --git a/ILSpy/Images/Refresh.png b/ILSpy/Images/Refresh.png
new file mode 100644
index 000000000..51c3c653c
Binary files /dev/null and b/ILSpy/Images/Refresh.png differ
diff --git a/ILSpy/Images/Resource.png b/ILSpy/Images/Resource.png
new file mode 100644
index 000000000..2d8840719
Binary files /dev/null and b/ILSpy/Images/Resource.png differ
diff --git a/ILSpy/Images/SubTypes.png b/ILSpy/Images/SubTypes.png
new file mode 100644
index 000000000..82bfe26d7
Binary files /dev/null and b/ILSpy/Images/SubTypes.png differ
diff --git a/ILSpy/Images/SuperTypes.png b/ILSpy/Images/SuperTypes.png
new file mode 100644
index 000000000..831e43bb1
Binary files /dev/null and b/ILSpy/Images/SuperTypes.png differ
diff --git a/ILSpy/Images/Undo.png b/ILSpy/Images/Undo.png
deleted file mode 100644
index dba9b3a73..000000000
Binary files a/ILSpy/Images/Undo.png and /dev/null differ
diff --git a/ILSpy/ResourceListTreeNode.cs b/ILSpy/ResourceListTreeNode.cs
new file mode 100644
index 000000000..abee48299
--- /dev/null
+++ b/ILSpy/ResourceListTreeNode.cs
@@ -0,0 +1,72 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
+
+using System;
+using Mono.Cecil;
+
+namespace ICSharpCode.ILSpy
+{
+ ///
+ /// Description of ResourcesTreeNode.
+ ///
+ class ResourceListTreeNode : ILSpyTreeNode
+ {
+ readonly ModuleDefinition module;
+
+ public ResourceListTreeNode(ModuleDefinition module)
+ {
+ this.LazyLoading = true;
+ this.module = module;
+ }
+
+ public override object Text {
+ get { return "Resources"; }
+ }
+
+ public override object Icon {
+ get { return Images.Resource; }
+ }
+
+ protected override void LoadChildren()
+ {
+ foreach (Resource r in module.Resources)
+ this.Children.Add(new ResourceTreeNode(r));
+ }
+
+ public override FilterResult Filter(FilterSettings settings)
+ {
+ if (string.IsNullOrEmpty(settings.SearchTerm))
+ return FilterResult.Match;
+ else
+ return FilterResult.Recurse;
+ }
+ }
+
+ class ResourceTreeNode : ILSpyTreeNode
+ {
+ Resource r;
+
+ public ResourceTreeNode(Resource r)
+ {
+ this.r = r;
+ }
+
+ public override object Text {
+ get { return r.Name; }
+ }
+
+ public override object Icon {
+ get { return Images.Resource; }
+ }
+
+ public override FilterResult Filter(FilterSettings settings)
+ {
+ if (!settings.ShowInternalApi && (r.Attributes & ManifestResourceAttributes.VisibilityMask) == ManifestResourceAttributes.Private)
+ return FilterResult.Hidden;
+ if (settings.SearchTermMatches(r.Name))
+ return FilterResult.Match;
+ else
+ return FilterResult.Hidden;
+ }
+ }
+}