Skip to content
Permalink
Browse files

Merge pull request #1704 from icsharpcode/icons-refresh

Icons refresh
  • Loading branch information...
siegfriedpammer committed Sep 20, 2019
2 parents ed2d7c2 + ccd8311 commit 158d5e2304468cdca611b9f0f2e1b16531deb25f
Showing with 2,922 additions and 401 deletions.
  1. +1 −1 ILSpy/Analyzers/AnalyzeCommand.cs
  2. +1 −1 ILSpy/Commands/BrowseBackCommand.cs
  3. +1 −1 ILSpy/Commands/BrowseForwardCommand.cs
  4. +2 −2 ILSpy/Commands/OpenCommand.cs
  5. +1 −1 ILSpy/Commands/OpenFromGacCommand.cs
  6. +1 −1 ILSpy/Commands/OpenListCommand.cs
  7. +2 −2 ILSpy/Commands/RefreshCommand.cs
  8. +1 −1 ILSpy/Commands/SaveCodeContextMenuEntry.cs
  9. +1 −1 ILSpy/Commands/SaveCommand.cs
  10. +4 −4 ILSpy/Commands/SortAssemblyListCommand.cs
  11. +10 −6 ILSpy/ContextMenuEntry.cs
  12. +38 −0 ILSpy/Controls/XamlResourceExtension.cs
  13. +25 −18 ILSpy/FilterSettings.cs
  14. +283 −76 ILSpy/ILSpy.csproj
  15. BIN ILSpy/Images/Assembly.png
  16. +1 −0 ILSpy/Images/Assembly.svg
  17. +11 −0 ILSpy/Images/Assembly.xaml
  18. BIN ILSpy/Images/AssemblyList.png
  19. +1 −0 ILSpy/Images/AssemblyList.svg
  20. +10 −0 ILSpy/Images/AssemblyList.xaml
  21. BIN ILSpy/Images/AssemblyListGAC.png
  22. +84 −0 ILSpy/Images/AssemblyListGAC.svg
  23. +44 −0 ILSpy/Images/AssemblyListGAC.xaml
  24. BIN ILSpy/Images/AssemblyWarning.png
  25. +1 −0 ILSpy/Images/AssemblyWarning.svg
  26. +11 −0 ILSpy/Images/AssemblyWarning.xaml
  27. BIN ILSpy/Images/Back.png
  28. +1 −0 ILSpy/Images/Back.svg
  29. +10 −0 ILSpy/Images/Back.xaml
  30. BIN ILSpy/Images/Break.png
  31. BIN ILSpy/Images/Breakpoint.png
  32. BIN ILSpy/Images/Class.png
  33. +1 −0 ILSpy/Images/Class.svg
  34. +9 −0 ILSpy/Images/Class.xaml
  35. BIN ILSpy/Images/ClearSearch.png
  36. +1 −0 ILSpy/Images/Close.svg
  37. +9 −0 ILSpy/Images/Close.xaml
  38. BIN ILSpy/Images/CollapseAll.png
  39. +1 −0 ILSpy/Images/CollapseAll.svg
  40. +11 −0 ILSpy/Images/CollapseAll.xaml
  41. BIN ILSpy/Images/Constructor.png
  42. +70 −0 ILSpy/Images/Constructor.svg
  43. +12 −0 ILSpy/Images/Constructor.xaml
  44. BIN ILSpy/Images/Copy.png
  45. +1 −0 ILSpy/Images/Copy.svg
  46. +20 −0 ILSpy/Images/Copy.xaml
  47. BIN ILSpy/Images/CurrentLine.png
  48. BIN ILSpy/Images/Delegate.png
  49. +1 −0 ILSpy/Images/Delegate.svg
  50. +10 −0 ILSpy/Images/Delegate.xaml
  51. BIN ILSpy/Images/Delete.png
  52. +1 −0 ILSpy/Images/Delete.svg
  53. +9 −0 ILSpy/Images/Delete.xaml
  54. BIN ILSpy/Images/DisabledBreakpoint.png
  55. BIN ILSpy/Images/Enum.png
  56. +1 −0 ILSpy/Images/Enum.svg
  57. +10 −0 ILSpy/Images/Enum.xaml
  58. BIN ILSpy/Images/EnumValue.png
  59. +1 −0 ILSpy/Images/EnumValue.svg
  60. +10 −0 ILSpy/Images/EnumValue.xaml
  61. BIN ILSpy/Images/Event.png
  62. +1 −0 ILSpy/Images/Event.svg
  63. +9 −0 ILSpy/Images/Event.xaml
  64. BIN ILSpy/Images/ExtensionMethod.png
  65. +1 −0 ILSpy/Images/ExtensionMethod.svg
  66. +11 −0 ILSpy/Images/ExtensionMethod.xaml
  67. BIN ILSpy/Images/Field.png
  68. +1 −0 ILSpy/Images/Field.svg
  69. +10 −0 ILSpy/Images/Field.xaml
  70. BIN ILSpy/Images/FieldReadOnly.png
  71. +69 −0 ILSpy/Images/FieldReadOnly.svg
  72. +10 −0 ILSpy/Images/FieldReadOnly.xaml
  73. BIN ILSpy/Images/Find.png
  74. BIN ILSpy/Images/FindAssembly.png
  75. +93 −0 ILSpy/Images/FindAssembly.svg
  76. +23 −0 ILSpy/Images/FindAssembly.xaml
  77. BIN ILSpy/Images/Folder.Closed.png
  78. +1 −0 ILSpy/Images/Folder.Closed.svg
  79. +10 −0 ILSpy/Images/Folder.Closed.xaml
  80. BIN ILSpy/Images/Folder.Open.png
  81. +9 −0 ILSpy/Images/Folder.Open.xaml
  82. +1 −0 ILSpy/Images/FolderOpen.svg
  83. BIN ILSpy/Images/Forward.png
  84. +1 −0 ILSpy/Images/Forward.svg
  85. +10 −0 ILSpy/Images/Forward.xaml
  86. +0 −61 ILSpy/Images/ILSpyNewIconList.txt
  87. +112 −71 ILSpy/Images/Images.cs
  88. BIN ILSpy/Images/Indexer.png
  89. +1 −0 ILSpy/Images/Indexer.svg
  90. +9 −0 ILSpy/Images/Indexer.xaml
  91. BIN ILSpy/Images/Interface.png
  92. +1 −0 ILSpy/Images/Interface.svg
  93. +10 −0 ILSpy/Images/Interface.xaml
  94. BIN ILSpy/Images/Library.png
  95. +1 −0 ILSpy/Images/Library.svg
  96. +12 −0 ILSpy/Images/Library.xaml
  97. BIN ILSpy/Images/Literal.png
  98. +1 −0 ILSpy/Images/Literal.svg
  99. +11 −0 ILSpy/Images/Literal.xaml
  100. BIN ILSpy/Images/Method.png
  101. +1 −0 ILSpy/Images/Method.svg
  102. +10 −0 ILSpy/Images/Method.xaml
  103. BIN ILSpy/Images/NameSpace.png
  104. +1 −0 ILSpy/Images/Namespace.svg
  105. +9 −0 ILSpy/Images/Namespace.xaml
  106. BIN ILSpy/Images/OK.png
  107. +1 −0 ILSpy/Images/OK.svg
  108. +10 −0 ILSpy/Images/OK.xaml
  109. BIN ILSpy/Images/Open.png
  110. +1 −0 ILSpy/Images/Open.svg
  111. +10 −0 ILSpy/Images/Open.xaml
  112. BIN ILSpy/Images/Operator.png
  113. +1 −0 ILSpy/Images/Operator.svg
  114. +10 −0 ILSpy/Images/Operator.xaml
  115. BIN ILSpy/Images/OverlayCompilerControlled.png
  116. +76 −0 ILSpy/Images/OverlayCompilerControlled.svg
  117. +10 −0 ILSpy/Images/OverlayCompilerControlled.xaml
  118. BIN ILSpy/Images/OverlayInternal.png
  119. +76 −0 ILSpy/Images/OverlayInternal.svg
  120. BIN ILSpy/Images/OverlayInternal.xaml
  121. BIN ILSpy/Images/OverlayPrivate.png
  122. +80 −0 ILSpy/Images/OverlayPrivate.svg
  123. BIN ILSpy/Images/OverlayPrivate.xaml
  124. BIN ILSpy/Images/OverlayPrivateProtected.png
  125. +84 −0 ILSpy/Images/OverlayPrivateProtected.svg
  126. BIN ILSpy/Images/OverlayPrivateProtected.xaml
  127. BIN ILSpy/Images/OverlayProtected.png
  128. +72 −0 ILSpy/Images/OverlayProtected.svg
  129. BIN ILSpy/Images/OverlayProtected.xaml
  130. BIN ILSpy/Images/OverlayProtectedInternal.png
  131. +79 −0 ILSpy/Images/OverlayProtectedInternal.svg
  132. BIN ILSpy/Images/OverlayProtectedInternal.xaml
  133. BIN ILSpy/Images/OverlayStatic.png
  134. +73 −0 ILSpy/Images/OverlayStatic.svg
  135. BIN ILSpy/Images/OverlayStatic.xaml
  136. BIN ILSpy/Images/PInvokeMethod.png
  137. +79 −0 ILSpy/Images/PInvokeMethod.svg
  138. +14 −0 ILSpy/Images/PInvokeMethod.xaml
  139. BIN ILSpy/Images/PrivateInternal.png
  140. BIN ILSpy/Images/Property.png
  141. +1 −0 ILSpy/Images/Property.svg
  142. +9 −0 ILSpy/Images/Property.xaml
  143. +70 −0 ILSpy/Images/README.md
  144. BIN ILSpy/Images/ReferenceFolder.Closed.png
  145. BIN ILSpy/Images/ReferenceFolder.Open.png
  146. +90 −0 ILSpy/Images/ReferenceFolder.svg
  147. BIN ILSpy/Images/ReferenceFolder.xaml
  148. BIN ILSpy/Images/Refresh.png
  149. +1 −0 ILSpy/Images/Refresh.svg
  150. +9 −0 ILSpy/Images/Refresh.xaml
  151. BIN ILSpy/Images/Resource.png
  152. +1 −0 ILSpy/Images/Resource.svg
  153. +10 −0 ILSpy/Images/Resource.xaml
  154. BIN ILSpy/Images/ResourceImage.png
  155. +1 −0 ILSpy/Images/ResourceImage.svg
  156. +13 −0 ILSpy/Images/ResourceImage.xaml
  157. BIN ILSpy/Images/ResourceResourcesFile.png
  158. +1 −0 ILSpy/Images/ResourceResourcesFile.svg
  159. +23 −0 ILSpy/Images/ResourceResourcesFile.xaml
  160. BIN ILSpy/Images/ResourceXml.png
  161. +1 −0 ILSpy/Images/ResourceXml.svg
  162. +10 −0 ILSpy/Images/ResourceXml.xaml
  163. BIN ILSpy/Images/ResourceXsd.png
  164. +93 −0 ILSpy/Images/ResourceXsd.svg
  165. +12 −0 ILSpy/Images/ResourceXsd.xaml
  166. BIN ILSpy/Images/ResourceXsl.png
  167. +1 −0 ILSpy/Images/ResourceXsl.svg
  168. +10 −0 ILSpy/Images/ResourceXsl.xaml
  169. BIN ILSpy/Images/ResourceXslt.png
  170. +2 −0 ILSpy/Images/ResourceXslt.svg
  171. +10 −0 ILSpy/Images/ResourceXslt.xaml
  172. +1 −0 ILSpy/Images/Save.svg
  173. +10 −0 ILSpy/Images/Save.xaml
  174. BIN ILSpy/Images/SaveFile.png
  175. BIN ILSpy/Images/Search.png
  176. +1 −0 ILSpy/Images/Search.svg
  177. +10 −0 ILSpy/Images/Search.xaml
  178. BIN ILSpy/Images/SearchMsdn.png
  179. +89 −0 ILSpy/Images/SearchMsdn.svg
  180. +21 −0 ILSpy/Images/SearchMsdn.xaml
  181. BIN ILSpy/Images/ShowAll.png
  182. +142 −0 ILSpy/Images/ShowAll.svg
  183. BIN ILSpy/Images/ShowAll.xaml
  184. +101 −0 ILSpy/Images/ShowPrivateInternal.svg
  185. BIN ILSpy/Images/ShowPrivateInternal.xaml
  186. +1 −0 ILSpy/Images/ShowPublicOnly.svg
  187. +10 −0 ILSpy/Images/ShowPublicOnly.xaml
  188. BIN ILSpy/Images/Sort.png
  189. +1 −0 ILSpy/Images/Sort.svg
  190. +11 −0 ILSpy/Images/Sort.xaml
  191. BIN ILSpy/Images/StaticClass.png
  192. BIN ILSpy/Images/Struct.png
  193. +1 −0 ILSpy/Images/Struct.svg
  194. +9 −0 ILSpy/Images/Struct.xaml
  195. BIN ILSpy/Images/SubTypes.png
  196. +1 −0 ILSpy/Images/SubTypes.svg
  197. +13 −0 ILSpy/Images/SubTypes.xaml
  198. BIN ILSpy/Images/SuperTypes.png
  199. +1 −0 ILSpy/Images/SuperTypes.svg
  200. +13 −0 ILSpy/Images/SuperTypes.xaml
  201. +1 −2 ILSpy/Images/TypeIcon.cs
  202. BIN ILSpy/Images/ViewCode.png
  203. +1 −0 ILSpy/Images/ViewCode.svg
  204. +10 −0 ILSpy/Images/ViewCode.xaml
  205. BIN ILSpy/Images/VirtualMethod.png
  206. +93 −0 ILSpy/Images/VirtualMethod.svg
  207. +13 −0 ILSpy/Images/VirtualMethod.xaml
  208. BIN ILSpy/Images/Warning.png
  209. +1 −0 ILSpy/Images/Warning.svg
  210. +10 −0 ILSpy/Images/Warning.xaml
  211. +1 −1 ILSpy/Languages/CSharpLanguage.cs
  212. +10 −14 ILSpy/MainWindow.xaml
  213. +18 −10 ILSpy/MainWindow.xaml.cs
  214. +20 −2 ILSpy/Properties/Resources.Designer.cs
  215. +8 −2 ILSpy/Properties/Resources.resx
  216. +1 −3 ILSpy/Search/AbstractSearchStrategy.cs
  217. +28 −9 ILSpy/Search/SearchPane.cs
  218. +3 −5 ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs
  219. +3 −3 ILSpy/TreeNodes/AssemblyTreeNode.cs
  220. +2 −1 ILSpy/TreeNodes/BaseTypesEntryNode.cs
  221. +1 −1 ILSpy/TreeNodes/CopyFullyQualifiedNameContextMenuEntry.cs
  222. +1 −1 ILSpy/TreeNodes/EventTreeNode.cs
  223. +1 −1 ILSpy/TreeNodes/FieldTreeNode.cs
  224. +1 −1 ILSpy/TreeNodes/MethodTreeNode.cs
  225. +1 −1 ILSpy/TreeNodes/PropertyTreeNode.cs
  226. +5 −14 ILSpy/TreeNodes/ReferenceFolderTreeNode.cs
  227. +6 −12 ILSpy/TreeNodes/ResourceListTreeNode.cs
  228. +1 −4 ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs
  229. +1 −4 ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs
  230. +1 −4 ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs
  231. +1 −4 ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs
  232. +3 −13 ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs
  233. +16 −24 ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs
  234. +1 −3 ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs
  235. +1 −1 ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs
  236. +5 −5 ILSpy/TreeNodes/TypeTreeNode.cs
  237. +3 −1 ILSpy/app.manifest
  238. +8 −8 SharpTreeView/Themes/Generic.xaml
