Browse Source

Added node image for PInvoke methods.

pull/150/head
Ed Harvey 14 years ago committed by Daniel Grunwald
parent
commit
905927274b
  1. 1
      ILSpy/ILSpy.csproj
  2. 5
      ILSpy/Images/Images.cs
  3. 1
      ILSpy/Images/MemberIcon.cs
  4. BIN
      ILSpy/Images/OverlayStatic.png
  5. BIN
      ILSpy/Images/PInvokeMethod.png
  6. 5
      ILSpy/TreeNodes/MethodTreeNode.cs

1
ILSpy/ILSpy.csproj

@ -246,6 +246,7 @@ @@ -246,6 +246,7 @@
<Resource Include="Images\OverlayProtectedInternal.png" />
<Resource Include="Images\OverlayStatic.png" />
<Resource Include="Images\VirtualMethod.png" />
<Resource Include="Images\PInvokeMethod.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj">

5
ILSpy/Images/Images.cs

@ -62,6 +62,7 @@ namespace ICSharpCode.ILSpy @@ -62,6 +62,7 @@ namespace ICSharpCode.ILSpy
private static readonly BitmapImage VirtualMethod = LoadBitmap("VirtualMethod");
private static readonly BitmapImage Operator = LoadBitmap("Operator");
private static readonly BitmapImage ExtensionMethod = LoadBitmap("ExtensionMethod");
private static readonly BitmapImage PInvokeMethod = LoadBitmap("PInvokeMethod");
private static readonly BitmapImage Property = LoadBitmap("Property");
private static readonly BitmapImage Indexer = LoadBitmap("Indexer");
@ -159,6 +160,7 @@ namespace ICSharpCode.ILSpy @@ -159,6 +160,7 @@ namespace ICSharpCode.ILSpy
PreloadPublicIconToCache(MemberIcon.VirtualMethod, Images.VirtualMethod);
PreloadPublicIconToCache(MemberIcon.Operator, Images.Operator);
PreloadPublicIconToCache(MemberIcon.ExtensionMethod, Images.ExtensionMethod);
PreloadPublicIconToCache(MemberIcon.PInvokeMethod, Images.PInvokeMethod);
PreloadPublicIconToCache(MemberIcon.Event, Images.Event);
}
@ -199,6 +201,9 @@ namespace ICSharpCode.ILSpy @@ -199,6 +201,9 @@ namespace ICSharpCode.ILSpy
case MemberIcon.ExtensionMethod:
baseImage = Images.ExtensionMethod;
break;
case MemberIcon.PInvokeMethod:
baseImage = Images.PInvokeMethod;
break;
case MemberIcon.Event:
baseImage = Images.Event;
break;

1
ILSpy/Images/MemberIcon.cs

@ -33,6 +33,7 @@ namespace ICSharpCode.ILSpy @@ -33,6 +33,7 @@ namespace ICSharpCode.ILSpy
VirtualMethod,
Operator,
ExtensionMethod,
PInvokeMethod,
Event
}
}

BIN
ILSpy/Images/OverlayStatic.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

After

Width:  |  Height:  |  Size: 310 B

BIN
ILSpy/Images/PInvokeMethod.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

5
ILSpy/TreeNodes/MethodTreeNode.cs

@ -90,10 +90,13 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -90,10 +90,13 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
if (method.IsSpecialName &&
(method.Name == ".ctor" || method.Name == ".cctor")) {
(method.Name == ".ctor" || method.Name == ".cctor")) {
return Images.GetIcon(MemberIcon.Constructor, GetOverlayIcon(method.Attributes), false);
}
if (method.HasPInvokeInfo)
return Images.GetIcon(MemberIcon.PInvokeMethod, GetOverlayIcon(method.Attributes), true);
bool showAsVirtual = method.IsVirtual && !(method.IsNewSlot && method.IsFinal) && !method.DeclaringType.IsInterface;
return Images.GetIcon(

Loading…
Cancel
Save