Browse Source

Merge pull request #1299 from maikebing/master

ILSpy  Internationalization
pull/1515/head
Siegfried Pammer 6 years ago committed by GitHub
parent
commit
8e5d6917eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      BuildTools/tidy.py
  2. 116
      ICSharpCode.Decompiler/DecompilerSettings.cs
  3. 4
      ILSpy.AddIn/Utils.cs
  4. 4
      ILSpy.sln
  5. 19
      ILSpy/AboutPage.cs
  6. 3
      ILSpy/Analyzers/AnalyzeCommand.cs
  7. 3
      ILSpy/Commands/BrowseBackCommand.cs
  8. 3
      ILSpy/Commands/BrowseForwardCommand.cs
  9. 4
      ILSpy/Commands/CheckForUpdatesCommand.cs
  10. 5
      ILSpy/Commands/DecompileAllCommand.cs
  11. 4
      ILSpy/Commands/DisassembleAllCommand.cs
  12. 4
      ILSpy/Commands/ExitCommand.cs
  13. 2
      ILSpy/Commands/ExportCommandAttribute.cs
  14. 4
      ILSpy/Commands/GeneratePdbContextMenuEntry.cs
  15. 5
      ILSpy/Commands/OpenCommand.cs
  16. 4
      ILSpy/Commands/OpenFromGacCommand.cs
  17. 4
      ILSpy/Commands/OpenListCommand.cs
  18. 5
      ILSpy/Commands/RefreshCommand.cs
  19. 3
      ILSpy/Commands/RemoveAssembliesWithLoadErrors.cs
  20. 3
      ILSpy/Commands/SaveCommand.cs
  21. 4
      ILSpy/Commands/ShowDebugSteps.cs
  22. 9
      ILSpy/Commands/SortAssemblyListCommand.cs
  23. 2
      ILSpy/ContextMenuEntry.cs
  24. 9
      ILSpy/Controls/ResourceObjectTable.xaml
  25. 7
      ILSpy/Controls/ResourceStringTable.xaml
  26. 17
      ILSpy/CreateListDialog.xaml
  27. 15
      ILSpy/DebugSteps.xaml
  28. 2
      ILSpy/DebugSteps.xaml.cs
  29. 10
      ILSpy/ILSpy.csproj
  30. 8
      ILSpy/Languages/CSharpLanguage.cs
  31. 24
      ILSpy/MainWindow.xaml
  32. 38
      ILSpy/MainWindow.xaml.cs
  33. 14
      ILSpy/NugetPackageBrowserDialog.xaml
  34. 24
      ILSpy/OpenFromGacDialog.xaml
  35. 22
      ILSpy/OpenListDialog.xaml
  36. 3
      ILSpy/Options/DecompilerSettingsPanel.xaml
  37. 13
      ILSpy/Options/DecompilerSettingsPanel.xaml.cs
  38. 35
      ILSpy/Options/DisplaySettingsPanel.xaml
  39. 2
      ILSpy/Options/DisplaySettingsPanel.xaml.cs
  40. 5
      ILSpy/Options/MiscSettingsPanel.xaml
  41. 2
      ILSpy/Options/MiscSettingsPanel.xaml.cs
  42. 7
      ILSpy/Options/OptionsDialog.xaml
  43. 5
      ILSpy/Options/OptionsDialog.xaml.cs
  44. 1883
      ILSpy/Properties/Resources.Designer.cs
  45. 729
      ILSpy/Properties/Resources.resx
  46. 732
      ILSpy/Properties/Resources.zh-Hans.resx
  47. 8
      ILSpy/Search/SearchPane.cs
  48. 11
      ILSpy/Search/SearchPane.xaml
  49. 8
      ILSpy/TextView/DecompilerTextView.cs
  50. 5
      ILSpy/TextView/DecompilerTextView.xaml
  51. 6
      ILSpy/TextView/EditorCommands.cs
  52. 5
      ILSpy/TextView/FoldingCommands.cs
  53. 13
      ILSpy/TreeNodes/AssemblyTreeNode.cs
  54. 3
      ILSpy/TreeNodes/CopyFullyQualifiedNameContextMenuEntry.cs
  55. 4
      ILSpy/TreeNodes/DerivedTypesTreeNode.cs
  56. 3
      ILSpy/TreeNodes/ReferenceFolderTreeNode.cs
  57. 3
      ILSpy/TreeNodes/ResourceListTreeNode.cs
  58. 3
      ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs
  59. 3
      ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs
  60. 3
      ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs
  61. 3
      ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs
  62. 3
      ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs
  63. 10
      ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs
  64. 5
      ILSpy/TreeNodes/ThreadingSupport.cs

2
BuildTools/tidy.py

@ -22,7 +22,7 @@ def main(): @@ -22,7 +22,7 @@ def main():
if '\\obj\\' in root:
continue
for filename in files:
if filename.lower().endswith('.cs'):
if filename.lower().endswith('.cs') and not filename.lower().endswith('resources.designer.cs'):
if not check(os.path.join(root, filename)):
ok = False
print('Tidy check: {}'.format('successful' if ok else 'failed'))

116
ICSharpCode.Decompiler/DecompilerSettings.cs