@@ -25,7 +25,7 @@

namespace ICSharpCode.ILSpy.Analyzers
{
[ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "images/Search.png", 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)
@@ -21,7 +21,7 @@

namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = nameof(Resources.Back), ToolbarIcon = "Images/Back.png", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 0)]
[ExportToolbarCommand(ToolTip = nameof(Resources.Back), ToolbarIcon = "Images/Back", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 0)]
sealed class BrowseBackCommand : CommandWrapper
{
public BrowseBackCommand()
@@ -21,7 +21,7 @@

namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = nameof(Resources.Forward), ToolbarIcon = "Images/Forward.png", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 1)]
[ExportToolbarCommand(ToolTip = nameof(Resources.Forward), ToolbarIcon = "Images/Forward", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 1)]
sealed class BrowseForwardCommand : CommandWrapper
{
public BrowseForwardCommand()
@@ -21,8 +21,8 @@

namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = nameof(Resources.Open), ToolbarIcon = "Images/Open.png", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 0)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Open), MenuIcon = "Images/Open.png", MenuCategory = nameof(Resources.Open), MenuOrder = 0)]
[ExportToolbarCommand(ToolTip = nameof(Resources.Open), ToolbarIcon = "Images/Open", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 0)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Open), MenuIcon = "Images/Open", MenuCategory = nameof(Resources.Open), MenuOrder = 0)]
sealed class OpenCommand : CommandWrapper
{
public OpenCommand()
@@ -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)
@@ -21,7 +21,7 @@

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)
@@ -21,8 +21,8 @@

namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = nameof(Resources.RefreshCommand_ReloadAssemblies), ToolbarIcon = "Images/Refresh.png", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 2)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Reload), MenuIcon = "Images/Refresh.png", MenuCategory = nameof(Resources.Open), MenuOrder = 2)]
[ExportToolbarCommand(ToolTip = nameof(Resources.RefreshCommand_ReloadAssemblies), ToolbarIcon = "Images/Refresh", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 2)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Reload), MenuIcon = "Images/Refresh", MenuCategory = nameof(Resources.Open), MenuOrder = 2)]
sealed class RefreshCommand : CommandWrapper
{
public RefreshCommand()
@@ -29,7 +29,7 @@

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)
@@ -21,7 +21,7 @@

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()
@@ -23,8 +23,8 @@

namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources.SortAssembly_listName), MenuIcon = "Images/Sort.png", MenuCategory = nameof(Resources.View))]
[ExportToolbarCommand(ToolTip = nameof(Resources.SortAssemblyListName), ToolbarIcon = "Images/Sort.png", ToolbarCategory = nameof(Resources.View))]
[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources.SortAssembly_listName), MenuIcon = "Images/Sort", MenuCategory = nameof(Resources.View))]
[ExportToolbarCommand(ToolTip = nameof(Resources.SortAssemblyListName), ToolbarIcon = "Images/Sort", ToolbarCategory = nameof(Resources.View))]
sealed class SortAssemblyListCommand : SimpleCommand, IComparer<LoadedAssembly>
{
public override void Execute(object parameter)
@@ -39,8 +39,8 @@ int IComparer<LoadedAssembly>.Compare(LoadedAssembly x, LoadedAssembly y)
}
}