@ -139,7 +139,7 @@ namespace ICSharpCode.Decompiler @@ -139,7 +139,7 @@ namespace ICSharpCode.Decompiler
/// Decompile anonymous methods/lambdas.
/// </summary>
[Category("C# 2.0 / VS 2005")]
[Description("Decompile anonymous methods/lambdas")]
[Description("DecompilerSettings.DecompileAnonymousMethodsLambdas")]
public bool AnonymousMethods {
get { return anonymousMethods; }
set {
@ -156,7 +156,7 @@ namespace ICSharpCode.Decompiler @@ -156,7 +156,7 @@ namespace ICSharpCode.Decompiler
/// Decompile anonymous types.
/// </summary>
[Category("C# 3.0 / VS 2008")]
[Description("Decompile anonymous types")]
[Description("DecompilerSettings.DecompileAnonymousTypes")]
public bool AnonymousTypes {
get { return anonymousTypes; }
set {
@ -173,7 +173,7 @@ namespace ICSharpCode.Decompiler @@ -173,7 +173,7 @@ namespace ICSharpCode.Decompiler
/// Use C# 3 lambda syntax if possible.
/// </summary>
[Category("C# 3.0 / VS 2008")]
[Description("Use lambda syntax, if possible")]
[Description("DecompilerSettings.UseLambdaSyntaxIfPossible")]
public bool UseLambdaSyntax {
get { return useLambdaSyntax; }
set {
@ -190,7 +190,7 @@ namespace ICSharpCode.Decompiler @@ -190,7 +190,7 @@ namespace ICSharpCode.Decompiler
/// Decompile expression trees.
/// </summary>
[Category("C# 3.0 / VS 2008")]
[Description("Decompile expression trees")]
[Description("DecompilerSettings.DecompileExpressionTrees")]
public bool ExpressionTrees {
get { return expressionTrees; }
set {
@ -207,7 +207,7 @@ namespace ICSharpCode.Decompiler @@ -207,7 +207,7 @@ namespace ICSharpCode.Decompiler
/// Decompile enumerators.
/// </summary>
[Category("C# 2.0 / VS 2005")]
[Description("Decompile enumerators (yield return)")]
[Description("DecompilerSettings.DecompileEnumeratorsYieldReturn")]
public bool YieldReturn {
get { return yieldReturn; }
set {
@ -224,7 +224,7 @@ namespace ICSharpCode.Decompiler @@ -224,7 +224,7 @@ namespace ICSharpCode.Decompiler
/// Decompile use of the 'dynamic' type.
/// </summary>
[Category("C# 4.0 / VS 2010")]
[Description("Decompile use of the 'dynamic' type")]
[Description("DecompilerSettings.DecompileUseOfTheDynamicType")]
public bool Dynamic {
get { return dynamic; }
set {
@ -241,7 +241,7 @@ namespace ICSharpCode.Decompiler @@ -241,7 +241,7 @@ namespace ICSharpCode.Decompiler
/// Decompile async methods.
/// </summary>
[Category("C# 5.0 / VS 2012")]
[Description("Decompile async methods")]
[Description("DecompilerSettings.DecompileAsyncMethods")]
public bool AsyncAwait {
get { return asyncAwait; }
set {
@ -259,7 +259,7 @@ namespace ICSharpCode.Decompiler @@ -259,7 +259,7 @@ namespace ICSharpCode.Decompiler
/// Only has an effect if <see cref="AsyncAwait"/> is enabled.
/// </summary>
[Category("C# 6.0 / VS 2015")]
[Description("Decompile await in catch/finally blocks")]
[Description("DecompilerSettings.DecompileAwaitInCatchFinallyBlocks")]
public bool AwaitInCatchFinally {
get { return awaitInCatchFinally; }
set {
@ -276,7 +276,7 @@ namespace ICSharpCode.Decompiler @@ -276,7 +276,7 @@ namespace ICSharpCode.Decompiler
/// Decompile [DecimalConstant(...)] as simple literal values.
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Decompile [DecimalConstant(...)] as simple literal values")]
[Description("DecompilerSettings.DecompileDecimalConstantAsSimpleLiteralValues")]
public bool DecimalConstants {
get { return decimalConstants; }
set {
@ -293,7 +293,7 @@ namespace ICSharpCode.Decompiler @@ -293,7 +293,7 @@ namespace ICSharpCode.Decompiler
/// Decompile C# 1.0 'public unsafe fixed int arr[10];' members.
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Decompile C# 1.0 'public unsafe fixed int arr[10];' members")]
[Description("DecompilerSettings.DecompileC10PublicUnsafeFixedIntArr10Members")]
public bool FixedBuffers {
get { return fixedBuffers; }
set {
@ -310,7 +310,7 @@ namespace ICSharpCode.Decompiler @@ -310,7 +310,7 @@ namespace ICSharpCode.Decompiler
/// Use lifted operators for nullables.
/// </summary>
[Category("C# 2.0 / VS 2005")]
[Description("Use lifted operators for nullables")]
[Description("DecompilerSettings.UseLiftedOperatorsForNullables")]
public bool LiftNullables {
get { return liftNullables; }
set {
@ -327,7 +327,7 @@ namespace ICSharpCode.Decompiler @@ -327,7 +327,7 @@ namespace ICSharpCode.Decompiler
/// Decompile C# 6 ?. and ?[] operators.
/// </summary>
[Category("C# 6.0 / VS 2015")]
[Description("Decompile ?. and ?[] operators")]
[Description("DecompilerSettings.DecompileAndOperators")]
public bool NullPropagation {
get { return nullPropagation; }
set {
@ -344,7 +344,7 @@ namespace ICSharpCode.Decompiler @@ -344,7 +344,7 @@ namespace ICSharpCode.Decompiler
/// Decompile automatic properties
/// </summary>
[Category("C# 3.0 / VS 2008")]
[Description("Decompile automatic properties")]
[Description("DecompilerSettings.DecompileAutomaticProperties")]
public bool AutomaticProperties {
get { return automaticProperties; }
set {
@ -361,7 +361,7 @@ namespace ICSharpCode.Decompiler @@ -361,7 +361,7 @@ namespace ICSharpCode.Decompiler
/// Decompile automatic events
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Decompile automatic events")]
[Description("DecompilerSettings.DecompileAutomaticEvents")]
public bool AutomaticEvents {
get { return automaticEvents; }
set {
@ -378,7 +378,7 @@ namespace ICSharpCode.Decompiler @@ -378,7 +378,7 @@ namespace ICSharpCode.Decompiler
/// Decompile using statements.
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Detect using statements")]
[Description("DecompilerSettings.DetectUsingStatements")]
public bool UsingStatement {
get { return usingStatement; }
set {
@ -394,8 +394,8 @@ namespace ICSharpCode.Decompiler @@ -394,8 +394,8 @@ namespace ICSharpCode.Decompiler
/// <summary>
/// Gets/Sets whether to use braces for single-statement-blocks.
/// </summary>
[Category("Other")]
[Description("Always use braces")]
[Category("DecompilerSettings.Other")]
[Description("DecompilerSettings.AlwaysUseBraces")]
public bool AlwaysUseBraces {
get { return alwaysUseBraces; }
set {
@ -412,7 +412,7 @@ namespace ICSharpCode.Decompiler @@ -412,7 +412,7 @@ namespace ICSharpCode.Decompiler
/// Decompile foreach statements.
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Detect foreach statements")]
[Description("DecompilerSettings.DetectForeachStatements")]
public bool ForEachStatement {
get { return forEachStatement; }
set {
@ -429,7 +429,7 @@ namespace ICSharpCode.Decompiler @@ -429,7 +429,7 @@ namespace ICSharpCode.Decompiler
/// Decompile lock statements.
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Detect lock statements")]
[Description("DecompilerSettings.DetectLockStatements")]
public bool LockStatement {
get { return lockStatement; }
set {
@ -443,7 +443,7 @@ namespace ICSharpCode.Decompiler @@ -443,7 +443,7 @@ namespace ICSharpCode.Decompiler
bool switchStatementOnString = true;
[Category("C# 1.0 / VS .NET")]
[Description("Detect switch on string")]
[Description("DecompilerSettings.DetectSwitchOnString")]
public bool SwitchStatementOnString {
get { return switchStatementOnString; }
set {
@ -457,7 +457,7 @@ namespace ICSharpCode.Decompiler @@ -457,7 +457,7 @@ namespace ICSharpCode.Decompiler
bool usingDeclarations = true;
[Category("C# 1.0 / VS .NET")]
[Description("Insert using declarations")]
[Description("DecompilerSettings.InsertUsingDeclarations")]
public bool UsingDeclarations {
get { return usingDeclarations; }
set {
@ -471,7 +471,7 @@ namespace ICSharpCode.Decompiler @@ -471,7 +471,7 @@ namespace ICSharpCode.Decompiler
bool extensionMethods = true;
[Category("C# 3.0 / VS 2008")]
[Description("Use extension method syntax")]
[Description("DecompilerSettings.UseExtensionMethodSyntax")]
public bool ExtensionMethods {
get { return extensionMethods; }
set {
@ -485,7 +485,7 @@ namespace ICSharpCode.Decompiler @@ -485,7 +485,7 @@ namespace ICSharpCode.Decompiler
bool queryExpressions = true;
[Category("C# 3.0 / VS 2008")]
[Description("Use LINQ expression syntax")]
[Description("DecompilerSettings.UseLINQExpressionSyntax")]
public bool QueryExpressions {
get { return queryExpressions; }
set {
@ -504,7 +504,7 @@ namespace ICSharpCode.Decompiler @@ -504,7 +504,7 @@ namespace ICSharpCode.Decompiler
/// false: <c>EventHandler h = new EventHandler(this.OnClick);</c>
/// </summary>
[Category("C# 2.0 / VS 2005")]
[Description("Use implicit method group conversions")]
[Description("DecompilerSettings.UseImplicitMethodGroupConversions")]
public bool UseImplicitMethodGroupConversion {
get { return useImplicitMethodGroupConversion; }
set {
@ -524,7 +524,7 @@ namespace ICSharpCode.Decompiler @@ -524,7 +524,7 @@ namespace ICSharpCode.Decompiler
/// default: false
/// </summary>
[Category("Other")]
[Description("Always cast targets of explicit interface implementation calls")]
[Description("DecompilerSettings.AlwaysCastTargetsOfExplicitInterfaceImplementationCalls")]
public bool AlwaysCastTargetsOfExplicitInterfaceImplementationCalls {
get { return alwaysCastTargetsOfExplicitInterfaceImplementationCalls; }
set {
@ -541,7 +541,7 @@ namespace ICSharpCode.Decompiler @@ -541,7 +541,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether to use variable names from debug symbols, if available.
/// </summary>
[Category("Other")]
[Description("Use variable names from debug symbols, if available")]
[Description("DecompilerSettings.UseVariableNamesFromDebugSymbolsIfAvailable")]
public bool UseDebugSymbols {
get { return useDebugSymbols; }
set {
@ -559,7 +559,7 @@ namespace ICSharpCode.Decompiler @@ -559,7 +559,7 @@ namespace ICSharpCode.Decompiler
/// If set to false, might produce non-compilable code.
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Array initializer expressions")]
[Description("DecompilerSettings.ArrayInitializerExpressions")]
public bool ArrayInitializers
{
get { return arrayInitializers; }
@ -579,7 +579,7 @@ namespace ICSharpCode.Decompiler @@ -579,7 +579,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether to use C# 3.0 object/collection initializers.
/// </summary>
[Category("C# 3.0 / VS 2008")]
[Description("Object/collection initializer expressions")]
[Description("DecompilerSettings.ObjectCollectionInitializerExpressions")]
public bool ObjectOrCollectionInitializers {
get { return objectCollectionInitializers; }
set {
@ -597,7 +597,7 @@ namespace ICSharpCode.Decompiler @@ -597,7 +597,7 @@ namespace ICSharpCode.Decompiler
/// Only has an effect if ObjectOrCollectionInitializers is enabled.
/// </summary>
[Category("C# 6.0 / VS 2015")]
[Description("Dictionary initializer expressions")]
[Description("DecompilerSettings.DictionaryInitializerExpressions")]
public bool DictionaryInitializers {
get { return dictionaryInitializers; }
set {
@ -615,7 +615,7 @@ namespace ICSharpCode.Decompiler @@ -615,7 +615,7 @@ namespace ICSharpCode.Decompiler
/// Only has an effect if ObjectOrCollectionInitializers is enabled.
/// </summary>
[Category("C# 6.0 / VS 2015")]
[Description("Allow extension 'Add' methods in collection initializer expressions")]
[Description("DecompilerSettings.AllowExtensionAddMethodsInCollectionInitializerExpressions")]
public bool ExtensionMethodsInCollectionInitializers {
get { return extensionMethodsInCollectionInitializers; }
set {
@ -632,7 +632,7 @@ namespace ICSharpCode.Decompiler @@ -632,7 +632,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether to use C# 6.0 string interpolation
/// </summary>
[Category("C# 6.0 / VS 2015")]
[Description("Use string interpolation")]
[Description("DecompilerSettings.UseStringInterpolation")]
public bool StringInterpolation {
get { return stringInterpolation; }
set {
@ -648,8 +648,8 @@ namespace ICSharpCode.Decompiler @@ -648,8 +648,8 @@ namespace ICSharpCode.Decompiler
/// <summary>
/// Gets/Sets whether to include XML documentation comments in the decompiled code.
/// </summary>
[Category("Other")]
[Description("Include XML documentation comments in the decompiled code")]
[Category("DecompilerSettings.Other")]
[Description("DecompilerSettings.IncludeXMLDocumentationCommentsInTheDecompiledCode")]
public bool ShowXmlDocumentation {
get { return showXmlDocumentation; }
set {
@ -704,7 +704,7 @@ namespace ICSharpCode.Decompiler @@ -704,7 +704,7 @@ namespace ICSharpCode.Decompiler
/// <summary>
/// Gets/Sets whether member bodies should be decompiled.
/// </summary>
[Category("Other")]
[Category("DecompilerSettings.Other")]
[Browsable(false)]
public bool DecompileMemberBodies {
get { return decompileMemberBodies; }
@ -722,7 +722,7 @@ namespace ICSharpCode.Decompiler @@ -722,7 +722,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether simple calculated getter-only property declarations should use expression body syntax.
/// </summary>
[Category("C# 6.0 / VS 2015")]
[Description("Use expression-bodied member syntax for get-only properties")]
[Description("DecompilerSettings.UseExpressionBodiedMemberSyntaxForGetOnlyProperties")]
public bool UseExpressionBodyForCalculatedGetterOnlyProperties {
get { return useExpressionBodyForCalculatedGetterOnlyProperties; }
set {
@ -739,7 +739,7 @@ namespace ICSharpCode.Decompiler @@ -739,7 +739,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether out variable declarations should be used when possible.
/// </summary>
[Category("C# 7.0 / VS 2017")]
[Description("Use out variable declarations")]
[Description("DecompilerSettings.UseOutVariableDeclarations")]
public bool OutVariables {
get { return outVariables; }
set {
@ -757,7 +757,7 @@ namespace ICSharpCode.Decompiler @@ -757,7 +757,7 @@ namespace ICSharpCode.Decompiler
/// Only has an effect if <see cref="OutVariables"/> is enabled.
/// </summary>
[Category("C# 7.0 / VS 2017")]
[Description("Use discards")]
[Description("DecompilerSettings.UseDiscards")]
public bool Discards {
get { return discards; }
set {
@ -774,7 +774,7 @@ namespace ICSharpCode.Decompiler @@ -774,7 +774,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether IsByRefLikeAttribute should be replaced with 'ref' modifiers on structs.
/// </summary>
[Category("C# 7.2 / VS 2017.4")]
[Description("IsByRefLikeAttribute should be replaced with 'ref' modifiers on structs")]
[Description("DecompilerSettings.IsByRefLikeAttributeShouldBeReplacedWithRefModifiersOnStructs")]
public bool IntroduceRefModifiersOnStructs {
get { return introduceRefModifiersOnStructs; }
set {
@ -792,7 +792,7 @@ namespace ICSharpCode.Decompiler @@ -792,7 +792,7 @@ namespace ICSharpCode.Decompiler
/// and with the 'in' modifier on parameters.
/// </summary>
[Category("C# 7.2 / VS 2017.4")]
[Description("IsReadOnlyAttribute should be replaced with 'readonly'/'in' modifiers on structs/parameters")]
[Description("DecompilerSettings.IsReadOnlyAttributeShouldBeReplacedWithReadonlyInModifiersOnStructsParameters")]
public bool IntroduceReadonlyAndInModifiers {
get { return introduceReadonlyAndInModifiers; }
set {
@ -810,7 +810,7 @@ namespace ICSharpCode.Decompiler @@ -810,7 +810,7 @@ namespace ICSharpCode.Decompiler
/// is replaced with "T : unmanaged" constraints.
/// </summary>
[Category("C# 7.3 / VS 2017.7")]
[Description("IsUnmanagedAttribute on type parameters should be replaced with 'unmanaged' constraints")]
[Description("DecompilerSettings.IsUnmanagedAttributeOnTypeParametersShouldBeReplacedWithUnmanagedConstraints")]
public bool IntroduceUnmanagedConstraint {
get { return introduceUnmanagedConstraint; }
set {
@ -827,7 +827,7 @@ namespace ICSharpCode.Decompiler @@ -827,7 +827,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether C# 7.3 stackalloc initializers should be used.
/// </summary>
[Category("C# 7.3 / VS 2017.7")]
[Description("Use stackalloc initializer syntax")]
[Description("DecompilerSettings.UseStackallocInitializerSyntax")]
public bool StackAllocInitializers {
get { return stackAllocInitializers; }
set {
@ -845,7 +845,7 @@ namespace ICSharpCode.Decompiler @@ -845,7 +845,7 @@ namespace ICSharpCode.Decompiler
/// should be used for <c>System.ValueTuple</c>.
/// </summary>
[Category("C# 7.0 / VS 2017")]
[Description("Use tuple type syntax")]
[Description("DecompilerSettings.UseTupleTypeSyntax")]
public bool TupleTypes {
get { return tupleTypes; }
set {
@ -863,7 +863,7 @@ namespace ICSharpCode.Decompiler @@ -863,7 +863,7 @@ namespace ICSharpCode.Decompiler
/// should be used in the decompiled output.
/// </summary>
[Category("C# 7.0 / VS 2017")]
[Description("Use implicit conversions between tuple types")]
[Description("DecompilerSettings.UseImplicitConversionsBetweenTupleTypes")]
public bool TupleConversions {
get { return tupleConversions; }
set {
@ -880,7 +880,7 @@ namespace ICSharpCode.Decompiler @@ -880,7 +880,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether tuple comparisons should be detected.
/// </summary>
[Category("C# 7.3 / VS 2017.7")]
[Description("Detect tuple comparisons")]
[Description("DecompilerSettings.DetectTupleComparisons")]
public bool TupleComparisons {
get { return tupleComparisons; }
set {
@ -897,7 +897,7 @@ namespace ICSharpCode.Decompiler @@ -897,7 +897,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether named arguments should be used.
/// </summary>
[Category("C# 4.0 / VS 2010")]
[Description("Use named arguments")]
[Description("DecompilerSettings.UseNamedArguments")]
public bool NamedArguments {
get { return namedArguments; }
set {
@ -914,7 +914,7 @@ namespace ICSharpCode.Decompiler @@ -914,7 +914,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether C# 7.2 non-trailing named arguments should be used.
/// </summary>
[Category("C# 7.2 / VS 2017.4")]
[Description("Use non-trailing named arguments")]
[Description("DecompilerSettings.UseNonTrailingNamedArguments")]
public bool NonTrailingNamedArguments {
get { return nonTrailingNamedArguments; }
set {
@ -931,7 +931,7 @@ namespace ICSharpCode.Decompiler @@ -931,7 +931,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether optional arguments should be removed, if possible.
/// </summary>
[Category("C# 4.0 / VS 2010")]
[Description("Remove optional arguments, if possible")]
[Description("DecompilerSettings.RemoveOptionalArgumentsIfPossible")]
public bool OptionalArguments {
get { return optionalArguments; }
set {
@ -949,7 +949,7 @@ namespace ICSharpCode.Decompiler @@ -949,7 +949,7 @@ namespace ICSharpCode.Decompiler
/// Note: this language feature is currently not implemented and this setting is always false.
/// </summary>
[Category("C# 7.0 / VS 2017")]
[Description("Introduce local functions (NOT IMPLEMENTED!)")]
[Description("DecompilerSettings.IntroduceLocalFunctionsNOTIMPLEMENTED")]
[Browsable(false)]
public bool LocalFunctions {
get { return localFunctions; }
@ -968,7 +968,7 @@ namespace ICSharpCode.Decompiler @@ -968,7 +968,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether C# 8.0 nullable reference types are enabled.
/// </summary>
[Category("C# 8.0 / VS 2019")]
[Description("Nullable reference types")]
[Description("DecompilerSettings.NullableReferenceTypes")]
public bool NullableReferenceTypes {
get { return nullableReferenceTypes; }
set {
@ -981,8 +981,8 @@ namespace ICSharpCode.Decompiler @@ -981,8 +981,8 @@ namespace ICSharpCode.Decompiler
bool showDebugInfo;
[Category("Other")]
[Description("Show info from debug symbols, if available")]
[Category("DecompilerSettings.Other")]
[Description("DecompilerSettings.ShowInfoFromDebugSymbolsIfAvailable")]
[Browsable(false)]
public bool ShowDebugInfo {
get { return showDebugInfo; }
@ -1000,7 +1000,7 @@ namespace ICSharpCode.Decompiler @@ -1000,7 +1000,7 @@ namespace ICSharpCode.Decompiler
/// <summary>
/// Gets/Sets whether the decompiler can assume that 'ldlen; conv.i4.ovf' does not throw an overflow exception.
/// </summary>
[Category("VB-specific options")]
[Category("DecompilerSettings.VBSpecificOptions")]
[Browsable(false)]
public bool AssumeArrayLengthFitsIntoInt32 {
get { return assumeArrayLengthFitsIntoInt32; }
@ -1017,7 +1017,7 @@ namespace ICSharpCode.Decompiler @@ -1017,7 +1017,7 @@ namespace ICSharpCode.Decompiler
/// <summary>
/// Gets/Sets whether to use increment and decrement operators
/// </summary>
[Category("VB-specific options")]
[Category("DecompilerSettings.VBSpecificOptions")]
[Browsable(false)]
public bool IntroduceIncrementAndDecrement {
get { return introduceIncrementAndDecrement; }
@ -1034,7 +1034,7 @@ namespace ICSharpCode.Decompiler @@ -1034,7 +1034,7 @@ namespace ICSharpCode.Decompiler
/// <summary>
/// Gets/Sets whether to use assignment expressions such as in while ((count = Do()) != 0) ;
/// </summary>
[Category("VB-specific options")]
[Category("DecompilerSettings.VBSpecificOptions")]
[Browsable(false)]
public bool MakeAssignmentExpressions {
get { return makeAssignmentExpressions; }
@ -1051,8 +1051,8 @@ namespace ICSharpCode.Decompiler @@ -1051,8 +1051,8 @@ namespace ICSharpCode.Decompiler
#region Options to aid F# decompilation
bool removeDeadCode = false;
[Category("F#-specific options")]
[Description("Remove dead and side effect free code (use with caution!)")]
[Category("DecompilerSettings.FSpecificOptions")]
[Description("DecompilerSettings.RemoveDeadAndSideEffectFreeCodeUseWithCaution")]
public bool RemoveDeadCode {
get { return removeDeadCode; }
set {
@ -1094,8 +1094,8 @@ namespace ICSharpCode.Decompiler @@ -1094,8 +1094,8 @@ namespace ICSharpCode.Decompiler
bool applyWindowsRuntimeProjections = true;
[Category("Other")]
[Description("Apply Windows Runtime projections on loaded assemblies")]
[Category("DecompilerSettings.Other")]
[Description("DecompilerSettings.ApplyWindowsRuntimeProjectionsOnLoadedAssemblies")]
public bool ApplyWindowsRuntimeProjections {
get { return applyWindowsRuntimeProjections; }
set {

4
ILSpy.AddIn/Utils.cs

@ -146,7 +146,7 @@ namespace ICSharpCode.ILSpy.AddIn @@ -146,7 +146,7 @@ namespace ICSharpCode.ILSpy.AddIn
}
}
public static object[] GetProperties(Properties properties, params string[] names)
public static object[] GetProperties(EnvDTE.Properties properties, params string[] names)
{
var values = new object[names.Length];
foreach (object p in properties) {
@ -166,7 +166,7 @@ namespace ICSharpCode.ILSpy.AddIn @@ -166,7 +166,7 @@ namespace ICSharpCode.ILSpy.AddIn
return values;
}
public static List<(string, object)> GetAllProperties(Properties properties)
public static List<(string, object)> GetAllProperties(EnvDTE.Properties properties)
{
var result = new List<(string, object)>();
for (int i = 0; i < properties.Count; i++) {

4
ILSpy.sln

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2026
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.202
MinimumVisualStudioVersion = 15.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{F45DB999-7E72-4000-B5AD-3A7B485A0896}"
ProjectSection(SolutionItems) = preProject

19
ILSpy/AboutPage.cs

@ -33,11 +33,12 @@ using System.Xml.Linq; @@ -33,11 +33,12 @@ using System.Xml.Linq;
using ICSharpCode.AvalonEdit.Rendering;
using ICSharpCode.Decompiler;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.TextView;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_Help", Header = "_About", MenuOrder = 99999)]
[ExportMainMenuCommand(Menu = nameof(Resources._Help), Header = nameof(Resources._About), MenuOrder = 99999)]
sealed class AboutPage : SimpleCommand
{
[Import]
@ -57,7 +58,7 @@ namespace ICSharpCode.ILSpy @@ -57,7 +58,7 @@ namespace ICSharpCode.ILSpy
public static void Display(DecompilerTextView textView)
{
AvalonEditTextOutput output = new AvalonEditTextOutput();
output.WriteLine("ILSpy version " + RevisionClass.FullVersion);
output.WriteLine(Resources.ILSpyVersion + RevisionClass.FullVersion);
output.AddUIElement(
delegate {
StackPanel stackPanel = new StackPanel();
@ -71,7 +72,7 @@ namespace ICSharpCode.ILSpy @@ -71,7 +72,7 @@ namespace ICSharpCode.ILSpy
}
CheckBox checkBox = new CheckBox();
checkBox.Margin = new Thickness(4);
checkBox.Content = "Automatically check for updates every week";
checkBox.Content = Resources.AutomaticallyCheckUpdatesEveryWeek;
UpdateSettings settings = new UpdateSettings(ILSpySettings.Load());
checkBox.SetBinding(CheckBox.IsCheckedProperty, new Binding("AutomaticUpdateCheckEnabled") { Source = settings });
return new StackPanel {
@ -118,12 +119,12 @@ namespace ICSharpCode.ILSpy @@ -118,12 +119,12 @@ namespace ICSharpCode.ILSpy
static void AddUpdateCheckButton(StackPanel stackPanel, DecompilerTextView textView)
{
Button button = new Button();
button.Content = "Check for updates";
button.Content = Resources.CheckUpdates;
button.Cursor = Cursors.Arrow;
stackPanel.Children.Add(button);
button.Click += delegate {
button.Content = "Checking...";
button.Content = Resources.Checking;
button.IsEnabled = false;
GetLatestVersionAsync().ContinueWith(
delegate (Task<AvailableVersionInfo> task) {
@ -152,19 +153,19 @@ namespace ICSharpCode.ILSpy @@ -152,19 +153,19 @@ namespace ICSharpCode.ILSpy
});
stackPanel.Children.Add(
new TextBlock {
Text = "You are using the latest release.",
Text = Resources.UsingLatestRelease,
VerticalAlignment = VerticalAlignment.Bottom
});
} else if (currentVersion < availableVersion.Version) {
stackPanel.Children.Add(
new TextBlock {
Text = "Version " + availableVersion.Version + " is available.",
Text = string.Format(Resources.VersionAvailable, availableVersion.Version ),
Margin = new Thickness(0,0,8,0),
VerticalAlignment = VerticalAlignment.Bottom
});
if (availableVersion.DownloadUrl != null) {
Button button = new Button();
button.Content = "Download";
button.Content = Resources.Download;
button.Cursor = Cursors.Arrow;
button.Click += delegate {
MainWindow.OpenLink(availableVersion.DownloadUrl);
@ -172,7 +173,7 @@ namespace ICSharpCode.ILSpy @@ -172,7 +173,7 @@ namespace ICSharpCode.ILSpy
stackPanel.Children.Add(button);
}
} else {
stackPanel.Children.Add(new TextBlock { Text = "You are using a nightly build newer than the latest release." });
stackPanel.Children.Add(new TextBlock { Text = Resources.UsingNightlyBuildNewerThanLatestRelease });
}
}

3
ILSpy/Analyzers/AnalyzeCommand.cs

@ -20,11 +20,12 @@ using System; @@ -20,11 +20,12 @@ using System;
using System.Linq;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.TreeNodes;
namespace ICSharpCode.ILSpy.Analyzers
{
[ExportContextMenuEntry(Header = "Analyze", Icon = "images/Search.png", Category = "Analyze", InputGestureText = "Ctrl+R", Order = 100)]
[ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "images/Search.png", Category = nameof(Resources.Analyze), InputGestureText = "Ctrl+R", Order = 100)]
internal sealed class AnalyzeCommand : SimpleCommand, IContextMenuEntry
{
public bool IsVisible(TextViewContext context)

3
ILSpy/Commands/BrowseBackCommand.cs

@ -17,10 +17,11 @@ @@ -17,10 +17,11 @@
// DEALINGS IN THE SOFTWARE.
using System.Windows.Input;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = "Back", ToolbarIcon = "Images/Back.png", ToolbarCategory = "Navigation", ToolbarOrder = 0)]
[ExportToolbarCommand(ToolTip = nameof(Resources.Back), ToolbarIcon = "Images/Back.png", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 0)]
sealed class BrowseBackCommand : CommandWrapper
{
public BrowseBackCommand()

3
ILSpy/Commands/BrowseForwardCommand.cs

@ -17,10 +17,11 @@ @@ -17,10 +17,11 @@
// DEALINGS IN THE SOFTWARE.
using System.Windows.Input;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = "Forward", ToolbarIcon = "Images/Forward.png", ToolbarCategory = "Navigation", ToolbarOrder = 1)]
[ExportToolbarCommand(ToolTip = nameof(Resources.Forward), ToolbarIcon = "Images/Forward.png", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 1)]
sealed class BrowseForwardCommand : CommandWrapper
{
public BrowseForwardCommand()

4
ILSpy/Commands/CheckForUpdatesCommand.cs

@ -17,9 +17,11 @@ @@ -17,9 +17,11 @@
// DEALINGS IN THE SOFTWARE.
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_Help", Header = "_Check for Updates", MenuOrder = 5000)]
[ExportMainMenuCommand(Menu = nameof(Resources._Help), Header = nameof(Resources._CheckUpdates), MenuOrder = 5000)]
sealed class CheckForUpdatesCommand : SimpleCommand
{
public override void Execute(object parameter)

5
ILSpy/Commands/DecompileAllCommand.cs

@ -23,11 +23,12 @@ using System.Diagnostics; @@ -23,11 +23,12 @@ using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using ICSharpCode.Decompiler;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.TextView;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_File", Header = "DEBUG -- Decompile All", MenuCategory = "Open", MenuOrder = 2.5)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.DEBUGDecompile), MenuCategory = nameof(Resources.Open), MenuOrder = 2.5)]
sealed class DecompileAllCommand : SimpleCommand
{
public override bool CanExecute(object parameter)
@ -67,7 +68,7 @@ namespace ICSharpCode.ILSpy @@ -67,7 +68,7 @@ namespace ICSharpCode.ILSpy
}
}
[ExportMainMenuCommand(Menu = "_File", Header = "DEBUG -- Decompile 100x", MenuCategory = "Open", MenuOrder = 2.6)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.DEBUGDecompile100x), MenuCategory = nameof(Resources.Open), MenuOrder = 2.6)]
sealed class Decompile100TimesCommand : SimpleCommand
{
public override void Execute(object parameter)

4
ILSpy/Commands/DisassembleAllCommand.cs

@ -22,10 +22,10 @@ using System; @@ -22,10 +22,10 @@ using System;
using System.Diagnostics;
using System.Threading.Tasks;
using ICSharpCode.ILSpy.TextView;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_File", Header = "DEBUG -- Disassemble All", MenuCategory = "Open", MenuOrder = 2.5)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.DEBUGDisassemble), MenuCategory = nameof(Resources.Open), MenuOrder = 2.5)]
sealed class DisassembleAllCommand : SimpleCommand
{
public override bool CanExecute(object parameter)

4
ILSpy/Commands/ExitCommand.cs

@ -15,11 +15,11 @@ @@ -15,11 +15,11 @@
// 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 ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_File", Header = "E_xit", MenuOrder = 99999, MenuCategory = "Exit")]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.E_xit), MenuOrder = 99999, MenuCategory = nameof(Resources.Exit))]
sealed class ExitCommand : SimpleCommand
{
public override void Execute(object parameter)

2
ILSpy/Commands/ExportCommandAttribute.cs

@ -30,6 +30,7 @@ namespace ICSharpCode.ILSpy @@ -30,6 +30,7 @@ namespace ICSharpCode.ILSpy
string ToolbarCategory { get; }
object Tag { get; }
double ToolbarOrder { get; }
}
[MetadataAttribute]
@ -58,7 +59,6 @@ namespace ICSharpCode.ILSpy @@ -58,7 +59,6 @@ namespace ICSharpCode.ILSpy
string MenuCategory { get; }
string InputGestureText { get; }
bool IsEnabled { get; }
double MenuOrder { get; }
}

4
ILSpy/Commands/GeneratePdbContextMenuEntry.cs

@ -28,7 +28,7 @@ using ICSharpCode.Decompiler.DebugInfo; @@ -28,7 +28,7 @@ using ICSharpCode.Decompiler.DebugInfo;
using ICSharpCode.ILSpy.TextView;
using ICSharpCode.ILSpy.TreeNodes;
using Microsoft.Win32;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportContextMenuEntry(Header = "Generate portable PDB")]
@ -87,7 +87,7 @@ namespace ICSharpCode.ILSpy @@ -87,7 +87,7 @@ namespace ICSharpCode.ILSpy
}
}
[ExportMainMenuCommand(Menu = "_File", Header = "Generate portable PDB", MenuCategory = "Save")]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.GeneratePortable), MenuCategory = "Save")]
class GeneratePdbMainMenuEntry : SimpleCommand
{
public override bool CanExecute(object parameter)

5
ILSpy/Commands/OpenCommand.cs

@ -17,11 +17,12 @@ @@ -17,11 +17,12 @@
// DEALINGS IN THE SOFTWARE.
using System.Windows.Input;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = "Open", ToolbarIcon = "Images/Open.png", ToolbarCategory = "Open", ToolbarOrder = 0)]
[ExportMainMenuCommand(Menu = "_File", Header = "_Open...", MenuIcon = "Images/Open.png", MenuCategory = "Open", MenuOrder = 0)]
[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)]
sealed class OpenCommand : CommandWrapper
{
public OpenCommand()

4
ILSpy/Commands/OpenFromGacCommand.cs

@ -16,10 +16,10 @@ @@ -16,10 +16,10 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_File", Header = "Open from _GAC...", MenuIcon = "Images/AssemblyListGAC.png", MenuCategory = "Open", MenuOrder = 1)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.OpenFrom_GAC), MenuIcon = "Images/AssemblyListGAC.png", MenuCategory = nameof(Resources.Open), MenuOrder = 1)]
sealed class OpenFromGacCommand : SimpleCommand
{
public override void Execute(object parameter)

4
ILSpy/Commands/OpenListCommand.cs

@ -17,9 +17,11 @@ @@ -17,9 +17,11 @@
// DEALINGS IN THE SOFTWARE.
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_File", Header = "Open _List...", MenuIcon = "Images/AssemblyList.png", MenuCategory = "Open", MenuOrder = 1.7)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.Open_List), MenuIcon = "Images/AssemblyList.png", MenuCategory = nameof(Resources.Open), MenuOrder = 1.7)]
sealed class OpenListCommand : SimpleCommand
{
public override void Execute(object parameter)

5
ILSpy/Commands/RefreshCommand.cs

@ -17,11 +17,12 @@ @@ -17,11 +17,12 @@
// DEALINGS IN THE SOFTWARE.
using System.Windows.Input;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = "Reload all assemblies", ToolbarIcon = "Images/Refresh.png", ToolbarCategory = "Open", ToolbarOrder = 2)]
[ExportMainMenuCommand(Menu = "_File", Header = "_Reload", MenuIcon = "Images/Refresh.png", MenuCategory = "Open", MenuOrder = 2)]
[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)]
sealed class RefreshCommand : CommandWrapper
{
public RefreshCommand()

3
ILSpy/Commands/RemoveAssembliesWithLoadErrors.cs

@ -19,10 +19,11 @@ @@ -19,10 +19,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_File", Header = "_Remove Assemblies with load errors", MenuCategory = "Remove", MenuOrder = 2.6)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._RemoveAssembliesWithLoadErrors), MenuCategory = nameof(Resources.Remove), MenuOrder = 2.6)]
class RemoveAssembliesWithLoadErrors : SimpleCommand
{
public override bool CanExecute(object parameter)

3
ILSpy/Commands/SaveCommand.cs

@ -17,10 +17,11 @@ @@ -17,10 +17,11 @@
// DEALINGS IN THE SOFTWARE.
using System.Windows.Input;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_File", Header = "_Save Code...", MenuIcon = "Images/SaveFile.png", MenuCategory = "Save", MenuOrder = 0)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._SaveCode), MenuIcon = "Images/SaveFile.png", MenuCategory = nameof(Resources.Save), MenuOrder = 0)]
sealed class SaveCommand : CommandWrapper
{
public SaveCommand()

4
ILSpy/Commands/ShowDebugSteps.cs

@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
#if DEBUG
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy.Commands
{
[ExportMainMenuCommand(Menu = "_View", Header = "_Show debug steps", MenuOrder = 5000)]
[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources._ShowDebugSteps), MenuOrder = 5000)]
class ShowDebugSteps : SimpleCommand
{
public override void Execute(object parameter)

9
ILSpy/Commands/SortAssemblyListCommand.cs

@ -18,12 +18,13 @@ @@ -18,12 +18,13 @@
using System;
using System.Collections.Generic;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.TreeView;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_View", Header = "Sort assembly _list by name", MenuIcon = "Images/Sort.png", MenuCategory = "View")]
[ExportToolbarCommand(ToolTip = "Sort assembly list by name", ToolbarIcon = "Images/Sort.png", ToolbarCategory = "View")]
[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))]
sealed class SortAssemblyListCommand : SimpleCommand, IComparer<LoadedAssembly>
{
public override void Execute(object parameter)
@ -38,8 +39,8 @@ namespace ICSharpCode.ILSpy @@ -38,8 +39,8 @@ namespace ICSharpCode.ILSpy
}
}
[ExportMainMenuCommand(Menu = "_View", Header = "_Collapse all tree nodes", MenuIcon = "Images/CollapseAll.png", MenuCategory = "View")]
[ExportToolbarCommand(ToolTip = "Collapse all tree nodes", ToolbarIcon = "Images/CollapseAll.png", ToolbarCategory = "View")]
[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))]
sealed class CollapseAllCommand : SimpleCommand
{
public override void Execute(object parameter)

2
ILSpy/ContextMenuEntry.cs

@ -219,7 +219,7 @@ namespace ICSharpCode.ILSpy @@ -219,7 +219,7 @@ namespace ICSharpCode.ILSpy
needSeparatorForCategory = false;
}
MenuItem menuItem = new MenuItem();
menuItem.Header = entryPair.Metadata.Header;
menuItem.Header = MainWindow.GetResourceString( entryPair.Metadata.Header);
menuItem.InputGestureText = entryPair.Metadata.InputGestureText;
if (!string.IsNullOrEmpty(entryPair.Metadata.Icon)) {
menuItem.Icon = new Image {

9
ILSpy/Controls/ResourceObjectTable.xaml

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
<UserControl x:Class="ICSharpCode.ILSpy.Controls.ResourceObjectTable"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Controls"
Cursor="Arrow">
<UserControl.CommandBindings>
@ -27,7 +28,7 @@ @@ -27,7 +28,7 @@
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Label Content="Other Resources"
<Label Content="{x:Static properties:Resources.OtherResources}"
FontFamily="Segoe UI"
FontWeight="Bold"
FontSize="12pt" />
@ -43,17 +44,17 @@ @@ -43,17 +44,17 @@
<GridView AllowsColumnReorder="False">
<GridView.Columns>
<local:SortableGridViewColumn DisplayMemberBinding="{Binding Key}" SortBy="Key">
<GridViewColumnHeader Content="Name"
<GridViewColumnHeader Content="{x:Static properties:Resources.Name}"
HorizontalContentAlignment="Left"
FontWeight="Bold" />
</local:SortableGridViewColumn>
<local:SortableGridViewColumn DisplayMemberBinding="{Binding Value}" SortBy="Value">
<GridViewColumnHeader Content="Value (as string)"
<GridViewColumnHeader Content="{x:Static properties:Resources.ValueString}"
HorizontalContentAlignment="Left"
FontWeight="Bold" />
</local:SortableGridViewColumn>
<local:SortableGridViewColumn DisplayMemberBinding="{Binding Type}" SortBy="Type">
<GridViewColumnHeader Content="Type"
<GridViewColumnHeader Content="{x:Static properties:Resources.Type}"
HorizontalContentAlignment="Left"
FontWeight="Bold" />
</local:SortableGridViewColumn>

7
ILSpy/Controls/ResourceStringTable.xaml

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Controls"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
Cursor="Arrow">
<UserControl.CommandBindings>
<CommandBinding Command="ApplicationCommands.Copy"
@ -27,7 +28,7 @@ @@ -27,7 +28,7 @@
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Label Content="String Table"
<Label Content="{x:Static properties:Resources.StringTable}"
FontFamily="Segoe UI"
FontWeight="Bold"
FontSize="12pt" />
@ -43,12 +44,12 @@ @@ -43,12 +44,12 @@
<GridView AllowsColumnReorder="False">
<GridView.Columns>
<local:SortableGridViewColumn DisplayMemberBinding="{Binding Key}" SortBy="Key">
<GridViewColumnHeader Content="Name"
<GridViewColumnHeader Content="{x:Static properties:Resources.Name}"
HorizontalContentAlignment="Left"
FontWeight="Bold" />
</local:SortableGridViewColumn>
<local:SortableGridViewColumn DisplayMemberBinding="{Binding Value}" SortBy="Value">
<GridViewColumnHeader Content="Value"
<GridViewColumnHeader Content="{x:Static properties:Resources.Value}"
HorizontalContentAlignment="Left"
FontWeight="Bold" />
</local:SortableGridViewColumn>

17
ILSpy/CreateListDialog.xaml

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
<Window
x:Class="ICSharpCode.ILSpy.CreateListDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
Title="New list"
x:Class="ICSharpCode.ILSpy.CreateListDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
Title="{x:Static properties:Resources.List}"
Style="{DynamicResource DialogWindow}"
WindowStartupLocation="CenterOwner"
ResizeMode="NoResize"
@ -13,12 +16,12 @@ @@ -13,12 +16,12 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel>
<Label>Enter a list name:</Label>
<TextBox Margin="8,8" Name="ListName" TextChanged="TextBox_TextChanged"></TextBox>
<Label Content="{x:Static properties:Resources.EnterListName}"/>
<TextBox Margin="8,8" Name="ListName" TextChanged="TextBox_TextChanged"></TextBox>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="8,0">
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click">Create</Button>
<Button IsCancel="True" Margin="2,0">Cancel</Button>
</StackPanel>
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click" Content="{x:Static properties:Resources.Create}"/>
<Button IsCancel="True" Margin="2,0" Content="{x:Static properties:Resources.Cancel}"/>
</StackPanel>
</Grid>
</Window>

15
ILSpy/DebugSteps.xaml

@ -4,14 +4,15 @@ @@ -4,14 +4,15 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ICSharpCode.ILSpy"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<DockPanel>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
<CheckBox Margin="3" Content="UseFieldSugar" IsChecked="{Binding UseFieldSugar, Source={x:Static local:DebugSteps.Options}}" />
<CheckBox Margin="3" Content="UseLogicOperationSugar" IsChecked="{Binding UseLogicOperationSugar, Source={x:Static local:DebugSteps.Options}}" />
<CheckBox Margin="3" Content="ShowILRanges" IsChecked="{Binding ShowILRanges, Source={x:Static local:DebugSteps.Options}}" />
<CheckBox Margin="3" Content="ShowChildIndexInBlock" IsChecked="{Binding ShowChildIndexInBlock, Source={x:Static local:DebugSteps.Options}}" />
<CheckBox Margin="3" Content="{x:Static properties:Resources.UseFieldSugar}" IsChecked="{Binding UseFieldSugar, Source={x:Static local:DebugSteps.Options}}" />
<CheckBox Margin="3" Content="{x:Static properties:Resources.UseLogicOperationSugar}" IsChecked="{Binding UseLogicOperationSugar, Source={x:Static local:DebugSteps.Options}}" />
<CheckBox Margin="3" Content="{x:Static properties:Resources.ShowILRanges}" IsChecked="{Binding ShowILRanges, Source={x:Static local:DebugSteps.Options}}" />
<CheckBox Margin="3" Content="{x:Static properties:Resources.ShowChildIndexInBlock}" IsChecked="{Binding ShowChildIndexInBlock, Source={x:Static local:DebugSteps.Options}}" />
</StackPanel>
<TreeView Name="tree" MouseDoubleClick="ShowStateAfter_Click" KeyDown="tree_KeyDown">
<TreeView.ItemTemplate>
@ -21,9 +22,9 @@ @@ -21,9 +22,9 @@
</TreeView.ItemTemplate>
<TreeView.ContextMenu>
<ContextMenu>
<MenuItem Header="Show state before this step" Click="ShowStateBefore_Click" InputGestureText="Shift+Enter" />
<MenuItem Header="Show state after this step" Click="ShowStateAfter_Click" InputGestureText="Enter" />
<MenuItem Header="Debug this step" Click="DebugStep_Click" />
<MenuItem Header="{x:Static properties:Resources.ShowStateBeforeThisStep}" Click="ShowStateBefore_Click" InputGestureText="Shift+Enter" />
<MenuItem Header="{x:Static properties:Resources.ShowStateAfterThisStep}" Click="ShowStateAfter_Click" InputGestureText="Enter" />
<MenuItem Header="{x:Static properties:Resources.DebugThisStep}" Click="DebugStep_Click" />
</ContextMenu>
</TreeView.ContextMenu>
</TreeView>

2
ILSpy/DebugSteps.xaml.cs

@ -79,7 +79,7 @@ namespace ICSharpCode.ILSpy @@ -79,7 +79,7 @@ namespace ICSharpCode.ILSpy
public static void Show()
{
MainWindow.Instance.ShowInTopPane("Debug Steps", new DebugSteps());
MainWindow.Instance.ShowInTopPane(Properties.Resources.DebugSteps, new DebugSteps());
}
void IPane.Closed()

10
ILSpy/ILSpy.csproj

@ -159,6 +159,11 @@ @@ -159,6 +159,11 @@
<Compile Include="Languages\Language.cs" />
<Compile Include="Languages\Languages.cs" />
<Compile Include="Options\DecompilerSettingsPanel.xaml.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Search\LiteralSearchStrategy.cs" />
<Compile Include="LoadedAssembly.cs" />
<Compile Include="LoadedAssemblyExtensions.cs" />
@ -246,6 +251,11 @@ @@ -246,6 +251,11 @@
<EmbeddedResource Include="..\doc\MS-PL.txt">
<Link>MS-PL.txt</Link>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.zh-Hans.resx" />
<Resource Include="Images\AssemblyList.png" />
<Resource Include="Images\AssemblyListGAC.png" />
<Resource Include="Images\AssemblyWarning.png" />

8
ILSpy/Languages/CSharpLanguage.cs

@ -293,9 +293,9 @@ namespace ICSharpCode.ILSpy @@ -293,9 +293,9 @@ namespace ICSharpCode.ILSpy
var loadedAssembly = MainWindow.Instance.CurrentAssemblyList.GetAssemblies().FirstOrDefault(la => la.GetPEFileOrNull() == module);
if (loadedAssembly == null || !loadedAssembly.LoadedAssemblyReferencesInfo.HasErrors)
return;
const string line1 = "Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,";
const string line2 = "for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.";
AddWarningMessage(module, output, line1, line2, "Show assembly load log", Images.ViewCode, delegate {
string line1 = Properties.Resources.WarningSomeAssemblyReference;
string line2 = Properties.Resources.PropertyManuallyMissingReferencesListLoadedAssemblies;
AddWarningMessage(module, output, line1, line2, Properties.Resources.ShowAssemblyLoad, Images.ViewCode, delegate {
MainWindow.Instance.SelectNode(MainWindow.Instance.FindTreeNode(module).Children.OfType<ReferenceFolderTreeNode>().First());
});
}
@ -305,7 +305,7 @@ namespace ICSharpCode.ILSpy @@ -305,7 +305,7 @@ namespace ICSharpCode.ILSpy
var metadata = module.Metadata;
if (!metadata.GetCustomAttributes(Handle.AssemblyDefinition).HasKnownAttribute(metadata, KnownAttribute.ReferenceAssembly))
return;
const string line1 = "Warning: This assembly is marked as 'reference assembly', which means that it only contains metadata and no executable code.";
string line1 = Properties.Resources.WarningAsmMarkedRef;
AddWarningMessage(module, output, line1);
}

24
ILSpy/MainWindow.xaml

@ -3,8 +3,10 @@ @@ -3,8 +3,10 @@
x:Class="ICSharpCode.ILSpy.MainWindow"
x:ClassModifier="public"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:tv="clr-namespace:ICSharpCode.TreeView;assembly=ICSharpCode.TreeView"
xmlns:local="clr-namespace:ICSharpCode.ILSpy" xmlns:textView="clr-namespace:ICSharpCode.ILSpy.TextView"
xmlns:local="clr-namespace:ICSharpCode.ILSpy"
xmlns:textView="clr-namespace:ICSharpCode.ILSpy.TextView"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
Title="ILSpy"
MinWidth="250"
MinHeight="200"
@ -48,14 +50,14 @@ @@ -48,14 +50,14 @@
<DockPanel>
<!-- Main menu -->
<Menu DockPanel.Dock="Top" Name="mainMenu" Height="23" KeyboardNavigation.TabNavigation="None">
<MenuItem Header="_File" /> <!-- contents of file menu are added using MEF -->
<MenuItem Header="_View">
<MenuItem Header="Show _internal types and members" IsCheckable="True" IsChecked="{Binding FilterSettings.ShowInternalApi}">
<MenuItem Header="{x:Static properties:Resources._File}" /> <!-- contents of file menu are added using MEF -->
<MenuItem Header="{x:Static properties:Resources._View}">
<MenuItem Header="{x:Static properties:Resources.Show_internalTypesMembers}" IsCheckable="True" IsChecked="{Binding FilterSettings.ShowInternalApi}">
<MenuItem.Icon>
<Image Width="16" Height="16" Source="Images/PrivateInternal.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Show _all types and members" IsCheckable="True" IsChecked="{Binding FilterSettings.ShowAllApi}">
<MenuItem Header="{x:Static properties:Resources.Show_allTypesAndMembers}" IsCheckable="True" IsChecked="{Binding FilterSettings.ShowAllApi}">
<MenuItem.Icon>
<Image Width="16" Height="16" Source="Images/ShowAll.png" />
</MenuItem.Icon>
@ -82,10 +84,10 @@ @@ -82,10 +84,10 @@
<Separator />
<!-- 'Open' toolbar category is inserted here -->
<Separator />
<CheckBox IsChecked="{Binding FilterSettings.ShowInternalApi}" ToolTip="Show internal types and members">
<CheckBox IsChecked="{Binding FilterSettings.ShowInternalApi}" ToolTip="{x:Static properties:Resources.ShowInternalTypesMembers}">
<Image Width="16" Height="16" Source="Images/PrivateInternal.png" />
</CheckBox>
<CheckBox IsChecked="{Binding FilterSettings.ShowAllApi}" ToolTip="Show all types and members">
<CheckBox IsChecked="{Binding FilterSettings.ShowAllApi}" ToolTip="{x:Static properties:Resources.ShowAllTypesAndMembers}">
<Image Width="16" Height="16" Source="Images/ShowAll.png" />
</CheckBox>
<Separator />
@ -103,8 +105,8 @@ @@ -103,8 +105,8 @@
<TextBlock VerticalAlignment="Center"
HorizontalAlignment="Right"
x:Name="StatusLabel"
ToolTip="Status"
Text="Stand by..."/>
ToolTip="{x:Static properties:Resources.Status}"
Text="{x:Static properties:Resources.StandBy}"/>
</StatusBarItem>
</StatusBar>
<!-- Main grid separating left pane (treeView) from main pane (textEditor) -->
@ -161,8 +163,8 @@ @@ -161,8 +163,8 @@
<DockPanel KeyboardNavigation.TabNavigation="Contained">
<Button DockPanel.Dock="Right" Click="updatePanelCloseButtonClick" MinWidth="0">X</Button>
<StackPanel Orientation="Horizontal">
<TextBlock Name="updatePanelMessage" Margin="4,0" VerticalAlignment="Center">A new ILSpy version is available.</TextBlock>
<Button Name="downloadOrCheckUpdateButton" Click="downloadOrCheckUpdateButtonClick">Download</Button>
<TextBlock Name="updatePanelMessage" Margin="4,0" VerticalAlignment="Center" Text="{x:Static properties:Resources.ILSpyVersionAvailable}" />
<Button Name="downloadOrCheckUpdateButton" Click="downloadOrCheckUpdateButtonClick" Content="{x:Static properties:Resources.Download}"/>
</StackPanel>
</DockPanel>
</Border>

38
ILSpy/MainWindow.xaml.cs

@ -114,13 +114,13 @@ namespace ICSharpCode.ILSpy @@ -114,13 +114,13 @@ namespace ICSharpCode.ILSpy
int navigationPos = 0;
int openPos = 1;
var toolbarCommands = App.ExportProvider.GetExports<ICommand, IToolbarCommandMetadata>("ToolbarCommand");
foreach (var commandGroup in toolbarCommands.OrderBy(c => c.Metadata.ToolbarOrder).GroupBy(c => c.Metadata.ToolbarCategory)) {
if (commandGroup.Key == "Navigation") {
foreach (var commandGroup in toolbarCommands.OrderBy(c => c.Metadata.ToolbarOrder).GroupBy(c => Properties.Resources.ResourceManager.GetString(c.Metadata.ToolbarCategory))) {
if (commandGroup.Key == Properties.Resources.ResourceManager.GetString("Navigation")) {
foreach (var command in commandGroup) {
toolBar.Items.Insert(navigationPos++, MakeToolbarItem(command));
openPos++;
}
} else if (commandGroup.Key == "Open") {
} else if (commandGroup.Key == Properties.Resources.ResourceManager.GetString("Open")) {
foreach (var command in commandGroup) {
toolBar.Items.Insert(openPos++, MakeToolbarItem(command));
}
@ -138,7 +138,7 @@ namespace ICSharpCode.ILSpy @@ -138,7 +138,7 @@ namespace ICSharpCode.ILSpy
{
return new Button {
Command = CommandWrapper.Unwrap(command.Value),
ToolTip = command.Metadata.ToolTip,
ToolTip =Properties.Resources.ResourceManager.GetString( command.Metadata.ToolTip),
Tag = command.Metadata.Tag,
Content = new Image {
Width = 16,
@ -154,12 +154,12 @@ namespace ICSharpCode.ILSpy @@ -154,12 +154,12 @@ namespace ICSharpCode.ILSpy
void InitMainMenu()
{
var mainMenuCommands = App.ExportProvider.GetExports<ICommand, IMainMenuCommandMetadata>("MainMenuCommand");
foreach (var topLevelMenu in mainMenuCommands.OrderBy(c => c.Metadata.MenuOrder).GroupBy(c => c.Metadata.Menu)) {
var topLevelMenuItem = mainMenu.Items.OfType<MenuItem>().FirstOrDefault(m => (m.Header as string) == topLevelMenu.Key);
foreach (var category in topLevelMenu.GroupBy(c => c.Metadata.MenuCategory)) {
foreach (var topLevelMenu in mainMenuCommands.OrderBy(c => c.Metadata.MenuOrder).GroupBy(c => GetResourceString(c.Metadata.Menu))) {
var topLevelMenuItem = mainMenu.Items.OfType<MenuItem>().FirstOrDefault(m => (GetResourceString(m.Header as string)) == topLevelMenu.Key);
foreach (var category in topLevelMenu.GroupBy(c => GetResourceString(c.Metadata.MenuCategory))) {
if (topLevelMenuItem == null) {
topLevelMenuItem = new MenuItem();
topLevelMenuItem.Header = topLevelMenu.Key;
topLevelMenuItem.Header = GetResourceString(topLevelMenu.Key);
mainMenu.Items.Add(topLevelMenuItem);
} else if (topLevelMenuItem.Items.Count > 0) {
topLevelMenuItem.Items.Add(new Separator());
@ -167,8 +167,8 @@ namespace ICSharpCode.ILSpy @@ -167,8 +167,8 @@ namespace ICSharpCode.ILSpy
foreach (var entry in category) {
MenuItem menuItem = new MenuItem();
menuItem.Command = CommandWrapper.Unwrap(entry.Value);
if (!string.IsNullOrEmpty(entry.Metadata.Header))
menuItem.Header = entry.Metadata.Header;
if (!string.IsNullOrEmpty(GetResourceString(entry.Metadata.Header)))
menuItem.Header = GetResourceString(entry.Metadata.Header);
if (!string.IsNullOrEmpty(entry.Metadata.MenuIcon)) {
menuItem.Icon = new Image {
Width = 16,
@ -176,7 +176,7 @@ namespace ICSharpCode.ILSpy @@ -176,7 +176,7 @@ namespace ICSharpCode.ILSpy
Source = Images.LoadImage(entry.Value, entry.Metadata.MenuIcon)
};
}
menuItem.IsEnabled = entry.Metadata.IsEnabled;
menuItem.InputGestureText = entry.Metadata.InputGestureText;
topLevelMenuItem.Items.Add(menuItem);
@ -184,8 +184,14 @@ namespace ICSharpCode.ILSpy @@ -184,8 +184,14 @@ namespace ICSharpCode.ILSpy
}
}
}
internal static string GetResourceString(string key)
{
var str = !string.IsNullOrEmpty(key)? Properties.Resources.ResourceManager.GetString(key):null;
return string.IsNullOrEmpty(key)|| string.IsNullOrEmpty(str) ? key : str;
}
#endregion
#region Message Hook
protected override void OnSourceInitialized(EventArgs e)
{
@ -503,11 +509,11 @@ namespace ICSharpCode.ILSpy @@ -503,11 +509,11 @@ namespace ICSharpCode.ILSpy
updateAvailableDownloadUrl = task.Result;
updatePanel.Visibility = displayMessage ? Visibility.Visible : Visibility.Collapsed;
if (task.Result != null) {
updatePanelMessage.Text = "A new ILSpy version is available.";
downloadOrCheckUpdateButton.Content = "Download";
updatePanelMessage.Text = Properties.Resources.ILSpyVersionAvailable;
downloadOrCheckUpdateButton.Content = Properties.Resources.Download;
} else {
updatePanelMessage.Text = "No update for ILSpy found.";
downloadOrCheckUpdateButton.Content = "Check again";
updatePanelMessage.Text = Properties.Resources.UpdateILSpyFound;
downloadOrCheckUpdateButton.Content = Properties.Resources.CheckAgain;
}
}
#endregion

14
ILSpy/NugetPackageBrowserDialog.xaml

@ -1,8 +1,12 @@ @@ -1,8 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="ICSharpCode.ILSpy.NugetPackageBrowserDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
x:Class="ICSharpCode.ILSpy.NugetPackageBrowserDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
xmlns:treeview="http://icsharpcode.net/sharpdevelop/treeview"
Title="Nuget Package Browser"
Title="{x:Static properties:Resources.NugetPackageBrowser}"
Style="{DynamicResource DialogWindow}"
WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip"
@ -20,7 +24,7 @@ @@ -20,7 +24,7 @@
<RowDefinition
Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Text="Select assemblies to open:" Margin="5" />
<TextBlock Text="{x:Static properties:Resources.SelectAssembliesOpen}" Margin="5" />
<ListBox ItemsSource="{Binding Package.Entries}" Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
@ -29,8 +33,8 @@ @@ -29,8 +33,8 @@
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Button IsDefault="True" Margin="2,0" IsEnabled="{Binding HasSelection}" Name="okButton" Click="OKButton_Click">Open</Button>
<Button IsCancel="True" Margin="2,0">Cancel</Button>
<Button IsDefault="True" Margin="2,0" IsEnabled="{Binding HasSelection}" Name="okButton" Click="OKButton_Click" Content="{x:Static properties:Resources.Open}"/>
<Button IsCancel="True" Margin="2,0" Content="{x:Static properties:Resources.Cancel}"/>
</StackPanel>
</Grid>
</Window>

24
ILSpy/OpenFromGacDialog.xaml

@ -1,7 +1,11 @@ @@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="ICSharpCode.ILSpy.OpenFromGacDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
Title="Open From GAC"
x:Class="ICSharpCode.ILSpy.OpenFromGacDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
Title="{x:Static properties:Resources.OpenFrom}"
Style="{DynamicResource DialogWindow}"
WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip"
@ -21,23 +25,23 @@ @@ -21,23 +25,23 @@
Height="Auto" />
</Grid.RowDefinitions>
<DockPanel>
<Label DockPanel.Dock="Left" Target="{Binding ElementName=filterTextBox}">_Search:</Label>
<Label DockPanel.Dock="Left" Target="{Binding ElementName=filterTextBox}" Content="{x:Static properties:Resources._Search}"/>
<TextBox Name="filterTextBox" TextChanged="FilterTextBox_TextChanged" />
</DockPanel>
<ListView Name="listView" Grid.Row="1" Margin="0, 8" controls:SortableGridViewColumn.SortMode="Automatic" SelectionChanged="ListView_SelectionChanged">
<ListView.View>
<GridView>
<controls:SortableGridViewColumn x:Name="nameColumn" Width="300" Header="Reference Name" DisplayMemberBinding="{Binding ShortName}" />
<controls:SortableGridViewColumn Width="75" Header="Version" DisplayMemberBinding="{Binding Version}" />
<controls:SortableGridViewColumn Width="65" Header="Culture" DisplayMemberBinding="{Binding Culture}" />
<controls:SortableGridViewColumn Width="115" Header="Public Key Token" DisplayMemberBinding="{Binding PublicKeyToken}" />
<controls:SortableGridViewColumn Width="1000" Header="Location" DisplayMemberBinding="{Binding FileName}" />
<controls:SortableGridViewColumn x:Name="nameColumn" Width="300" Header="{x:Static properties:Resources.ReferenceName}" DisplayMemberBinding="{Binding ShortName}" />
<controls:SortableGridViewColumn Width="75" Header="{x:Static properties:Resources.Version}" DisplayMemberBinding="{Binding Version}" />
<controls:SortableGridViewColumn Width="65" Header="{x:Static properties:Resources.Culture}" DisplayMemberBinding="{Binding Culture}" />
<controls:SortableGridViewColumn Width="115" Header="{x:Static properties:Resources.PublicToken}" DisplayMemberBinding="{Binding PublicKeyToken}" />
<controls:SortableGridViewColumn Width="1000" Header="{x:Static properties:Resources.Location}" DisplayMemberBinding="{Binding FileName}" />
</GridView>
</ListView.View>
</ListView>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click">_Open</Button>
<Button IsCancel="True" Margin="2,0">Cancel</Button>
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click" Content="{x:Static properties:Resources.OpenListDialog__Open}"/>
<Button IsCancel="True" Margin="2,0" Content="{x:Static properties:Resources.Cancel}"/>
</StackPanel>
<ProgressBar Grid.Row="1" Height="10" HorizontalAlignment="Stretch" Name="gacReadingProgressBar" VerticalAlignment="Bottom" Visibility="Hidden" />
</Grid>

22
ILSpy/OpenListDialog.xaml

@ -1,6 +1,10 @@ @@ -1,6 +1,10 @@
<Window
x:Class="ICSharpCode.ILSpy.OpenListDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
Title="Open List"
x:Class="ICSharpCode.ILSpy.OpenListDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
Title="{x:Static properties:Resources.OpenList}"
Style="{DynamicResource DialogWindow}"
WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip"
@ -16,26 +20,26 @@ @@ -16,26 +20,26 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel>
<Label>Select a list:</Label>
<Label Content="{x:Static properties:Resources.SelectList}"/>
</StackPanel>
<ListView Name="listView" Grid.Row="1" Margin="0, 8" controls:SortableGridViewColumn.SortMode="Automatic" SelectionChanged="ListView_SelectionChanged"
Loaded="listView_Loaded" SelectionMode="Single" MouseDoubleClick="listView_MouseDoubleClick">
<ListView.View>
<GridView>
<controls:SortableGridViewColumn x:Name="nameColumn" Header="Name" DisplayMemberBinding="{Binding .}" />
<controls:SortableGridViewColumn x:Name="nameColumn" Header="{x:Static properties:Resources.Name}" DisplayMemberBinding="{Binding .}" />
</GridView>
</ListView.View>
</ListView>
<DockPanel Grid.Row="2">
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right">
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click">_Open</Button>
<Button IsCancel="True" Margin="2,0">Cancel</Button>
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click" Content="{x:Static properties:Resources.OpenListDialog__Open}"/>
<Button IsCancel="True" Margin="2,0" Content="Cancel"/>
</StackPanel>
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal" HorizontalAlignment="Left">
<Button Margin="2,0" Click="CreateButton_Click">_Create</Button>
<Button Margin="2,0" IsEnabled="False" Name="deleteButton" Click="DeleteButton_Click">_Delete</Button>
<Button Margin="2,0" Click="ResetButton_Click">_Reset</Button>
<Button Margin="2,0" Click="CreateButton_Click" Content="{x:Static properties:Resources._Create}"/>
<Button Margin="2,0" IsEnabled="False" Name="deleteButton" Click="DeleteButton_Click" Content="{x:Static properties:Resources.OpenListDialog__Delete}"/>
<Button Margin="2,0" Click="ResetButton_Click" Content="{x:Static properties:Resources._Reset}"/>
</StackPanel>
</DockPanel>
</Grid>

3
ILSpy/Options/DecompilerSettingsPanel.xaml

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
xmlns:options="clr-namespace:ICSharpCode.ILSpy.Options">
<UserControl.Resources>
<CollectionViewSource x:Key="SettingsCollection" Source="{Binding Settings}">
@ -18,7 +19,7 @@ @@ -18,7 +19,7 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Margin="3" Grid.ColumnSpan="3" TextWrapping="Wrap" Text="The settings selected below are applied to the decompiler output in combination with the selection in the language drop-down. Selecting a lower language version in the drop-down will deactivate all selected options of the higher versions. Note that some settings implicitly depend on each other, e.g.: LINQ expressions cannot be introduced without first transforming static calls to extension method calls." />
<TextBlock Margin="3" Grid.ColumnSpan="3" TextWrapping="Wrap" Text="{x:Static properties:Resources.DecompilerSettingsPanelLongText}" />
<ListBox Grid.Row="1" ItemsSource="{Binding Source={StaticResource SettingsCollection}}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">

13
ILSpy/Options/DecompilerSettingsPanel.xaml.cs

@ -24,13 +24,14 @@ using System.Windows; @@ -24,13 +24,14 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Xml.Linq;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy.Options
{
/// <summary>
/// Interaction logic for DecompilerSettingsPanel.xaml
/// </summary>
[ExportOptionPage(Title = "Decompiler", Order = 10)]
[ExportOptionPage(Title = nameof(Properties.Resources.Decompiler), Order = 10)]
internal partial class DecompilerSettingsPanel : UserControl, IOptionPage
{
public DecompilerSettingsPanel()
@ -165,8 +166,8 @@ namespace ICSharpCode.ILSpy.Options @@ -165,8 +166,8 @@ namespace ICSharpCode.ILSpy.Options
public CSharpDecompilerSetting(PropertyInfo p)
{
this.Property = p;
this.Category = p.GetCustomAttribute<CategoryAttribute>()?.Category ?? "Other";
this.Description = p.GetCustomAttribute<DescriptionAttribute>()?.Description ?? p.Name;
this.Category = GetResourceString(p.GetCustomAttribute<CategoryAttribute>()?.Category ?? Resources.Other);
this.Description = GetResourceString(p.GetCustomAttribute<DescriptionAttribute>()?.Description ?? p.Name);
}
public PropertyInfo Property { get; }
@ -191,5 +192,11 @@ namespace ICSharpCode.ILSpy.Options @@ -191,5 +192,11 @@ namespace ICSharpCode.ILSpy.Options
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
static string GetResourceString(string key)
{
var str = !string.IsNullOrEmpty(key) ? Resources.ResourceManager.GetString(key) : null;
return string.IsNullOrEmpty(key) || string.IsNullOrEmpty(str) ? key : str;
}
}
}

35
ILSpy/Options/DisplaySettingsPanel.xaml

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
<UserControl x:Class="ICSharpCode.ILSpy.Options.DisplaySettingsPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Options">
<UserControl.Resources>
<local:FontSizeConverter x:Key="fontSizeConv" />
@ -11,7 +12,7 @@ @@ -11,7 +12,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<GroupBox Header="Font">
<GroupBox Header="{x:Static properties:Resources.Font}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@ -23,7 +24,7 @@ @@ -23,7 +24,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Label Margin="3,0">Font:</Label>
<Label Margin="3,0" Content="{x:Static properties:Resources.DisplaySettingsPanel_Font}"></Label>
<ComboBox x:Name="fontSelector" VerticalContentAlignment="Center" SelectedItem="{Binding SelectedFont}" Grid.Column="1">
<ComboBox.ItemTemplate>
<DataTemplate>
@ -31,7 +32,7 @@ @@ -31,7 +32,7 @@
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Label Grid.Column="2" Margin="3,0">Size:</Label>
<Label Grid.Column="2" Margin="3,0" Content="{x:Static properties:Resources.Size}"></Label>
<ComboBox Grid.Column="3" Text="{Binding SelectedFontSize, Converter={StaticResource fontSizeConv}}" IsEditable="True" Margin="3,0">
<ComboBoxItem>6</ComboBoxItem>
<ComboBoxItem>7</ComboBoxItem>
@ -58,30 +59,30 @@ @@ -58,30 +59,30 @@
</Border>
</Grid>
</GroupBox>
<GroupBox Header="Indentation" Grid.Row="1">
<GroupBox Header="{x:Static properties:Resources.Indentation}" Grid.Row="1">
<StackPanel Margin="3">
<CheckBox IsChecked="{Binding IndentationUseTabs}">Use tabs instead of spaces</CheckBox>
<CheckBox IsChecked="{Binding IndentationUseTabs}" Content="{x:Static properties:Resources.UseTabsInsteadOfSpaces}"></CheckBox>
<StackPanel Orientation="Horizontal">
<Label>Tab size:</Label>
<Label Content="{x:Static properties:Resources.TabSize}"></Label>
<TextBox x:Name="tabSizeTextBox" Width="50" Margin="3" Text="{Binding IndentationTabSize}" PreviewTextInput="TextBox_PreviewTextInput" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label>Indent size:</Label>
<Label Content="{x:Static properties:Resources.IndentSize}"></Label>
<TextBox x:Name="indentSizeTextBox" Width="50" Margin="3" Text="{Binding IndentationSize}" PreviewTextInput="TextBox_PreviewTextInput" />
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Header="Other options" Grid.Row="2">
<GroupBox Header="{x:Static properties:Resources.OtherOptions}" Grid.Row="2">
<StackPanel Margin="3">
<CheckBox IsChecked="{Binding ShowLineNumbers}">Show line numbers</CheckBox>
<CheckBox IsChecked="{Binding ShowMetadataTokens}">Show metadata tokens</CheckBox>
<CheckBox IsChecked="{Binding ShowMetadataTokensInBase10}">Show metadata tokens in base 10</CheckBox>
<CheckBox IsChecked="{Binding ShowDebugInfo}">Show info from debug symbols, if available</CheckBox>
<CheckBox IsChecked="{Binding EnableWordWrap}">Enable word wrap</CheckBox>
<CheckBox IsChecked="{Binding FoldBraces}">Enable folding on all blocks in braces</CheckBox>
<CheckBox IsChecked="{Binding SortResults}">Sort results by fitness</CheckBox>
<CheckBox IsChecked="{Binding ExpandMemberDefinitions}">Expand member definitions after decompilation</CheckBox>
<CheckBox IsChecked="{Binding ExpandUsingDeclarations}">Expand using declarations after decompilation</CheckBox>
<CheckBox IsChecked="{Binding ShowLineNumbers}" Content="{x:Static properties:Resources.ShowLineNumbers}"></CheckBox>
<CheckBox IsChecked="{Binding ShowMetadataTokens}" Content="{x:Static properties:Resources.ShowMetadataTokens}"></CheckBox>
<CheckBox IsChecked="{Binding ShowMetadataTokensInBase10}" Content="{x:Static properties:Resources.ShowMetadataTokensInBase10}"></CheckBox>
<CheckBox IsChecked="{Binding ShowDebugInfo}" Content="{x:Static properties:Resources.ShowInfoFromDebugSymbolsAvailable}"></CheckBox>
<CheckBox IsChecked="{Binding EnableWordWrap}" Content="{x:Static properties:Resources.EnableWordWrap}"></CheckBox>
<CheckBox IsChecked="{Binding FoldBraces}" Content="{x:Static properties:Resources.EnableFoldingBlocksBraces}"></CheckBox>
<CheckBox IsChecked="{Binding SortResults}" Content="{x:Static properties:Resources.SortResultsFitness}"></CheckBox>
<CheckBox IsChecked="{Binding ExpandMemberDefinitions}" Content="{x:Static properties:Resources.ExpandMemberDefinitionsAfterDecompilation}"></CheckBox>
<CheckBox IsChecked="{Binding ExpandUsingDeclarations}" Content="{x:Static properties:Resources.ExpandUsingDeclarationsAfterDecompilation}"></CheckBox>
</StackPanel>
</GroupBox>
</Grid>

2
ILSpy/Options/DisplaySettingsPanel.xaml.cs

@ -31,7 +31,7 @@ namespace ICSharpCode.ILSpy.Options @@ -31,7 +31,7 @@ namespace ICSharpCode.ILSpy.Options
/// <summary>
/// Interaction logic for DisplaySettingsPanel.xaml
/// </summary>
[ExportOptionPage(Title = "Display", Order = 20)]
[ExportOptionPage(Title = nameof(Properties.Resources.Display), Order = 20)]
public partial class DisplaySettingsPanel : UserControl, IOptionPage
{
public DisplaySettingsPanel()

5
ILSpy/Options/MiscSettingsPanel.xaml

@ -3,10 +3,11 @@ @@ -3,10 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<StackPanel Margin="10">
<CheckBox IsChecked="{Binding AllowMultipleInstances}">Allow multiple instances</CheckBox>
<CheckBox IsChecked="{Binding LoadPreviousAssemblies}">Load assemblies that were loaded in the last instance.</CheckBox>
<CheckBox IsChecked="{Binding AllowMultipleInstances}" Content="{x:Static properties:Resources.AllowMultipleInstances}"></CheckBox>
<CheckBox IsChecked="{Binding LoadPreviousAssemblies}" Content="{x:Static properties:Resources.LoadAssembliesThatWereLoadedInTheLastInstance}"></CheckBox>
</StackPanel>
</UserControl>

2
ILSpy/Options/MiscSettingsPanel.xaml.cs

@ -24,7 +24,7 @@ namespace ICSharpCode.ILSpy.Options @@ -24,7 +24,7 @@ namespace ICSharpCode.ILSpy.Options
/// <summary>
/// Interaction logic for MiscSettingsPanel.xaml
/// </summary>
[ExportOptionPage(Title = "Misc", Order = 30)]
[ExportOptionPage(Title =nameof(Properties.Resources.Misc), Order = 30)]
public partial class MiscSettingsPanel : UserControl, IOptionPage
{
public MiscSettingsPanel()

7
ILSpy/Options/OptionsDialog.xaml

@ -1,10 +1,11 @@ @@ -1,10 +1,11 @@
<Window x:Class="ICSharpCode.ILSpy.Options.OptionsDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
Style="{DynamicResource DialogWindow}"
WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip"
Title="Options" Height="500" Width="600">
Title="{x:Static properties:Resources.Options}" Height="500" Width="600">
<Grid>
<Grid.RowDefinitions>
<RowDefinition
@ -14,8 +15,8 @@ @@ -14,8 +15,8 @@
</Grid.RowDefinitions>
<TabControl Name="tabControl" />
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="12,8">
<Button IsDefault="True" Margin="2,0" Name="okButton" Click="OKButton_Click">OK</Button>
<Button IsCancel="True" Margin="2,0">Cancel</Button>
<Button IsDefault="True" Margin="2,0" Name="okButton" Click="OKButton_Click" Content="{x:Static properties:Resources.OK}"></Button>
<Button IsCancel="True" Margin="2,0" Content="{x:Static properties:Resources.Cancel}"></Button>
</StackPanel>
</Grid>
</Window>

5
ILSpy/Options/OptionsDialog.xaml.cs

@ -22,6 +22,7 @@ using System.Linq; @@ -22,6 +22,7 @@ using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Xml.Linq;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy.Options
{
@ -44,7 +45,7 @@ namespace ICSharpCode.ILSpy.Options @@ -44,7 +45,7 @@ namespace ICSharpCode.ILSpy.Options
ILSpySettings settings = ILSpySettings.Load();
foreach (var optionPage in optionPages.OrderBy(p => p.Metadata.Order)) {
TabItem tabItem = new TabItem();
tabItem.Header = optionPage.Metadata.Title;
tabItem.Header = MainWindow.GetResourceString( optionPage.Metadata.Title);
tabItem.Content = optionPage.Value;
tabControl.Items.Add(tabItem);
@ -93,7 +94,7 @@ namespace ICSharpCode.ILSpy.Options @@ -93,7 +94,7 @@ namespace ICSharpCode.ILSpy.Options
public int Order { get; set; }
}
[ExportMainMenuCommand(Menu = "_View", Header = "_Options...", MenuCategory = "Options", MenuOrder = 999)]
[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources._Options), MenuCategory = nameof(Resources.Options) ,MenuOrder = 999)]
sealed class ShowOptionsCommand : SimpleCommand
{
public override void Execute(object parameter)

1883
ILSpy/Properties/Resources.Designer.cs generated

File diff suppressed because it is too large Load Diff

729
ILSpy/Properties/Resources.resx

@ -0,0 +1,729 @@ @@ -0,0 +1,729 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Navigation" xml:space="preserve">
<value>Navigation</value>
</data>
<data name="Back" xml:space="preserve">
<value>Back</value>
</data>
<data name="Forward" xml:space="preserve">
<value>Forward</value>
</data>
<data name="_CheckUpdates" xml:space="preserve">
<value>_Check for Updates</value>
</data>
<data name="_Help" xml:space="preserve">
<value>_Help</value>
</data>
<data name="_File" xml:space="preserve">
<value>_File</value>
</data>
<data name="Open" xml:space="preserve">
<value>Open</value>
</data>
<data name="DEBUGDisassemble" xml:space="preserve">
<value>DEBUG -- Disassemble All</value>
</data>
<data name="E_xit" xml:space="preserve">
<value>E_xit</value>
</data>
<data name="Exit" xml:space="preserve">
<value>Exit</value>
</data>
<data name="Save" xml:space="preserve">
<value>Save</value>
</data>
<data name="_Open" xml:space="preserve">
<value>_Open...</value>
</data>
<data name="OpenFrom_GAC" xml:space="preserve">
<value>Open from _GAC...</value>
</data>
<data name="Open_List" xml:space="preserve">
<value>Open _List...</value>
</data>
<data name="ReloadAssemblies" xml:space="preserve">
<value>Reload all assemblies</value>
</data>
<data name="DEBUGDecompile" xml:space="preserve">
<value>DEBUG -- Decompile All</value>
</data>
<data name="DEBUGDecompile100x" xml:space="preserve">
<value>DEBUG -- Decompile 100x</value>
</data>
<data name="GeneratePortable" xml:space="preserve">
<value>Generate portable PDB</value>
</data>
<data name="RefreshCommand_ReloadAssemblies" xml:space="preserve">
<value>ReloadAssemblies</value>
</data>
<data name="_Reload" xml:space="preserve">
<value>_Reload</value>
</data>
<data name="_RemoveAssembliesWithLoadErrors" xml:space="preserve">
<value>_Remove Assemblies with load errors</value>
</data>
<data name="Remove" xml:space="preserve">
<value>Remove</value>
</data>
<data name="_SaveCode" xml:space="preserve">
<value>_Save Code...</value>
</data>
<data name="_ShowDebugSteps" xml:space="preserve">
<value>_Show debug steps</value>
</data>
<data name="_View" xml:space="preserve">
<value>_View</value>
</data>
<data name="SortAssembly_listName" xml:space="preserve">
<value>Sort assembly _list by name</value>
</data>
<data name="View" xml:space="preserve">
<value>View</value>
</data>
<data name="SortAssemblyListName" xml:space="preserve">
<value>Sort assembly list by name</value>
</data>
<data name="_CollapseTreeNodes" xml:space="preserve">
<value>_Collapse all tree nodes</value>
</data>
<data name="CollapseTreeNodes" xml:space="preserve">
<value>Collapse all tree nodes</value>
</data>
<data name="Name" xml:space="preserve">
<value>Name</value>
</data>
<data name="ValueString" xml:space="preserve">
<value>Value (as string)</value>
</data>
<data name="Type" xml:space="preserve">
<value>Type</value>
</data>
<data name="StringTable" xml:space="preserve">
<value>String Table</value>
</data>
<data name="Value" xml:space="preserve">
<value>Value</value>
</data>
<data name="VariableNamesFromDebugSymbolsAvailable" xml:space="preserve">
<value>Use variable names from debug symbols, if available</value>
</data>
<data name="ShowInfoFromDebugSymbolsAvailable" xml:space="preserve">
<value>Show info from debug symbols, if available</value>
</data>
<data name="ShowDocumentationDecompiledCode" xml:space="preserve">
<value>Show XML documentation in decompiled code</value>
</data>
<data name="EnableFoldingBlocksBraces" xml:space="preserve">
<value>Enable folding on all blocks in braces</value>
</data>
<data name="RemoveDeadSideEffectFreeCode" xml:space="preserve">
<value>Remove dead and side effect free code</value>
</data>
<data name="InsertUsingDeclarations" xml:space="preserve">
<value>Insert using declarations</value>
</data>
<data name="AlwaysBraces" xml:space="preserve">
<value>Always use braces</value>
</data>
<data name="ExpandMemberDefinitionsAfterDecompilation" xml:space="preserve">
<value>Expand member definitions after decompilation</value>
</data>
<data name="Font" xml:space="preserve">
<value>Font</value>
</data>
<data name="OtherOptions" xml:space="preserve">
<value>Other options</value>
</data>
<data name="ShowLineNumbers" xml:space="preserve">
<value>Show line numbers</value>
</data>
<data name="ShowMetadataTokens" xml:space="preserve">
<value>Show metadata tokens</value>
</data>
<data name="EnableWordWrap" xml:space="preserve">
<value>Enable word wrap</value>
</data>
<data name="SortResultsFitness" xml:space="preserve">
<value>Sort results by fitness</value>
</data>
<data name="AllowMultipleInstances" xml:space="preserve">
<value>Allow multiple instances</value>
</data>
<data name="Cancel" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="OK" xml:space="preserve">
<value>OK</value>
</data>
<data name="SearchPane_Search" xml:space="preserve">
<value>Search</value>
</data>
<data name="WatermarkText" xml:space="preserve">
<value>Search for t:TypeName, m:Member or c:Constant; use exact match (=term), 'should not contain' (-term) or 'must contain' (+term); use /reg(ular)?Ex(pressions)?/ or both - t:/Type(Name)?/...</value>
</data>
<data name="_SearchFor" xml:space="preserve">
<value>_Search for:</value>
</data>
<data name="Location" xml:space="preserve">
<value>Location</value>
</data>
<data name="Decompiling" xml:space="preserve">
<value>Decompiling...</value>
</data>
<data name="Copy" xml:space="preserve">
<value>Copy</value>
</data>
<data name="Editor" xml:space="preserve">
<value>Editor</value>
</data>
<data name="ToggleFolding" xml:space="preserve">
<value>Toggle All Folding</value>
</data>
<data name="Folding" xml:space="preserve">
<value>Folding</value>
</data>
<data name="ResourcesFileFilter" xml:space="preserve">
<value>Resources file (*.resources)|*.resources|Resource XML file|*.resx</value>
</data>
<data name="_Remove" xml:space="preserve">
<value>_Remove</value>
</data>
<data name="_LoadDependencies" xml:space="preserve">
<value>_Load Dependencies</value>
</data>
<data name="Dependencies" xml:space="preserve">
<value>Dependencies</value>
</data>
<data name="_AddMainList" xml:space="preserve">
<value>_Add To Main List</value>
</data>
<data name="_OpenContainingFolder" xml:space="preserve">
<value>_Open Containing Folder</value>
</data>
<data name="Shell" xml:space="preserve">
<value>Shell</value>
</data>
<data name="_OpenCommandLineHere" xml:space="preserve">
<value>_Open Command Line Here</value>
</data>
<data name="CopyName" xml:space="preserve">
<value>Copy FQ Name</value>
</data>
<data name="Loading" xml:space="preserve">
<value>Loading...</value>
</data>
<data name="CopyErrorMessage" xml:space="preserve">
<value>Copy error message</value>
</data>
<data name="DerivedTypes" xml:space="preserve">
<value>Derived Types</value>
</data>
<data name="References" xml:space="preserve">
<value>References</value>
</data>
<data name="_Resources" xml:space="preserve">
<value>Resources</value>
</data>
<data name="_About" xml:space="preserve">
<value>_About</value>
</data>
<data name="ILSpyVersion" xml:space="preserve">
<value>ILSpy version </value>
</data>
<data name="AutomaticallyCheckUpdatesEveryWeek" xml:space="preserve">
<value>Automatically check for updates every week</value>
</data>
<data name="CheckUpdates" xml:space="preserve">
<value>Check for updates</value>
</data>
<data name="Checking" xml:space="preserve">
<value>Checking...</value>
</data>
<data name="UsingLatestRelease" xml:space="preserve">
<value>You are using the latest release.</value>
</data>
<data name="VersionAvailable" xml:space="preserve">
<value>Version {0} is available.</value>
</data>
<data name="Download" xml:space="preserve">
<value>Download</value>
</data>
<data name="UsingNightlyBuildNewerThanLatestRelease" xml:space="preserve">
<value>You are using a nightly build newer than the latest release.</value>
</data>
<data name="Show_internalTypesMembers" xml:space="preserve">
<value>Show _internal types and members</value>
</data>
<data name="ShowInternalTypesMembers" xml:space="preserve">
<value>Show internal types and members</value>
</data>
<data name="StandBy" xml:space="preserve">
<value>Stand by...</value>
</data>
<data name="Status" xml:space="preserve">
<value>Status</value>
</data>
<data name="ILSpyVersionAvailable" xml:space="preserve">
<value>A new ILSpy version is available.</value>
</data>
<data name="UpdateILSpyFound" xml:space="preserve">
<value>No update for ILSpy found.</value>
</data>
<data name="CheckAgain" xml:space="preserve">
<value>Check again</value>
</data>
<data name="Searching" xml:space="preserve">
<value>Searching...</value>
</data>
<data name="SearchAbortedMoreThan1000ResultsFound" xml:space="preserve">
<value>Search aborted, more than 1000 results found.</value>
</data>
<data name="Search" xml:space="preserve">
<value>Search...</value>
</data>
<data name="DisplayCode" xml:space="preserve">
<value>Display Code</value>
</data>
<data name="SaveCode" xml:space="preserve">
<value>Save Code</value>
</data>
<data name="AllFiles" xml:space="preserve">
<value>|All Files|*.*</value>
</data>
<data name="OpenExplorer" xml:space="preserve">
<value>Open Explorer</value>
</data>
<data name="Select" xml:space="preserve">
<value>Select All</value>
</data>
<data name="_ToggleFolding" xml:space="preserve">
<value>Toggle Folding</value>
</data>
<data name="Analyze" xml:space="preserve">
<value>Analyze</value>
</data>
<data name="EnterListName" xml:space="preserve">
<value>Enter a list name:</value>
</data>
<data name="Create" xml:space="preserve">
<value>Create</value>
</data>
<data name="List" xml:space="preserve">
<value>New list</value>
</data>
<data name="SelectAssembliesOpen" xml:space="preserve">
<value>Select assemblies to open:</value>
</data>
<data name="NugetPackageBrowser" xml:space="preserve">
<value>Nuget Package Browser</value>
</data>
<data name="OpenFrom" xml:space="preserve">
<value>Open From GAC</value>
</data>
<data name="_Search" xml:space="preserve">
<value>_Search:</value>
</data>
<data name="ReferenceName" xml:space="preserve">
<value>Reference Name</value>
</data>
<data name="Version" xml:space="preserve">
<value>Version</value>
</data>
<data name="Culture" xml:space="preserve">
<value>Culture</value>
</data>
<data name="PublicToken" xml:space="preserve">
<value>Public Key Token</value>
</data>
<data name="OpenList" xml:space="preserve">
<value>Open List</value>
</data>
<data name="SelectList" xml:space="preserve">
<value>Select a list:</value>
</data>
<data name="_Create" xml:space="preserve">
<value>_Create</value>
</data>
<data name="OpenListDialog__Open" xml:space="preserve">
<value>_Open</value>
</data>
<data name="OpenListDialog__Delete" xml:space="preserve">
<value>_Delete</value>
</data>
<data name="_Reset" xml:space="preserve">
<value>_Reset</value>
</data>
<data name="Options" xml:space="preserve">
<value>Options</value>
</data>
<data name="_Options" xml:space="preserve">
<value>_Options...</value>
</data>
<data name="Display" xml:space="preserve">
<value>Display</value>
</data>
<data name="Decompiler" xml:space="preserve">
<value>Decompiler</value>
</data>
<data name="Misc" xml:space="preserve">
<value>Misc</value>
</data>
<data name="DisplaySettingsPanel_Font" xml:space="preserve">
<value>Font:</value>
</data>
<data name="Size" xml:space="preserve">
<value>Size:</value>
</data>
<data name="DebugSteps" xml:space="preserve">
<value>Debug Steps</value>
</data>
<data name="UseFieldSugar" xml:space="preserve">
<value>UseFieldSugar</value>
</data>
<data name="UseLogicOperationSugar" xml:space="preserve">
<value>UseLogicOperationSugar</value>
</data>
<data name="ShowILRanges" xml:space="preserve">
<value>ShowILRanges</value>
</data>
<data name="ShowChildIndexInBlock" xml:space="preserve">
<value>ShowChildIndexInBlock</value>
</data>
<data name="ShowStateBeforeThisStep" xml:space="preserve">
<value>Show state before this step</value>
</data>
<data name="ShowStateAfterThisStep" xml:space="preserve">
<value>Show state after this step</value>
</data>
<data name="DebugThisStep" xml:space="preserve">
<value>Debug this step</value>
</data>
<data name="WarningAsmMarkedRef" xml:space="preserve">
<value>Warning: This assembly is marked as 'reference assembly', which means that it only contains metadata and no executable code.</value>
</data>
<data name="WarningSomeAssemblyReference" xml:space="preserve">
<value>Warning: Some assembly references could not be resolved automatically. This might lead to incorrect decompilation of some parts,</value>
</data>
<data name="PropertyManuallyMissingReferencesListLoadedAssemblies" xml:space="preserve">
<value>for ex. property getter/setter access. To get optimal decompilation results, please manually add the missing references to the list of loaded assemblies.</value>
</data>
<data name="ShowAssemblyLoad" xml:space="preserve">
<value>Show assembly load log</value>
</data>
<data name="OtherResources" xml:space="preserve">
<value>Other Resources</value>
</data>
<data name="UseTabsInsteadOfSpaces" xml:space="preserve">
<value>Use tabs instead of spaces</value>
</data>
<data name="ShowMetadataTokensInBase10" xml:space="preserve">
<value>Show metadata tokens in base 10</value>
</data>
<data name="ExpandUsingDeclarationsAfterDecompilation" xml:space="preserve">
<value>Expand using declarations after decompilation</value>
</data>
<data name="LoadAssembliesThatWereLoadedInTheLastInstance" xml:space="preserve">
<value>Load assemblies that were loaded in the last instance.</value>
</data>
<data name="Indentation" xml:space="preserve">
<value>Indentation</value>
</data>
<data name="IndentSize" xml:space="preserve">
<value>Indent size:</value>
</data>
<data name="TabSize" xml:space="preserve">
<value>Tab size:</value>
</data>
<data name="SearchCtrlShiftFOrCtrlE" xml:space="preserve">
<value>Search (Ctrl+Shift+F or Ctrl+E)</value>
</data>
<data name="ShowAllTypesAndMembers" xml:space="preserve">
<value>Show all types and members</value>
</data>
<data name="Other" xml:space="preserve">
<value>Other</value>
</data>
<data name="Show_allTypesAndMembers" xml:space="preserve">
<value>Show _all types and members</value>
</data>
<data name="DecompilerSettingsPanelLongText" xml:space="preserve">
<value>The settings selected below are applied to the decompiler output in combination with the selection in the language drop-down. Selecting a lower language version in the drop-down will deactivate all selected options of the higher versions. Note that some settings implicitly depend on each other, e.g.: LINQ expressions cannot be introduced without first transforming static calls to extension method calls.</value>
</data>
<data name="DecompilerSettings.DecompileEnumeratorsYieldReturn" xml:space="preserve">
<value>Decompile enumerators (yield return)</value>
</data>
<data name="DecompilerSettings.DecompileAnonymousMethodsLambdas" xml:space="preserve">
<value>Decompile anonymous methods/lambdas</value>
</data>
<data name="DecompilerSettings.DecompileAnonymousTypes" xml:space="preserve">
<value>Decompile anonymous types</value>
</data>
<data name="DecompilerSettings.UseLambdaSyntaxIfPossible" xml:space="preserve">
<value>Use lambda syntax, if possible</value>
</data>
<data name="DecompilerSettings.DecompileExpressionTrees" xml:space="preserve">
<value>Decompile expression trees</value>
</data>
<data name="DecompilerSettings.DecompileUseOfTheDynamicType" xml:space="preserve">
<value>Decompile use of the 'dynamic' type</value>
</data>
<data name="DecompilerSettings.DecompileAsyncMethods" xml:space="preserve">
<value>Decompile async methods</value>
</data>
<data name="DecompilerSettings.DecompileAwaitInCatchFinallyBlocks" xml:space="preserve">
<value>Decompile await in catch/finally blocks</value>
</data>
<data name="DecompilerSettings.DecompileDecimalConstantAsSimpleLiteralValues" xml:space="preserve">
<value>Decompile [DecimalConstant(...)] as simple literal values</value>
</data>
<data name="DecompilerSettings.DecompileC10PublicUnsafeFixedIntArr10Members" xml:space="preserve">
<value>Decompile C# 1.0 'public unsafe fixed int arr[10];' members</value>
</data>
<data name="DecompilerSettings.UseLiftedOperatorsForNullables" xml:space="preserve">
<value>Use lifted operators for nullables</value>
</data>
<data name="DecompilerSettings.DecompileAndOperators" xml:space="preserve">
<value>Decompile ?. and ?[] operators</value>
</data>
<data name="DecompilerSettings.DecompileAutomaticProperties" xml:space="preserve">
<value>Decompile automatic properties</value>
</data>
<data name="DecompilerSettings.DecompileAutomaticEvents" xml:space="preserve">
<value>Decompile automatic events</value>
</data>
<data name="DecompilerSettings.DetectUsingStatements" xml:space="preserve">
<value>Detect using statements</value>
</data>
<data name="DecompilerSettings.Other" xml:space="preserve">
<value>Other</value>
</data>
<data name="DecompilerSettings.AlwaysUseBraces" xml:space="preserve">
<value>Always use braces</value>
</data>
<data name="DecompilerSettings.DetectForeachStatements" xml:space="preserve">
<value>Detect foreach statements</value>
</data>
<data name="DecompilerSettings.DetectLockStatements" xml:space="preserve">
<value>Detect lock statements</value>
</data>
<data name="DecompilerSettings.DetectSwitchOnString" xml:space="preserve">
<value>Detect switch on string</value>
</data>
<data name="DecompilerSettings.InsertUsingDeclarations" xml:space="preserve">
<value>Insert using declarations</value>
</data>
<data name="DecompilerSettings.UseExtensionMethodSyntax" xml:space="preserve">
<value>Use extension method syntax</value>
</data>
<data name="DecompilerSettings.UseLINQExpressionSyntax" xml:space="preserve">
<value>Use LINQ expression syntax</value>
</data>
<data name="DecompilerSettings.UseImplicitMethodGroupConversions" xml:space="preserve">
<value>Use implicit method group conversions</value>
</data>
<data name="DecompilerSettings.AlwaysCastTargetsOfExplicitInterfaceImplementationCalls" xml:space="preserve">
<value>Always cast targets of explicit interface implementation calls</value>
</data>
<data name="DecompilerSettings.UseVariableNamesFromDebugSymbolsIfAvailable" xml:space="preserve">
<value>Use variable names from debug symbols, if available</value>
</data>
<data name="DecompilerSettings.ArrayInitializerExpressions" xml:space="preserve">
<value>Array initializer expressions</value>
</data>
<data name="DecompilerSettings.ObjectCollectionInitializerExpressions" xml:space="preserve">
<value>Object/collection initializer expressions</value>
</data>
<data name="DecompilerSettings.DictionaryInitializerExpressions" xml:space="preserve">
<value>Dictionary initializer expressions</value>
</data>
<data name="DecompilerSettings.AllowExtensionAddMethodsInCollectionInitializerExpressions" xml:space="preserve">
<value>Allow extension 'Add' methods in collection initializer expressions</value>
</data>
<data name="DecompilerSettings.UseStringInterpolation" xml:space="preserve">
<value>Use string interpolation</value>
</data>
<data name="DecompilerSettings.IncludeXMLDocumentationCommentsInTheDecompiledCode" xml:space="preserve">
<value>Include XML documentation comments in the decompiled code</value>
</data>
<data name="DecompilerSettings.UseExpressionBodiedMemberSyntaxForGetOnlyProperties" xml:space="preserve">
<value>Use expression-bodied member syntax for get-only properties</value>
</data>
<data name="DecompilerSettings.UseOutVariableDeclarations" xml:space="preserve">
<value>Use out variable declarations</value>
</data>
<data name="DecompilerSettings.UseDiscards" xml:space="preserve">
<value>Use discards</value>
</data>
<data name="DecompilerSettings.IsByRefLikeAttributeShouldBeReplacedWithRefModifiersOnStructs" xml:space="preserve">
<value>IsByRefLikeAttribute should be replaced with 'ref' modifiers on structs</value>
</data>
<data name="DecompilerSettings.IsReadOnlyAttributeShouldBeReplacedWithReadonlyInModifiersOnStructsParameters" xml:space="preserve">
<value>IsReadOnlyAttribute should be replaced with 'readonly'/'in' modifiers on structs/parameters</value>
</data>
<data name="DecompilerSettings.IsUnmanagedAttributeOnTypeParametersShouldBeReplacedWithUnmanagedConstraints" xml:space="preserve">
<value>IsUnmanagedAttribute on type parameters should be replaced with 'unmanaged' constraints</value>
</data>
<data name="DecompilerSettings.UseStackallocInitializerSyntax" xml:space="preserve">
<value>Use stackalloc initializer syntax</value>
</data>
<data name="DecompilerSettings.UseTupleTypeSyntax" xml:space="preserve">
<value>Use tuple type syntax</value>
</data>
<data name="DecompilerSettings.UseImplicitConversionsBetweenTupleTypes" xml:space="preserve">
<value>Use implicit conversions between tuple types</value>
</data>
<data name="DecompilerSettings.DetectTupleComparisons" xml:space="preserve">
<value>Detect tuple comparisons</value>
</data>
<data name="DecompilerSettings.UseNamedArguments" xml:space="preserve">
<value>Use named arguments</value>
</data>
<data name="DecompilerSettings.UseNonTrailingNamedArguments" xml:space="preserve">
<value>Use non-trailing named arguments</value>
</data>
<data name="DecompilerSettings.RemoveOptionalArgumentsIfPossible" xml:space="preserve">
<value>Remove optional arguments, if possible</value>
</data>
<data name="DecompilerSettings.IntroduceLocalFunctionsNOTIMPLEMENTED" xml:space="preserve">
<value>Introduce local functions (NOT IMPLEMENTED!)</value>
</data>
<data name="DecompilerSettings.NullableReferenceTypes" xml:space="preserve">
<value>Nullable reference types</value>
</data>
<data name="DecompilerSettings.ShowInfoFromDebugSymbolsIfAvailable" xml:space="preserve">
<value>Show info from debug symbols, if available</value>
</data>
<data name="DecompilerSettings.VBSpecificOptions" xml:space="preserve">
<value>VB-specific options</value>
</data>
<data name="DecompilerSettings.FSpecificOptions" xml:space="preserve">
<value>F#-specific options</value>
</data>
<data name="DecompilerSettings.RemoveDeadAndSideEffectFreeCodeUseWithCaution" xml:space="preserve">
<value>Remove dead and side effect free code (use with caution!)</value>
</data>
<data name="DecompilerSettings.ApplyWindowsRuntimeProjectionsOnLoadedAssemblies" xml:space="preserve">
<value>Apply Windows Runtime projections on loaded assemblies</value>
</data>
<data name="SearchMSDN" xml:space="preserve">
<value>Search MSDN...</value>
</data>
</root>

732
ILSpy/Properties/Resources.zh-Hans.resx

@ -0,0 +1,732 @@ @@ -0,0 +1,732 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Navigation" xml:space="preserve">
<value>导航</value>
</data>
<data name="Back" xml:space="preserve">
<value>后退</value>
</data>
<data name="Forward" xml:space="preserve">
<value>前进</value>
</data>
<data name="_CheckUpdates" xml:space="preserve">
<value>检查更新(_C)</value>
</data>
<data name="_Help" xml:space="preserve">
<value>帮助(_H)</value>
</data>
<data name="_File" xml:space="preserve">
<value>文件(_F)</value>
</data>
<data name="Open" xml:space="preserve">
<value>打开</value>
</data>
<data name="DEBUGDisassemble" xml:space="preserve">
<value>DEBUG -- 反编译全部</value>
</data>
<data name="E_xit" xml:space="preserve">
<value>退出(_X)</value>
</data>
<data name="Exit" xml:space="preserve">
<value>退出</value>
</data>
<data name="Save" xml:space="preserve">
<value>保存</value>
</data>
<data name="_Open" xml:space="preserve">
<value>打开(_O)...</value>
</data>
<data name="OpenFrom_GAC" xml:space="preserve">
<value>从_GAC中打开......</value>
</data>
<data name="Open_List" xml:space="preserve">
<value>打开列表(_L)</value>
</data>
<data name="ReloadAssemblies" xml:space="preserve">
<value>重新加载全部程序集</value>
</data>
<data name="DEBUGDecompile" xml:space="preserve">
<value>DEBUG - 全部反编译</value>
</data>
<data name="DEBUGDecompile100x" xml:space="preserve">
<value>DEBUG - 反编译100x</value>
</data>
<data name="GeneratePortable" xml:space="preserve">
<value>生成可携带PDB</value>
</data>
<data name="RefreshCommand_ReloadAssemblies" xml:space="preserve">
<value>重新加载程序集</value>
</data>
<data name="_Reload" xml:space="preserve">
<value>重新加载(_R)</value>
</data>
<data name="_RemoveAssembliesWithLoadErrors" xml:space="preserve">
<value>移除程序集及其加载错误(_R)</value>
</data>
<data name="Remove" xml:space="preserve">
<value>移除</value>
</data>
<data name="_SaveCode" xml:space="preserve">
<value>保存代码(_S)</value>
</data>
<data name="_ShowDebugSteps" xml:space="preserve">
<value>显示调试步骤(_S)</value>
</data>
<data name="_View" xml:space="preserve">
<value>视图(_V)</value>
</data>
<data name="SortAssembly_listName" xml:space="preserve">
<value>按名称排列程序集列表(_L)</value>
</data>
<data name="View" xml:space="preserve">
<value>视图</value>
</data>
<data name="SortAssemblyListName" xml:space="preserve">
<value>按名称排列程序集列表</value>
</data>
<data name="_CollapseTreeNodes" xml:space="preserve">
<value>折叠所有树节点(_C)</value>
</data>
<data name="CollapseTreeNodes" xml:space="preserve">
<value>折叠所有树节点</value>
</data>
<data name="Name" xml:space="preserve">
<value>名称</value>
</data>
<data name="ValueString" xml:space="preserve">
<value>值(为字符串)</value>
</data>
<data name="Type" xml:space="preserve">
<value>类型</value>
</data>
<data name="StringTable" xml:space="preserve">
<value>字符串表</value>
</data>
<data name="Value" xml:space="preserve">
<value>值</value>
</data>
<data name="_Resources" xml:space="preserve">
<value>资源</value>
</data>
<data name="Download" xml:space="preserve">
<value>下载</value>
</data>
<data name="Checking" xml:space="preserve">
<value>检查...</value>
</data>
<data name="CheckUpdates" xml:space="preserve">
<value>检查更新</value>
</data>
<data name="_About" xml:space="preserve">
<value>关于(_A)</value>
</data>
<data name="Loading" xml:space="preserve">
<value>加载中...</value>
</data>
<data name="References" xml:space="preserve">
<value>引用</value>
</data>
<data name="ILSpyVersion" xml:space="preserve">
<value>ILSpy版本</value>
</data>
<data name="Decompiling" xml:space="preserve">
<value>正在反编译...</value>
</data>
<data name="Copy" xml:space="preserve">
<value>复制</value>
</data>
<data name="Editor" xml:space="preserve">
<value>编辑器</value>
</data>
<data name="Location" xml:space="preserve">
<value>位置</value>
</data>
<data name="_SearchFor" xml:space="preserve">
<value>搜索(_S):</value>
</data>
<data name="_Remove" xml:space="preserve">
<value>移除(_R)</value>
</data>
<data name="_LoadDependencies" xml:space="preserve">
<value>加载依赖(_L)</value>
</data>
<data name="Dependencies" xml:space="preserve">
<value>依赖(_L)</value>
</data>
<data name="OK" xml:space="preserve">
<value>确定</value>
</data>
<data name="SearchPane_Search" xml:space="preserve">
<value>搜索</value>
</data>
<data name="Status" xml:space="preserve">
<value>状态</value>
</data>
<data name="Font" xml:space="preserve">
<value>字体</value>
</data>
<data name="OtherOptions" xml:space="preserve">
<value>其他选项</value>
</data>
<data name="ShowLineNumbers" xml:space="preserve">
<value>显示行号</value>
</data>
<data name="Cancel" xml:space="preserve">
<value>取消</value>
</data>
<data name="Folding" xml:space="preserve">
<value>折叠</value>
</data>
<data name="_AddMainList" xml:space="preserve">
<value>添加到主列表(_A)</value>
</data>
<data name="_OpenContainingFolder" xml:space="preserve">
<value>打开包含文件夹(_O)</value>
</data>
<data name="Shell" xml:space="preserve">
<value>Shell</value>
</data>
<data name="_OpenCommandLineHere" xml:space="preserve">
<value>在这里打开命令行(_O)</value>
</data>
<data name="CopyName" xml:space="preserve">
<value>复制FQ名称</value>
</data>
<data name="CopyErrorMessage" xml:space="preserve">
<value>复制错误信息</value>
</data>
<data name="VariableNamesFromDebugSymbolsAvailable" xml:space="preserve">
<value>使用调试符号中的变量名称 (如果可用)</value>
</data>
<data name="ShowInfoFromDebugSymbolsAvailable" xml:space="preserve">
<value>显示调试符号的信息 (如果可用)</value>
</data>
<data name="ShowDocumentationDecompiledCode" xml:space="preserve">
<value>在反编译代码中显示 XML 文档</value>
</data>
<data name="EnableFoldingBlocksBraces" xml:space="preserve">
<value>在大括号中的所有块上启用折叠</value>
</data>
<data name="RemoveDeadSideEffectFreeCode" xml:space="preserve">
<value>删除死亡和副作用免费代码</value>
</data>
<data name="InsertUsingDeclarations" xml:space="preserve">
<value>插入使用声明</value>
</data>
<data name="AlwaysBraces" xml:space="preserve">
<value>始终使用大括号</value>
</data>
<data name="ExpandMemberDefinitionsAfterDecompilation" xml:space="preserve">
<value>在反编译后展开成员定义</value>
</data>
<data name="ShowMetadataTokens" xml:space="preserve">
<value>显示元数据标记</value>
</data>
<data name="EnableWordWrap" xml:space="preserve">
<value>启用自动换行</value>
</data>
<data name="AllowMultipleInstances" xml:space="preserve">
<value>允许多个实例</value>
</data>
<data name="ToggleFolding" xml:space="preserve">
<value>切换所有折叠</value>
</data>
<data name="DerivedTypes" xml:space="preserve">
<value>派生类型</value>
</data>
<data name="ResourcesFileFilter" xml:space="preserve">
<value>资源文件 (*.resources)|*.resources|XML资源文件|*.resx </value>
</data>
<data name="SortResultsFitness" xml:space="preserve">
<value>排序结果自适应</value>
</data>
<data name="_Reset" xml:space="preserve">
<value>重置(_R)</value>
</data>
<data name="OpenListDialog__Delete" xml:space="preserve">
<value>删除(_D)</value>
</data>
<data name="OpenListDialog__Open" xml:space="preserve">
<value>打开(_O)</value>
</data>
<data name="_Create" xml:space="preserve">
<value>创建(_C)</value>
</data>
<data name="ReferenceName" xml:space="preserve">
<value>引用名称</value>
</data>
<data name="Version" xml:space="preserve">
<value>版本</value>
</data>
<data name="Culture" xml:space="preserve">
<value>区域</value>
</data>
<data name="PublicToken" xml:space="preserve">
<value>公钥标记</value>
</data>
<data name="OpenList" xml:space="preserve">
<value>打开列表</value>
</data>
<data name="SelectList" xml:space="preserve">
<value>选择一个列表:</value>
</data>
<data name="_Search" xml:space="preserve">
<value>搜索(_S):</value>
</data>
<data name="OpenFrom" xml:space="preserve">
<value>从 GAC 打开</value>
</data>
<data name="NugetPackageBrowser" xml:space="preserve">
<value>Nuget 包浏览器</value>
</data>
<data name="List" xml:space="preserve">
<value>新建列表</value>
</data>
<data name="SelectAssembliesOpen" xml:space="preserve">
<value>选择要打开的程序集:</value>
</data>
<data name="Create" xml:space="preserve">
<value>创建</value>
</data>
<data name="EnterListName" xml:space="preserve">
<value>输入列表名称:</value>
</data>
<data name="Analyze" xml:space="preserve">
<value>分析</value>
</data>
<data name="_ToggleFolding" xml:space="preserve">
<value>切换折叠</value>
</data>
<data name="Select" xml:space="preserve">
<value>全部选择</value>
</data>
<data name="OpenExplorer" xml:space="preserve">
<value>打开资源管理器</value>
</data>
<data name="AllFiles" xml:space="preserve">
<value>|所有文件 |*.*</value>
</data>
<data name="SaveCode" xml:space="preserve">
<value>保存代码</value>
</data>
<data name="DisplayCode" xml:space="preserve">
<value>显示代码</value>
</data>
<data name="Search" xml:space="preserve">
<value>搜索...</value>
</data>
<data name="SearchAbortedMoreThan1000ResultsFound" xml:space="preserve">
<value>搜索已中止, 发现超过1000个结果。</value>
</data>
<data name="Searching" xml:space="preserve">
<value>搜索...</value>
</data>
<data name="CheckAgain" xml:space="preserve">
<value>再次检查</value>
</data>
<data name="UpdateILSpyFound" xml:space="preserve">
<value>找不到 ILSpy 的更新。</value>
</data>
<data name="ILSpyVersionAvailable" xml:space="preserve">
<value>有新的 ILSpy 版本已经可用。</value>
</data>
<data name="StandBy" xml:space="preserve">
<value>就绪...</value>
</data>
<data name="ShowInternalTypesMembers" xml:space="preserve">
<value>显示内部类型和成员</value>
</data>
<data name="Show_internalTypesMembers" xml:space="preserve">
<value>显示内部类型和成员(_I)</value>
</data>
<data name="UsingNightlyBuildNewerThanLatestRelease" xml:space="preserve">
<value>您使用的是每日构建版本,比最新版本更新。</value>
</data>
<data name="VersionAvailable" xml:space="preserve">
<value>版本 {0} 已可用。</value>
</data>
<data name="UsingLatestRelease" xml:space="preserve">
<value>您使用的是最新版本。</value>
</data>
<data name="AutomaticallyCheckUpdatesEveryWeek" xml:space="preserve">
<value>每周自动检查更新</value>
</data>
<data name="WatermarkText" xml:space="preserve">
<value>搜索 t:TypeName, m:Member 或c:Constant; 使用完全匹配 (=term), '不应包含' (-term) 或 '必须包含' (+term); 使用 /reg(ular)?Ex(pressions)?/或两者 - t:/Type(Name)?/... </value>
</data>
<data name="Options" xml:space="preserve">
<value>选项</value>
</data>
<data name="_Options" xml:space="preserve">
<value>选项(_O)...</value>
</data>
<data name="Display" xml:space="preserve">
<value>显示</value>
</data>
<data name="Decompiler" xml:space="preserve">
<value>反编译器</value>
</data>
<data name="Misc" xml:space="preserve">
<value>杂项</value>
</data>
<data name="DisplaySettingsPanel_Font" xml:space="preserve">
<value>字体:</value>
</data>
<data name="Size" xml:space="preserve">
<value>大小:</value>
</data>
<data name="DebugSteps" xml:space="preserve">
<value>调试步骤</value>
</data>
<data name="UseFieldSugar" xml:space="preserve">
<value>UseFieldSugar</value>
</data>
<data name="UseLogicOperationSugar" xml:space="preserve">
<value>UseLogicOperationSugar</value>
</data>
<data name="ShowILRanges" xml:space="preserve">
<value>ShowILRanges</value>
</data>
<data name="ShowChildIndexInBlock" xml:space="preserve">
<value>ShowChildIndexInBlock</value>
</data>
<data name="ShowStateBeforeThisStep" xml:space="preserve">
<value>在此步骤之前显示状态</value>
</data>
<data name="ShowStateAfterThisStep" xml:space="preserve">
<value>在此步骤之后显示状态</value>
</data>
<data name="DebugThisStep" xml:space="preserve">
<value>调试此步骤</value>
</data>
<data name="WarningAsmMarkedRef" xml:space="preserve">
<value>警告: 此程序集被标记为 "引用程序集", 这意味着它只包含元数据, 没有可执行代码。</value>
</data>
<data name="WarningSomeAssemblyReference" xml:space="preserve">
<value>警告: 某些程序集引用无法自动解析。这可能会导致某些部分反编译错误,</value>
</data>
<data name="PropertyManuallyMissingReferencesListLoadedAssemblies" xml:space="preserve">
<value>比如属性getter/setter 访问。要获得最佳反编译结果, 请手动将缺少的引用添加到加载的程序集列表中。</value>
</data>
<data name="ShowAssemblyLoad" xml:space="preserve">
<value>显示程序集加载日志</value>
</data>
<data name="OtherResources" xml:space="preserve">
<value>其他资源</value>
</data>
<data name="UseTabsInsteadOfSpaces" xml:space="preserve">
<value>使用Tab替代空格</value>
</data>
<data name="ShowMetadataTokensInBase10" xml:space="preserve">
<value>在基数10中显示元数据标记</value>
</data>
<data name="ExpandUsingDeclarationsAfterDecompilation" xml:space="preserve">
<value>反编译后展开引用和声明</value>
</data>
<data name="LoadAssembliesThatWereLoadedInTheLastInstance" xml:space="preserve">
<value>加载在最后一个实例中加载的程序集。</value>
</data>
<data name="Indentation" xml:space="preserve">
<value>缩进</value>
</data>
<data name="IndentSize" xml:space="preserve">
<value>缩进长度:</value>
</data>
<data name="TabSize" xml:space="preserve">
<value>Tab长度:</value>
</data>
<data name="SearchCtrlShiftFOrCtrlE" xml:space="preserve">
<value>搜索 (Ctrl + Shift + F 或 Ctrl + E)</value>
</data>
<data name="ShowAllTypesAndMembers" xml:space="preserve">
<value>显示所有类型和成员</value>
</data>
<data name="Other" xml:space="preserve">
<value>其他</value>
</data>
<data name="Show_allTypesAndMembers" xml:space="preserve">
<value>显示所有类型和成员(_A)</value>
</data>
<data name="DecompilerSettingsPanelLongText" xml:space="preserve">
<value>下面选择的设置将与语言下拉列表中的选择一起应用于反编译程序输出。在下拉列表中选择较低的语言版本将停用较高版本的所有选定选项。请注意, 某些设置隐式依赖于彼此, 例如: 如果不首先将静态调用转换为扩展方法调用, 则无法引入 LINQ 表达式。</value>
</data>
<data name="DecompilerSettings.DecompileEnumeratorsYieldReturn" xml:space="preserve">
<value>反编译枚举器 (yield return)</value>
</data>
<data name="DecompilerSettings.DecompileAnonymousMethodsLambdas" xml:space="preserve">
<value>反编译匿名方法或lambdas</value>
</data>
<data name="DecompilerSettings.DecompileAnonymousTypes" xml:space="preserve">
<value>反编译匿名类型</value>
</data>
<data name="DecompilerSettings.UseLambdaSyntaxIfPossible" xml:space="preserve">
<value>如果可能, 请使用 lambda 语法</value>
</data>
<data name="DecompilerSettings.DecompileExpressionTrees" xml:space="preserve">
<value>反编译表达树</value>
</data>
<data name="DecompilerSettings.DecompileUseOfTheDynamicType" xml:space="preserve">
<value>反编译使用"dynamic" 类型</value>
</data>
<data name="DecompilerSettings.DecompileAsyncMethods" xml:space="preserve">
<value>反编译异步方法</value>
</data>
<data name="DecompilerSettings.DecompileAwaitInCatchFinallyBlocks" xml:space="preserve">
<value>反编译catch/finally内的await</value>
</data>
<data name="DecompilerSettings.DecompileDecimalConstantAsSimpleLiteralValues" xml:space="preserve">
<value>反编译 [DecimalConstant(...)] 作为简单的文本值</value>
</data>
<data name="DecompilerSettings.DecompileC10PublicUnsafeFixedIntArr10Members" xml:space="preserve">
<value>反编译 C# 1.0 "public unsafe fixed int arr[10];" 成员</value>
</data>
<data name="DecompilerSettings.UseLiftedOperatorsForNullables" xml:space="preserve">
<value>对空变量使用提升运算符</value>
</data>
<data name="DecompilerSettings.DecompileAndOperators" xml:space="preserve">
<value>反编译 ?. 和 ?[] 运算符</value>
</data>
<data name="DecompilerSettings.DecompileAutomaticProperties" xml:space="preserve">
<value>反编译自动属性</value>
</data>
<data name="DecompilerSettings.DecompileAutomaticEvents" xml:space="preserve">
<value>反编译自动事件</value>
</data>
<data name="DecompilerSettings.DetectUsingStatements" xml:space="preserve">
<value>检测using语句</value>
</data>
<data name="DecompilerSettings.Other" xml:space="preserve">
<value>其他</value>
</data>
<data name="DecompilerSettings.AlwaysUseBraces" xml:space="preserve">
<value>始终使用大括号</value>
</data>
<data name="DecompilerSettings.DetectForeachStatements" xml:space="preserve">
<value>检测 foreach语句</value>
</data>
<data name="DecompilerSettings.DetectLockStatements" xml:space="preserve">
<value>检测 lock语句</value>
</data>
<data name="DecompilerSettings.DetectSwitchOnString" xml:space="preserve">
<value>检测switch 的字符串</value>
</data>
<data name="DecompilerSettings.InsertUsingDeclarations" xml:space="preserve">
<value>插入using声明</value>
</data>
<data name="DecompilerSettings.UseExtensionMethodSyntax" xml:space="preserve">
<value>使用扩展方法语法</value>
</data>
<data name="DecompilerSettings.UseLINQExpressionSyntax" xml:space="preserve">
<value>使用 LINQ 表达式语法</value>
</data>
<data name="DecompilerSettings.UseImplicitMethodGroupConversions" xml:space="preserve">
<value>使用隐式方法组转换</value>
</data>
<data name="DecompilerSettings.AlwaysCastTargetsOfExplicitInterfaceImplementationCalls" xml:space="preserve">
<value>始终强制转换显式接口实现调用的目标</value>
</data>
<data name="DecompilerSettings.UseVariableNamesFromDebugSymbolsIfAvailable" xml:space="preserve">
<value>使用调试符号中的变量名 (如果可用)</value>
</data>
<data name="DecompilerSettings.ArrayInitializerExpressions" xml:space="preserve">
<value>数组初始化器表达式</value>
</data>
<data name="DecompilerSettings.ObjectCollectionInitializerExpressions" xml:space="preserve">
<value>对象或集合初始化器表达式</value>
</data>
<data name="DecompilerSettings.DictionaryInitializerExpressions" xml:space="preserve">
<value>Dictionary初始值设定项表达式</value>
</data>
<data name="DecompilerSettings.AllowExtensionAddMethodsInCollectionInitializerExpressions" xml:space="preserve">
<value>在集合初始化器表达式中允许扩展 "添加" 方法</value>
</data>
<data name="DecompilerSettings.UseStringInterpolation" xml:space="preserve">
<value>使用字符串插值</value>
</data>
<data name="DecompilerSettings.IncludeXMLDocumentationCommentsInTheDecompiledCode" xml:space="preserve">
<value>在反编译代码中包括 XML 文档注释</value>
</data>
<data name="DecompilerSettings.UseExpressionBodiedMemberSyntaxForGetOnlyProperties" xml:space="preserve">
<value>对仅获取属性使用表达式内部成员语法</value>
</data>
<data name="DecompilerSettings.UseOutVariableDeclarations" xml:space="preserve">
<value>使用外部变量声明</value>
</data>
<data name="DecompilerSettings.UseDiscards" xml:space="preserve">
<value>使用丢弃物</value>
</data>
<data name="DecompilerSettings.IsByRefLikeAttributeShouldBeReplacedWithRefModifiersOnStructs" xml:space="preserve">
<value>IsByRefLikeAttribute应替换为结构上的 "ref" 修饰符</value>
</data>
<data name="DecompilerSettings.IsReadOnlyAttributeShouldBeReplacedWithReadonlyInModifiersOnStructsParameters" xml:space="preserve">
<value>IsReadOnlyAttribute 应替为结构参数上的 "readonly"/"中的修饰符</value>
</data>
<data name="DecompilerSettings.IsUnmanagedAttributeOnTypeParametersShouldBeReplacedWithUnmanagedConstraints" xml:space="preserve">
<value>类型参数上的IsUnmanagedAttribute 应替换为 "非托管" 约束</value>
</data>
<data name="DecompilerSettings.UseStackallocInitializerSyntax" xml:space="preserve">
<value>使用stackalloc 初始化器语法</value>
</data>
<data name="DecompilerSettings.UseTupleTypeSyntax" xml:space="preserve">
<value>使用元组类型语法</value>
</data>
<data name="DecompilerSettings.UseImplicitConversionsBetweenTupleTypes" xml:space="preserve">
<value>在元组类型之间使用隐式转换</value>
</data>
<data name="DecompilerSettings.DetectTupleComparisons" xml:space="preserve">
<value>检测元组比较</value>
</data>
<data name="DecompilerSettings.UseNamedArguments" xml:space="preserve">
<value>使用命名参数</value>
</data>
<data name="DecompilerSettings.UseNonTrailingNamedArguments" xml:space="preserve">
<value>使用非尾随命名参数</value>
</data>
<data name="DecompilerSettings.RemoveOptionalArgumentsIfPossible" xml:space="preserve">
<value>如果可能, 删除可选参数</value>
</data>
<data name="DecompilerSettings.IntroduceLocalFunctionsNOTIMPLEMENTED" xml:space="preserve">
<value>引入本地功能 (未实现!)</value>
</data>
<data name="DecompilerSettings.C70LocalFunctionsAreNotImplemented" xml:space="preserve">
<value>C# 7.0 本地函数未实现!</value>
</data>
<data name="DecompilerSettings.NullableReferenceTypes" xml:space="preserve">
<value>可空引用类型</value>
</data>
<data name="DecompilerSettings.ShowInfoFromDebugSymbolsIfAvailable" xml:space="preserve">
<value>显示调试符号中的信息 (如果可用)</value>
</data>
<data name="DecompilerSettings.VBSpecificOptions" xml:space="preserve">
<value>Vb 特定选项</value>
</data>
<data name="DecompilerSettings.FSpecificOptions" xml:space="preserve">
<value>F # 特定选项</value>
</data>
<data name="DecompilerSettings.RemoveDeadAndSideEffectFreeCodeUseWithCaution" xml:space="preserve">
<value>删除死的和副作用免费的代码 (请谨慎使用)</value>
</data>
<data name="DecompilerSettings.ApplyWindowsRuntimeProjectionsOnLoadedAssemblies" xml:space="preserve">
<value>在已加载的程序集上应用 Windows 运行时投影</value>
</data>
<data name="SearchMSDN" xml:space="preserve">
<value>搜索MSDN...</value>
</data>
</root>

8
ILSpy/Search/SearchPane.cs

@ -112,7 +112,7 @@ namespace ICSharpCode.ILSpy @@ -112,7 +112,7 @@ namespace ICSharpCode.ILSpy
public void Show()
{
if (!IsVisible) {
MainWindow.Instance.ShowInTopPane("Search", this);
MainWindow.Instance.ShowInTopPane(Properties.Resources.SearchPane_Search, this);
if (runSearchOnNextShow) {
runSearchOnNextShow = false;
StartSearch(this.SearchTerm);
@ -207,7 +207,7 @@ namespace ICSharpCode.ILSpy @@ -207,7 +207,7 @@ namespace ICSharpCode.ILSpy
}
if (resultsAdded > 0 && Results.Count == MAX_RESULTS) {
Results.Add(new SearchResult { Name = "Search aborted, more than 1000 results found." });
Results.Add(new SearchResult { Name = Properties.Resources.SearchAbortedMoreThan1000ResultsFound });
currentSearch.Cancel();
}
}
@ -398,8 +398,8 @@ namespace ICSharpCode.ILSpy @@ -398,8 +398,8 @@ namespace ICSharpCode.ILSpy
}
}
[ExportMainMenuCommand(Menu = "_View", Header = "Search...", MenuIcon = "Images/Find.png", MenuCategory = "View", MenuOrder = 100)]
[ExportToolbarCommand(ToolTip = "Search (Ctrl+Shift+F or Ctrl+E)", ToolbarIcon = "Images/Find.png", ToolbarCategory = "View", ToolbarOrder = 100)]
[ExportMainMenuCommand(Menu = nameof(Properties.Resources._View), Header =nameof(Properties.Resources.Search), MenuIcon = "Images/Find.png", MenuCategory = nameof(Properties.Resources.View), MenuOrder = 100)]
[ExportToolbarCommand(ToolTip = nameof(Properties.Resources.SearchCtrlShiftFOrCtrlE), ToolbarIcon = "Images/Find.png", ToolbarCategory = nameof(Properties.Resources.View), ToolbarOrder = 100)]
sealed class ShowSearchCommand : CommandWrapper
{
public ShowSearchCommand()

11
ILSpy/Search/SearchPane.xaml

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Name="self" mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
@ -18,10 +19,10 @@ @@ -18,10 +19,10 @@
</Grid.ColumnDefinitions>
<controls:SearchBox x:Name="searchBox" DockPanel.Dock="Top" Grid.Column="0" Grid.Row="0" Margin="1"
PreviewKeyDown="SearchBox_PreviewKeyDown"
Text="{Binding SearchTerm, ElementName=self}" ToolTip="Search" UpdateDelay="0:0:0.1"
WatermarkColor="Gray" WatermarkText="Search for t:TypeName, m:Member or c:Constant; use exact match (=term), 'should not contain' (-term) or 'must contain' (+term); use /reg(ular)?Ex(pressions)?/ or both - t:/Type(Name)?/..." />
Text="{Binding SearchTerm, ElementName=self}" ToolTip="{x:Static properties:Resources.SearchPane_Search}" UpdateDelay="0:0:0.1"
WatermarkColor="Gray" WatermarkText="{x:Static properties:Resources.WatermarkText}" />
<StackPanel Grid.Column="1" Grid.Row="0" Orientation="Horizontal">
<Label Margin="0,-1" Target="searchModeComboBox">_Search for:</Label>
<Label Margin="0,-1" Target="searchModeComboBox" Content="{x:Static properties:Resources._SearchFor}"/>
<ComboBox Width="100" Name="searchModeComboBox" Margin="1"
TextSearch.TextPath="Name"
SelectionChanged="SearchModeComboBox_SelectionChanged">
@ -44,7 +45,7 @@ @@ -44,7 +45,7 @@
ItemsSource="{Binding Results, ElementName=self}">
<ListView.View>
<GridView AllowsColumnReorder="False">
<controls:SortableGridViewColumn Header="Name" SortBy="Name">
<controls:SortableGridViewColumn Header="{x:Static properties:Resources.Name}" SortBy="Name">
<controls:SortableGridViewColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
@ -54,7 +55,7 @@ @@ -54,7 +55,7 @@
</DataTemplate>
</controls:SortableGridViewColumn.CellTemplate>
</controls:SortableGridViewColumn>
<controls:SortableGridViewColumn Header="Location" SortBy="Location">
<controls:SortableGridViewColumn Header="{x:Static properties:Resources.Location}" SortBy="Location">
<controls:SortableGridViewColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">

8
ILSpy/TextView/DecompilerTextView.cs

@ -559,7 +559,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -559,7 +559,7 @@ namespace ICSharpCode.ILSpy.TextView
output.WriteLine();
if (wasNormalLimit) {
output.AddButton(
Images.ViewCode, "Display Code",
Images.ViewCode, Properties.Resources.DisplayCode,
delegate {
DoDecompile(context, ExtendedOutputLengthLimit).HandleExceptions();
});
@ -567,7 +567,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -567,7 +567,7 @@ namespace ICSharpCode.ILSpy.TextView
}
output.AddButton(
Images.Save, "Save Code",
Images.Save, Properties.Resources.SaveCode,
delegate {
SaveToDisk(context.Language, context.TreeNodes, context.Options);
});
@ -669,7 +669,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -669,7 +669,7 @@ namespace ICSharpCode.ILSpy.TextView
SaveFileDialog dlg = new SaveFileDialog();
dlg.DefaultExt = language.FileExtension;
dlg.Filter = language.Name + "|*" + language.FileExtension + "|All Files|*.*";
dlg.Filter = language.Name + "|*" + language.FileExtension + Properties.Resources.AllFiles;
dlg.FileName = CleanUpName(treeNodes.First().ToString()) + language.FileExtension;
if (dlg.ShowDialog() == true) {
SaveToDisk(new DecompilationContext(language, treeNodes.ToArray(), options), dlg.FileName);
@ -725,7 +725,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -725,7 +725,7 @@ namespace ICSharpCode.ILSpy.TextView
AvalonEditTextOutput output = new AvalonEditTextOutput();
output.WriteLine("Decompilation complete in " + stopwatch.Elapsed.TotalSeconds.ToString("F1") + " seconds.");
output.WriteLine();
output.AddButton(null, "Open Explorer", delegate { Process.Start("explorer", "/select,\"" + fileName + "\""); });
output.AddButton(null, Properties.Resources.OpenExplorer, delegate { Process.Start("explorer", "/select,\"" + fileName + "\""); });
output.WriteLine();
tcs.SetResult(output);
} catch (OperationCanceledException) {

5
ILSpy/TextView/DecompilerTextView.xaml

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
<UserControl x:Class="ICSharpCode.ILSpy.TextView.DecompilerTextView" x:ClassModifier="public" x:Name="self"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
xmlns:ae="clr-namespace:ICSharpCode.AvalonEdit;assembly=ICSharpCode.AvalonEdit">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="boolToVisibility" />
@ -18,9 +19,9 @@ @@ -18,9 +19,9 @@
</ae:TextEditor>
<Border Name="waitAdorner" Background="#C0FFFFFF" Visibility="Collapsed">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock FontSize="14pt">Decompiling...</TextBlock>
<TextBlock FontSize="14pt" Text="{x:Static properties:Resources.Decompiling}"/>
<ProgressBar Name="progressBar" Height="16" Margin="0, 4" />
<Button Click="cancelButton_Click" HorizontalAlignment="Center">Cancel</Button>
<Button Click="cancelButton_Click" HorizontalAlignment="Center" Content="{x:Static properties:Resources.Cancel}"/>
</StackPanel>
</Border>
</Grid>

6
ILSpy/TextView/EditorCommands.cs

@ -16,9 +16,11 @@ @@ -16,9 +16,11 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy.TextView
{
[ExportContextMenuEntry(Header = "Copy", Category = "Editor")]
[ExportContextMenuEntry(Header = nameof(Resources.Copy), Category = nameof(Resources.Editor))]
sealed class CopyContextMenuEntry : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)
@ -37,7 +39,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -37,7 +39,7 @@ namespace ICSharpCode.ILSpy.TextView
}
}
[ExportContextMenuEntry(Header = "Select All", Category = "Editor")]
[ExportContextMenuEntry(Header = nameof(Resources.Select), Category = nameof(Resources.Editor))]
sealed class SelectAllContextMenuEntry : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)

5
ILSpy/TextView/FoldingCommands.cs

@ -20,10 +20,11 @@ using System.Linq; @@ -20,10 +20,11 @@ using System.Linq;
using ICSharpCode.AvalonEdit;
using ICSharpCode.AvalonEdit.Folding;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy.TextView
{
[ExportContextMenuEntryAttribute(Header = "Toggle All Folding", Category = "Folding")]
[ExportContextMenuEntryAttribute(Header = nameof(Resources.ToggleFolding), Category = nameof(Resources.Folding))]
internal sealed class ToggleAllContextMenuEntry : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)
@ -56,7 +57,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -56,7 +57,7 @@ namespace ICSharpCode.ILSpy.TextView
}
}
[ExportContextMenuEntryAttribute(Header = "Toggle Folding", Category = "Folding")]
[ExportContextMenuEntryAttribute(Header = nameof(Resources._ToggleFolding), Category = nameof(Resources.Folding))]
internal sealed class ToggleContextMenuEntry : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)

13
ILSpy/TreeNodes/AssemblyTreeNode.cs

@ -31,6 +31,7 @@ using ICSharpCode.TreeView; @@ -31,6 +31,7 @@ using ICSharpCode.TreeView;
using Microsoft.Win32;
using ICSharpCode.Decompiler.TypeSystem;
using TypeDefinitionHandle = System.Reflection.Metadata.TypeDefinitionHandle;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy.TreeNodes
{
@ -314,7 +315,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -314,7 +315,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
}
[ExportContextMenuEntry(Header = "_Remove", Icon = "images/Delete.png")]
[ExportContextMenuEntry(Header = nameof(Resources._Remove), Icon = "images/Delete.png")]
sealed class RemoveAssembly : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)
@ -339,7 +340,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -339,7 +340,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
}
[ExportContextMenuEntry(Header = "_Reload", Icon = "images/Refresh.png")]
[ExportContextMenuEntry(Header = nameof(Resources._Reload), Icon = "images/Refresh.png")]
sealed class ReloadAssembly : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)
@ -371,7 +372,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -371,7 +372,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
}
[ExportContextMenuEntry(Header = "_Load Dependencies", Category = "Dependencies")]
[ExportContextMenuEntry(Header = nameof(Resources._LoadDependencies), Category = nameof(Resources.Dependencies))]
sealed class LoadDependencies : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)
@ -404,7 +405,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -404,7 +405,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
}
[ExportContextMenuEntry(Header = "_Add To Main List", Category = "Dependencies")]
[ExportContextMenuEntry(Header = nameof(Resources._AddMainList), Category = nameof(Resources.Dependencies))]
sealed class AddToMainList : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)
@ -436,7 +437,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -436,7 +437,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
}
[ExportContextMenuEntry(Header = "_Open Containing Folder", Category = "Shell")]
[ExportContextMenuEntry(Header = nameof(Resources._OpenContainingFolder), Category = nameof(Resources.Shell))]
sealed class OpenContainingFolder : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)
@ -485,7 +486,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -485,7 +486,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
}
[ExportContextMenuEntry(Header = "_Open Command Line Here", Category = "Shell")]
[ExportContextMenuEntry(Header = nameof(Resources._OpenCommandLineHere), Category = nameof(Resources.Shell))]
sealed class OpenCmdHere : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)

3
ILSpy/TreeNodes/CopyFullyQualifiedNameContextMenuEntry.cs

@ -3,10 +3,11 @@ using System.Windows; @@ -3,10 +3,11 @@ using System.Windows;
using ICSharpCode.Decompiler;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy.TreeNodes
{
[ExportContextMenuEntry(Header = "Copy FQ Name", Icon = "images/Copy.png", Order = 9999)]
[ExportContextMenuEntry(Header = nameof(Resources.CopyName), Icon = "images/Copy.png", Order = 9999)]
public class CopyFullyQualifiedNameContextMenuEntry : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)

4
ILSpy/TreeNodes/DerivedTypesTreeNode.cs

@ -22,7 +22,7 @@ using System.Threading; @@ -22,7 +22,7 @@ using System.Threading;
using ICSharpCode.Decompiler;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.Properties;
using SRM = System.Reflection.Metadata;
namespace ICSharpCode.ILSpy.TreeNodes
@ -44,7 +44,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -44,7 +44,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
this.threading = new ThreadingSupport();
}
public override object Text => "Derived Types";
public override object Text => Resources.DerivedTypes;
public override object Icon => Images.SubTypes;

3
ILSpy/TreeNodes/ReferenceFolderTreeNode.cs

@ -22,6 +22,7 @@ using SRM = System.Reflection.Metadata; @@ -22,6 +22,7 @@ using SRM = System.Reflection.Metadata;
using System.Windows.Threading;
using ICSharpCode.Decompiler;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy.TreeNodes
{
@ -41,7 +42,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -41,7 +42,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
public override object Text {
get { return "References"; }
get { return Resources.References; }
}
public override object Icon {

3
ILSpy/TreeNodes/ResourceListTreeNode.cs

@ -21,6 +21,7 @@ using System.Linq; @@ -21,6 +21,7 @@ using System.Linq;
using System.Windows.Threading;
using ICSharpCode.Decompiler;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy.TreeNodes
{
@ -38,7 +39,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -38,7 +39,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
public override object Text {
get { return "Resources"; }
get { return Resources._Resources; }
}
public override object Icon {

3
ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs

@ -22,6 +22,7 @@ using System.IO; @@ -22,6 +22,7 @@ using System.IO;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.TextView;
namespace ICSharpCode.ILSpy.TreeNodes
@ -89,7 +90,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -89,7 +90,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
output.AddUIElement(() => new Image { Source = image });
output.WriteLine();
output.AddButton(Images.Save, "Save", delegate {
output.AddButton(Images.Save, Resources.Save, delegate {
Save(null);
});
textView.ShowNode(output, this);

3
ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs

@ -22,6 +22,7 @@ using System.IO; @@ -22,6 +22,7 @@ using System.IO;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.TextView;
namespace ICSharpCode.ILSpy.TreeNodes
@ -73,7 +74,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -73,7 +74,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
AddIcon(output, frame);
output.WriteLine();
}
output.AddButton(Images.Save, "Save", delegate {
output.AddButton(Images.Save, Resources.Save, delegate {
Save(null);
});
textView.ShowNode(output, this);

3
ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs

@ -22,6 +22,7 @@ using System.IO; @@ -22,6 +22,7 @@ using System.IO;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.TextView;
namespace ICSharpCode.ILSpy.TreeNodes
@ -80,7 +81,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -80,7 +81,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
image.EndInit();
output.AddUIElement(() => new Image { Source = image });
output.WriteLine();
output.AddButton(Images.Save, "Save", delegate {
output.AddButton(Images.Save, Resources.Save, delegate {
Save(null);
});
textView.ShowNode(output, this);

3
ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs

@ -24,6 +24,7 @@ using ICSharpCode.AvalonEdit.Highlighting; @@ -24,6 +24,7 @@ using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Utils;
using ICSharpCode.Decompiler;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.TextView;
using Microsoft.Win32;
@ -72,7 +73,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -72,7 +73,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
ISmartTextOutput smartOutput = output as ISmartTextOutput;
if (smartOutput != null) {
smartOutput.AddButton(Images.Save, "Save", delegate { Save(null); });
smartOutput.AddButton(Images.Save, Resources.Save, delegate { Save(null); });
output.WriteLine();
}
}

3
ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs

@ -28,6 +28,7 @@ using ICSharpCode.Decompiler.Metadata; @@ -28,6 +28,7 @@ using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.ILSpy.Controls;
using ICSharpCode.ILSpy.TextView;
using Microsoft.Win32;
using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy.TreeNodes
{
@ -110,7 +111,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -110,7 +111,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
if (s == null) return false;
SaveFileDialog dlg = new SaveFileDialog();
dlg.FileName = DecompilerTextView.CleanUpName(Resource.Name);
dlg.Filter = "Resources file (*.resources)|*.resources|Resource XML file|*.resx";
dlg.Filter = Resources.ResourcesFileFilter;
if (dlg.ShowDialog() == true) {
s.Position = 0;
switch (dlg.FilterIndex) {

10
ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs

@ -18,13 +18,15 @@ @@ -18,13 +18,15 @@
using System.Linq;
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.Properties;
using System.Threading;
namespace ICSharpCode.ILSpy.TreeNodes
{
[ExportContextMenuEntry(Header = "Search MSDN...", Icon = "images/SearchMsdn.png", Order = 9999)]
[ExportContextMenuEntry(Header = nameof(Resources.SearchMSDN), Icon = "images/SearchMsdn.png", Order = 9999)]
internal sealed class SearchMsdnContextMenuEntry : IContextMenuEntry
{
private static string msdnAddress = "http://msdn.microsoft.com/en-us/library/{0}";
private static string msdnAddress = "http://msdn.microsoft.com/{1}/library/{0}";
public bool IsVisible(TextViewContext context)
{
@ -98,7 +100,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -98,7 +100,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
var namespaceNode = node as NamespaceTreeNode;
if (namespaceNode != null)
address = string.Format(msdnAddress, namespaceNode.Name);
address = string.Format(msdnAddress, namespaceNode.Name, Thread.CurrentThread.CurrentUICulture.Name);
if (node is IMemberTreeNode memberNode) {
var member = memberNode.Member;
@ -109,7 +111,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -109,7 +111,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
else
memberName = string.Format("{0}.{1}", member.DeclaringType.FullName, member.Name);
address = string.Format(msdnAddress, memberName);
address = string.Format(msdnAddress, memberName, Thread.CurrentThread.CurrentUICulture.Name);
}
address = address.ToLower();

5
ILSpy/TreeNodes/ThreadingSupport.cs

@ -26,6 +26,7 @@ using System.Windows; @@ -26,6 +26,7 @@ using System.Windows;
using System.Windows.Threading;
using ICSharpCode.Decompiler;
using ICSharpCode.ILSpy.Analyzers;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.TreeView;
namespace ICSharpCode.ILSpy.TreeNodes
@ -119,7 +120,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -119,7 +120,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
sealed class LoadingTreeNode : ILSpyTreeNode
{
public override object Text {
get { return "Loading..."; }
get { return Resources.Loading; }
}
public override FilterResult Filter(FilterSettings settings)
@ -155,7 +156,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -155,7 +156,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
}
[ExportContextMenuEntry(Header = "Copy error message")]
[ExportContextMenuEntry(Header = nameof(Resources.CopyErrorMessage))]
sealed class CopyErrorMessageContextMenu : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)

Loading…
Cancel
Save