[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources._CollapseTreeNodes), MenuIcon = "Images/CollapseAll.png", MenuCategory = nameof(Resources.View))]
[ExportToolbarCommand(ToolTip = nameof(Resources.CollapseTreeNodes), ToolbarIcon = "Images/CollapseAll.png", ToolbarCategory = nameof(Resources.View))]
[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources._CollapseTreeNodes), MenuIcon = "Images/CollapseAll", MenuCategory = nameof(Resources.View))]
[ExportToolbarCommand(ToolTip = nameof(Resources.CollapseTreeNodes), ToolbarIcon = "Images/CollapseAll", ToolbarCategory = nameof(Resources.View))]
sealed class CollapseAllCommand : SimpleCommand
{
public override void Execute(object parameter)
@@ -20,7 +20,7 @@
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 @@ bool ShowContextMenu(TextViewContext context, out ContextMenu menu)
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); };
@@ -0,0 +1,38 @@
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

using System;
using System.Windows.Markup;

namespace ICSharpCode.ILSpy.Controls
{
class XamlResourceExtension : MarkupExtension
{
readonly string name;

public XamlResourceExtension(string name)
{
this.name = name ?? throw new ArgumentNullException(nameof(name));
}

public override object ProvideValue(IServiceProvider serviceProvider)
{
return Images.Load(null, name);
}
}
}
@@ -94,29 +94,36 @@ public bool SearchTermMatches(string text)
}
}

public bool ShowInternalApi {
get { return ShowApiLevel == ApiVisibility.PublicAndInternal; }
public bool ApiVisPublicOnly {
get { return showApiLevel == ApiVisibility.PublicOnly; }
set {
if (ShowApiLevel == ApiVisibility.PublicAndInternal) {
ShowApiLevel = ApiVisibility.PublicOnly;
} else {
ShowApiLevel = ApiVisibility.PublicAndInternal;
}
OnPropertyChanged(nameof(ShowInternalApi));
OnPropertyChanged(nameof(ShowAllApi));
if (value == (showApiLevel == ApiVisibility.PublicOnly)) return;
ShowApiLevel = ApiVisibility.PublicOnly;
OnPropertyChanged(nameof(ApiVisPublicOnly));
OnPropertyChanged(nameof(ApiVisPublicAndInternal));
OnPropertyChanged(nameof(ApiVisAll));
}
}

public bool ShowAllApi {
get { return ShowApiLevel == ApiVisibility.All; }
public bool ApiVisPublicAndInternal {
get { return showApiLevel == ApiVisibility.PublicAndInternal; }
set {
if (ShowApiLevel == ApiVisibility.All) {
ShowApiLevel = ApiVisibility.PublicOnly;
} else {
ShowApiLevel = ApiVisibility.All;
}
OnPropertyChanged(nameof(ShowInternalApi));
OnPropertyChanged(nameof(ShowAllApi));
if (value == (showApiLevel == ApiVisibility.PublicAndInternal)) return;
ShowApiLevel = ApiVisibility.PublicAndInternal;
OnPropertyChanged(nameof(ApiVisPublicOnly));
OnPropertyChanged(nameof(ApiVisPublicAndInternal));
OnPropertyChanged(nameof(ApiVisAll));
}
}

public bool ApiVisAll {
get { return showApiLevel == ApiVisibility.All; }
set {
if (value == (showApiLevel == ApiVisibility.All)) return;
ShowApiLevel = ApiVisibility.All;
OnPropertyChanged(nameof(ApiVisPublicOnly));
OnPropertyChanged(nameof(ApiVisPublicAndInternal));
OnPropertyChanged(nameof(ApiVisAll));
}
}

0 comments on commit 158d5e2

Please sign in to comment.
You can’t perform that action at this time.