Browse Source

Translated the ICSharpCode.Decompiler‘s options and other

pull/1299/head
MysticBoy 6 years ago
parent
commit
04686b2ada
  1. 119
      ICSharpCode.Decompiler/DecompilerSettings.cs
  2. 13
      ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj
  3. 540
      ICSharpCode.Decompiler/Properties/Resources.Designer.cs
  4. 279
      ICSharpCode.Decompiler/Properties/Resources.resx
  5. 279
      ICSharpCode.Decompiler/Properties/Resources.zh-Hans.resx
  6. 4
      ILSpy.sln
  7. 4
      ILSpy/MainWindow.xaml
  8. 3
      ILSpy/Options/DecompilerSettingsPanel.xaml
  9. 13
      ILSpy/Options/DecompilerSettingsPanel.xaml.cs
  10. 8
      ILSpy/Options/DisplaySettingsPanel.xaml
  11. 63
      ILSpy/Properties/Resources.Designer.cs
  12. 21
      ILSpy/Properties/Resources.resx
  13. 39
      ILSpy/Properties/Resources.zh-Hans.resx
  14. 8
      ILSpy/Search/SearchPane.cs

119
ICSharpCode.Decompiler/DecompilerSettings.cs

@ -20,6 +20,7 @@ using System; @@ -20,6 +20,7 @@ using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using ICSharpCode.Decompiler.CSharp.OutputVisitor;
using ICSharpCode.Decompiler.Properties;
namespace ICSharpCode.Decompiler
{
@ -139,7 +140,7 @@ namespace ICSharpCode.Decompiler @@ -139,7 +140,7 @@ namespace ICSharpCode.Decompiler
/// Decompile anonymous methods/lambdas.
/// </summary>
[Category("C# 2.0 / VS 2005")]
[Description("Decompile anonymous methods/lambdas")]
[Description(nameof(Resources.DecompileAnonymousMethodsLambdas))]
public bool AnonymousMethods {
get { return anonymousMethods; }
set {
@ -156,7 +157,7 @@ namespace ICSharpCode.Decompiler @@ -156,7 +157,7 @@ namespace ICSharpCode.Decompiler
/// Decompile anonymous types.
/// </summary>
[Category("C# 3.0 / VS 2008")]
[Description("Decompile anonymous types")]
[Description(nameof(Resources.DecompileAnonymousTypes))]
public bool AnonymousTypes {
get { return anonymousTypes; }
set {
@ -173,7 +174,7 @@ namespace ICSharpCode.Decompiler @@ -173,7 +174,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(nameof(Resources.UseLambdaSyntaxIfPossible))]
public bool UseLambdaSyntax {
get { return useLambdaSyntax; }
set {
@ -190,7 +191,7 @@ namespace ICSharpCode.Decompiler @@ -190,7 +191,7 @@ namespace ICSharpCode.Decompiler
/// Decompile expression trees.
/// </summary>
[Category("C# 3.0 / VS 2008")]
[Description("Decompile expression trees")]
[Description(nameof(Resources.DecompileExpressionTrees))]
public bool ExpressionTrees {
get { return expressionTrees; }
set {
@ -207,7 +208,7 @@ namespace ICSharpCode.Decompiler @@ -207,7 +208,7 @@ namespace ICSharpCode.Decompiler
/// Decompile enumerators.
/// </summary>
[Category("C# 2.0 / VS 2005")]
[Description("Decompile enumerators (yield return)")]
[Description(nameof(Resources.DecompileEnumeratorsYieldReturn))]
public bool YieldReturn {
get { return yieldReturn; }
set {
@ -224,7 +225,7 @@ namespace ICSharpCode.Decompiler @@ -224,7 +225,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(nameof(Resources.DecompileUseOfTheDynamicType))]
public bool Dynamic {
get { return dynamic; }
set {
@ -241,7 +242,7 @@ namespace ICSharpCode.Decompiler @@ -241,7 +242,7 @@ namespace ICSharpCode.Decompiler
/// Decompile async methods.
/// </summary>
[Category("C# 5.0 / VS 2012")]
[Description("Decompile async methods")]
[Description(nameof(Resources.DecompileAsyncMethods))]
public bool AsyncAwait {
get { return asyncAwait; }
set {
@ -259,7 +260,7 @@ namespace ICSharpCode.Decompiler @@ -259,7 +260,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(nameof(Resources.DecompileAwaitInCatchFinallyBlocks))]
public bool AwaitInCatchFinally {
get { return awaitInCatchFinally; }
set {
@ -276,7 +277,7 @@ namespace ICSharpCode.Decompiler @@ -276,7 +277,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(nameof(Resources.DecompileDecimalConstantAsSimpleLiteralValues))]
public bool DecimalConstants {
get { return decimalConstants; }
set {
@ -293,7 +294,7 @@ namespace ICSharpCode.Decompiler @@ -293,7 +294,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(nameof(Resources.DecompileC10PublicUnsafeFixedIntArr10Members))]
public bool FixedBuffers {
get { return fixedBuffers; }
set {
@ -310,7 +311,7 @@ namespace ICSharpCode.Decompiler @@ -310,7 +311,7 @@ namespace ICSharpCode.Decompiler
/// Use lifted operators for nullables.
/// </summary>
[Category("C# 2.0 / VS 2005")]
[Description("Use lifted operators for nullables")]
[Description(nameof(Resources.UseLiftedOperatorsForNullables))]
public bool LiftNullables {
get { return liftNullables; }
set {
@ -327,7 +328,7 @@ namespace ICSharpCode.Decompiler @@ -327,7 +328,7 @@ namespace ICSharpCode.Decompiler
/// Decompile C# 6 ?. and ?[] operators.
/// </summary>
[Category("C# 6.0 / VS 2015")]
[Description("Decompile ?. and ?[] operators")]
[Description(nameof(Resources.DecompileAndOperators))]
public bool NullPropagation {
get { return nullPropagation; }
set {
@ -344,7 +345,7 @@ namespace ICSharpCode.Decompiler @@ -344,7 +345,7 @@ namespace ICSharpCode.Decompiler
/// Decompile automatic properties
/// </summary>
[Category("C# 3.0 / VS 2008")]
[Description("Decompile automatic properties")]
[Description(nameof(Resources.DecompileAutomaticProperties))]
public bool AutomaticProperties {
get { return automaticProperties; }
set {
@ -361,7 +362,7 @@ namespace ICSharpCode.Decompiler @@ -361,7 +362,7 @@ namespace ICSharpCode.Decompiler
/// Decompile automatic events
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Decompile automatic events")]
[Description(nameof(Resources.DecompileAutomaticEvents))]
public bool AutomaticEvents {
get { return automaticEvents; }
set {
@ -378,7 +379,7 @@ namespace ICSharpCode.Decompiler @@ -378,7 +379,7 @@ namespace ICSharpCode.Decompiler
/// Decompile using statements.
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Detect using statements")]
[Description(nameof(Resources.DetectUsingStatements))]
public bool UsingStatement {
get { return usingStatement; }
set {
@ -394,8 +395,8 @@ namespace ICSharpCode.Decompiler @@ -394,8 +395,8 @@ namespace ICSharpCode.Decompiler
/// <summary>
/// Gets/Sets whether to use braces for single-statement-blocks.
/// </summary>
[Category("Other")]
[Description("Always use braces")]
[Category(nameof(Resources.Other))]
[Description(nameof(Resources.AlwaysUseBraces))]
public bool AlwaysUseBraces {
get { return alwaysUseBraces; }
set {
@ -412,7 +413,7 @@ namespace ICSharpCode.Decompiler @@ -412,7 +413,7 @@ namespace ICSharpCode.Decompiler
/// Decompile foreach statements.
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Detect foreach statements")]
[Description(nameof(Resources.DetectForeachStatements))]
public bool ForEachStatement {
get { return forEachStatement; }
set {
@ -429,7 +430,7 @@ namespace ICSharpCode.Decompiler @@ -429,7 +430,7 @@ namespace ICSharpCode.Decompiler
/// Decompile lock statements.
/// </summary>
[Category("C# 1.0 / VS .NET")]
[Description("Detect lock statements")]
[Description(nameof(Resources.DetectLockStatements))]
public bool LockStatement {
get { return lockStatement; }
set {
@ -443,7 +444,7 @@ namespace ICSharpCode.Decompiler @@ -443,7 +444,7 @@ namespace ICSharpCode.Decompiler
bool switchStatementOnString = true;
[Category("C# 1.0 / VS .NET")]
[Description("Detect switch on string")]
[Description(nameof(Resources.DetectSwitchOnString))]
public bool SwitchStatementOnString {
get { return switchStatementOnString; }
set {
@ -457,7 +458,7 @@ namespace ICSharpCode.Decompiler @@ -457,7 +458,7 @@ namespace ICSharpCode.Decompiler
bool usingDeclarations = true;
[Category("C# 1.0 / VS .NET")]
[Description("Insert using declarations")]
[Description(nameof(Resources.InsertUsingDeclarations))]
public bool UsingDeclarations {
get { return usingDeclarations; }
set {
@ -471,7 +472,7 @@ namespace ICSharpCode.Decompiler @@ -471,7 +472,7 @@ namespace ICSharpCode.Decompiler
bool extensionMethods = true;
[Category("C# 3.0 / VS 2008")]
[Description("Use extension method syntax")]
[Description(nameof(Resources.UseExtensionMethodSyntax))]
public bool ExtensionMethods {
get { return extensionMethods; }
set {
@ -485,7 +486,7 @@ namespace ICSharpCode.Decompiler @@ -485,7 +486,7 @@ namespace ICSharpCode.Decompiler
bool queryExpressions = true;
[Category("C# 3.0 / VS 2008")]
[Description("Use LINQ expression syntax")]
[Description(nameof(Resources.UseLINQExpressionSyntax))]
public bool QueryExpressions {
get { return queryExpressions; }
set {
@ -504,7 +505,7 @@ namespace ICSharpCode.Decompiler @@ -504,7 +505,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(nameof(Resources.UseImplicitMethodGroupConversions))]
public bool UseImplicitMethodGroupConversion {
get { return useImplicitMethodGroupConversion; }
set {
@ -524,7 +525,7 @@ namespace ICSharpCode.Decompiler @@ -524,7 +525,7 @@ namespace ICSharpCode.Decompiler
/// default: false
/// </summary>
[Category("Other")]
[Description("Always cast targets of explicit interface implementation calls")]
[Description(nameof(Resources.AlwaysCastTargetsOfExplicitInterfaceImplementationCalls))]
public bool AlwaysCastTargetsOfExplicitInterfaceImplementationCalls {
get { return alwaysCastTargetsOfExplicitInterfaceImplementationCalls; }
set {
@ -541,7 +542,7 @@ namespace ICSharpCode.Decompiler @@ -541,7 +542,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(nameof(Resources.UseVariableNamesFromDebugSymbolsIfAvailable))]
public bool UseDebugSymbols {
get { return useDebugSymbols; }
set {
@ -559,7 +560,7 @@ namespace ICSharpCode.Decompiler @@ -559,7 +560,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(nameof(Resources.ArrayInitializerExpressions))]
public bool ArrayInitializers
{
get { return arrayInitializers; }
@ -579,7 +580,7 @@ namespace ICSharpCode.Decompiler @@ -579,7 +580,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(nameof(Resources.ObjectCollectionInitializerExpressions))]
public bool ObjectOrCollectionInitializers {
get { return objectCollectionInitializers; }
set {
@ -597,7 +598,7 @@ namespace ICSharpCode.Decompiler @@ -597,7 +598,7 @@ namespace ICSharpCode.Decompiler
/// Only has an effect if ObjectOrCollectionInitializers is enabled.
/// </summary>
[Category("C# 6.0 / VS 2015")]
[Description("Dictionary initializer expressions")]
[Description(nameof(Resources.DictionaryInitializerExpressions))]
public bool DictionaryInitializers {
get { return dictionaryInitializers; }
set {
@ -615,7 +616,7 @@ namespace ICSharpCode.Decompiler @@ -615,7 +616,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(nameof(Resources.AllowExtensionAddMethodsInCollectionInitializerExpressions))]
public bool ExtensionMethodsInCollectionInitializers {
get { return extensionMethodsInCollectionInitializers; }
set {
@ -632,7 +633,7 @@ namespace ICSharpCode.Decompiler @@ -632,7 +633,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(nameof(Resources.UseStringInterpolation))]
public bool StringInterpolation {
get { return stringInterpolation; }
set {
@ -648,8 +649,8 @@ namespace ICSharpCode.Decompiler @@ -648,8 +649,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(nameof(Resources.Other))]
[Description(nameof(Resources.IncludeXMLDocumentationCommentsInTheDecompiledCode))]
public bool ShowXmlDocumentation {
get { return showXmlDocumentation; }
set {
@ -704,7 +705,7 @@ namespace ICSharpCode.Decompiler @@ -704,7 +705,7 @@ namespace ICSharpCode.Decompiler
/// <summary>
/// Gets/Sets whether member bodies should be decompiled.
/// </summary>
[Category("Other")]
[Category(nameof(Resources.Other))]
[Browsable(false)]
public bool DecompileMemberBodies {
get { return decompileMemberBodies; }
@ -722,7 +723,7 @@ namespace ICSharpCode.Decompiler @@ -722,7 +723,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(nameof(Resources.UseExpressionBodiedMemberSyntaxForGetOnlyProperties))]
public bool UseExpressionBodyForCalculatedGetterOnlyProperties {
get { return useExpressionBodyForCalculatedGetterOnlyProperties; }
set {
@ -739,7 +740,7 @@ namespace ICSharpCode.Decompiler @@ -739,7 +740,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(nameof(Resources.UseOutVariableDeclarations))]
public bool OutVariables {
get { return outVariables; }
set {
@ -757,7 +758,7 @@ namespace ICSharpCode.Decompiler @@ -757,7 +758,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(nameof(Resources.UseDiscards))]
public bool Discards {
get { return discards; }
set {
@ -774,7 +775,7 @@ namespace ICSharpCode.Decompiler @@ -774,7 +775,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(nameof(Resources.IsByRefLikeAttributeShouldBeReplacedWithRefModifiersOnStructs))]
public bool IntroduceRefModifiersOnStructs {
get { return introduceRefModifiersOnStructs; }
set {
@ -792,7 +793,7 @@ namespace ICSharpCode.Decompiler @@ -792,7 +793,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(nameof(Resources.IsReadOnlyAttributeShouldBeReplacedWithReadonlyInModifiersOnStructsParameters))]
public bool IntroduceReadonlyAndInModifiers {
get { return introduceReadonlyAndInModifiers; }
set {
@ -810,7 +811,7 @@ namespace ICSharpCode.Decompiler @@ -810,7 +811,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(nameof(Resources.IsUnmanagedAttributeOnTypeParametersShouldBeReplacedWithUnmanagedConstraints))]
public bool IntroduceUnmanagedConstraint {
get { return introduceUnmanagedConstraint; }
set {
@ -827,7 +828,7 @@ namespace ICSharpCode.Decompiler @@ -827,7 +828,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(nameof(Resources.UseStackallocInitializerSyntax))]
public bool StackAllocInitializers {
get { return stackAllocInitializers; }
set {
@ -845,7 +846,7 @@ namespace ICSharpCode.Decompiler @@ -845,7 +846,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(nameof(Resources.UseTupleTypeSyntax))]
public bool TupleTypes {
get { return tupleTypes; }
set {
@ -863,7 +864,7 @@ namespace ICSharpCode.Decompiler @@ -863,7 +864,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(nameof(Resources.UseImplicitConversionsBetweenTupleTypes))]
public bool TupleConversions {
get { return tupleConversions; }
set {
@ -880,7 +881,7 @@ namespace ICSharpCode.Decompiler @@ -880,7 +881,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(nameof(Resources.DetectTupleComparisons))]
public bool TupleComparisons {
get { return tupleComparisons; }
set {
@ -897,7 +898,7 @@ namespace ICSharpCode.Decompiler @@ -897,7 +898,7 @@ namespace ICSharpCode.Decompiler
/// Gets/Sets whether named arguments should be used.
/// </summary>
[Category("C# 4.0 / VS 2010")]
[Description("Use named arguments")]
[Description(nameof(Resources.UseNamedArguments))]
public bool NamedArguments {
get { return namedArguments; }
set {
@ -914,7 +915,7 @@ namespace ICSharpCode.Decompiler @@ -914,7 +915,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(nameof(Resources.UseNonTrailingNamedArguments))]
public bool NonTrailingNamedArguments {
get { return nonTrailingNamedArguments; }
set {
@ -931,7 +932,7 @@ namespace ICSharpCode.Decompiler @@ -931,7 +932,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(nameof(Resources.RemoveOptionalArgumentsIfPossible))]
public bool OptionalArguments {
get { return optionalArguments; }
set {
@ -949,13 +950,13 @@ namespace ICSharpCode.Decompiler @@ -949,13 +950,13 @@ 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(nameof(Resources.IntroduceLocalFunctionsNOTIMPLEMENTED))]
[Browsable(false)]
public bool LocalFunctions {
get { return localFunctions; }
set {
if (localFunctions != value) {
throw new NotImplementedException("C# 7.0 local functions are not implemented!");
throw new NotImplementedException(Resources.C70LocalFunctionsAreNotImplemented);
//localFunctions = value;
//OnPropertyChanged();
}
@ -968,7 +969,7 @@ namespace ICSharpCode.Decompiler @@ -968,7 +969,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(nameof(Resources.NullableReferenceTypes))]
public bool NullableReferenceTypes {
get { return nullableReferenceTypes; }
set {
@ -981,8 +982,8 @@ namespace ICSharpCode.Decompiler @@ -981,8 +982,8 @@ namespace ICSharpCode.Decompiler
bool showDebugInfo;
[Category("Other")]
[Description("Show info from debug symbols, if available")]
[Category(nameof(Resources.Other))]
[Description(nameof(Resources.ShowInfoFromDebugSymbolsIfAvailable))]
[Browsable(false)]
public bool ShowDebugInfo {
get { return showDebugInfo; }
@ -1000,7 +1001,7 @@ namespace ICSharpCode.Decompiler @@ -1000,7 +1001,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(nameof(Resources.VBSpecificOptions))]
[Browsable(false)]
public bool AssumeArrayLengthFitsIntoInt32 {
get { return assumeArrayLengthFitsIntoInt32; }
@ -1017,7 +1018,7 @@ namespace ICSharpCode.Decompiler @@ -1017,7 +1018,7 @@ namespace ICSharpCode.Decompiler
/// <summary>
/// Gets/Sets whether to use increment and decrement operators
/// </summary>
[Category("VB-specific options")]
[Category(nameof(Resources.VBSpecificOptions))]
[Browsable(false)]
public bool IntroduceIncrementAndDecrement {
get { return introduceIncrementAndDecrement; }
@ -1034,7 +1035,7 @@ namespace ICSharpCode.Decompiler @@ -1034,7 +1035,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(nameof(Resources.VBSpecificOptions))]
[Browsable(false)]
public bool MakeAssignmentExpressions {
get { return makeAssignmentExpressions; }
@ -1051,8 +1052,8 @@ namespace ICSharpCode.Decompiler @@ -1051,8 +1052,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(nameof(Resources.FSpecificOptions))]
[Description(nameof(Resources.RemoveDeadAndSideEffectFreeCodeUseWithCaution))]
public bool RemoveDeadCode {
get { return removeDeadCode; }
set {
@ -1094,8 +1095,8 @@ namespace ICSharpCode.Decompiler @@ -1094,8 +1095,8 @@ namespace ICSharpCode.Decompiler
bool applyWindowsRuntimeProjections = true;
[Category("Other")]
[Description("Apply Windows Runtime projections on loaded assemblies")]
[Category(nameof(Resources.Other))]
[Description(nameof(Resources.ApplyWindowsRuntimeProjectionsOnLoadedAssemblies))]
public bool ApplyWindowsRuntimeProjections {
get { return applyWindowsRuntimeProjections; }
set {

13
ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj

@ -348,6 +348,11 @@ @@ -348,6 +348,11 @@
<Compile Include="Output\TextTokenWriter.cs" />
<Compile Include="DebugInfo\IDebugInfoProvider.cs" />
<Compile Include="DebugInfo\PortablePdbWriter.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Semantics\InterpolatedStringResolveResult.cs" />
<Compile Include="SRMExtensions.cs" />
<Compile Include="SRMHacks.cs" />
@ -606,6 +611,14 @@ @@ -606,6 +611,14 @@
</Content>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.zh-Hans.resx" />
</ItemGroup>
<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>

540
ICSharpCode.Decompiler/Properties/Resources.Designer.cs generated

@ -0,0 +1,540 @@ @@ -0,0 +1,540 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace ICSharpCode.Decompiler.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ICSharpCode.Decompiler.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找类似 Allow extension &apos;Add&apos; methods in collection initializer expressions 的本地化字符串。
/// </summary>
public static string AllowExtensionAddMethodsInCollectionInitializerExpressions {
get {
return ResourceManager.GetString("AllowExtensionAddMethodsInCollectionInitializerExpressions", resourceCulture);
}
}
/// <summary>
/// 查找类似 Always cast targets of explicit interface implementation calls 的本地化字符串。
/// </summary>
public static string AlwaysCastTargetsOfExplicitInterfaceImplementationCalls {
get {
return ResourceManager.GetString("AlwaysCastTargetsOfExplicitInterfaceImplementationCalls", resourceCulture);
}
}
/// <summary>
/// 查找类似 Always use braces 的本地化字符串。
/// </summary>
public static string AlwaysUseBraces {
get {
return ResourceManager.GetString("AlwaysUseBraces", resourceCulture);
}
}
/// <summary>
/// 查找类似 Apply Windows Runtime projections on loaded assemblies 的本地化字符串。
/// </summary>
public static string ApplyWindowsRuntimeProjectionsOnLoadedAssemblies {
get {
return ResourceManager.GetString("ApplyWindowsRuntimeProjectionsOnLoadedAssemblies", resourceCulture);
}
}
/// <summary>
/// 查找类似 Array initializer expressions 的本地化字符串。
/// </summary>
public static string ArrayInitializerExpressions {
get {
return ResourceManager.GetString("ArrayInitializerExpressions", resourceCulture);
}
}
/// <summary>
/// 查找类似 C# 7.0 local functions are not implemented! 的本地化字符串。
/// </summary>
public static string C70LocalFunctionsAreNotImplemented {
get {
return ResourceManager.GetString("C70LocalFunctionsAreNotImplemented", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile ?. and ?[] operators 的本地化字符串。
/// </summary>
public static string DecompileAndOperators {
get {
return ResourceManager.GetString("DecompileAndOperators", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile anonymous methods/lambdas 的本地化字符串。
/// </summary>
public static string DecompileAnonymousMethodsLambdas {
get {
return ResourceManager.GetString("DecompileAnonymousMethodsLambdas", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile anonymous types 的本地化字符串。
/// </summary>
public static string DecompileAnonymousTypes {
get {
return ResourceManager.GetString("DecompileAnonymousTypes", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile async methods 的本地化字符串。
/// </summary>
public static string DecompileAsyncMethods {
get {
return ResourceManager.GetString("DecompileAsyncMethods", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile automatic events 的本地化字符串。
/// </summary>
public static string DecompileAutomaticEvents {
get {
return ResourceManager.GetString("DecompileAutomaticEvents", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile automatic properties 的本地化字符串。
/// </summary>
public static string DecompileAutomaticProperties {
get {
return ResourceManager.GetString("DecompileAutomaticProperties", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile await in catch/finally blocks 的本地化字符串。
/// </summary>
public static string DecompileAwaitInCatchFinallyBlocks {
get {
return ResourceManager.GetString("DecompileAwaitInCatchFinallyBlocks", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile C# 1.0 &apos;public unsafe fixed int arr[10];&apos; members 的本地化字符串。
/// </summary>
public static string DecompileC10PublicUnsafeFixedIntArr10Members {
get {
return ResourceManager.GetString("DecompileC10PublicUnsafeFixedIntArr10Members", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile [DecimalConstant(...)] as simple literal values 的本地化字符串。
/// </summary>
public static string DecompileDecimalConstantAsSimpleLiteralValues {
get {
return ResourceManager.GetString("DecompileDecimalConstantAsSimpleLiteralValues", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile enumerators (yield return) 的本地化字符串。
/// </summary>
public static string DecompileEnumeratorsYieldReturn {
get {
return ResourceManager.GetString("DecompileEnumeratorsYieldReturn", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile expression trees 的本地化字符串。
/// </summary>
public static string DecompileExpressionTrees {
get {
return ResourceManager.GetString("DecompileExpressionTrees", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompile use of the &apos;dynamic&apos; type 的本地化字符串。
/// </summary>
public static string DecompileUseOfTheDynamicType {
get {
return ResourceManager.GetString("DecompileUseOfTheDynamicType", resourceCulture);
}
}
/// <summary>
/// 查找类似 Detect foreach statements 的本地化字符串。
/// </summary>
public static string DetectForeachStatements {
get {
return ResourceManager.GetString("DetectForeachStatements", resourceCulture);
}
}
/// <summary>
/// 查找类似 Detect lock statements 的本地化字符串。
/// </summary>
public static string DetectLockStatements {
get {
return ResourceManager.GetString("DetectLockStatements", resourceCulture);
}
}
/// <summary>
/// 查找类似 Detect switch on string 的本地化字符串。
/// </summary>
public static string DetectSwitchOnString {
get {
return ResourceManager.GetString("DetectSwitchOnString", resourceCulture);
}
}
/// <summary>
/// 查找类似 Detect tuple comparisons 的本地化字符串。
/// </summary>
public static string DetectTupleComparisons {
get {
return ResourceManager.GetString("DetectTupleComparisons", resourceCulture);
}
}
/// <summary>
/// 查找类似 Detect using statements 的本地化字符串。
/// </summary>
public static string DetectUsingStatements {
get {
return ResourceManager.GetString("DetectUsingStatements", resourceCulture);
}
}
/// <summary>
/// 查找类似 Dictionary initializer expressions 的本地化字符串。
/// </summary>
public static string DictionaryInitializerExpressions {
get {
return ResourceManager.GetString("DictionaryInitializerExpressions", resourceCulture);
}
}
/// <summary>
/// 查找类似 F#-specific options 的本地化字符串。
/// </summary>
public static string FSpecificOptions {
get {
return ResourceManager.GetString("FSpecificOptions", resourceCulture);
}
}
/// <summary>
/// 查找类似 Include XML documentation comments in the decompiled code 的本地化字符串。
/// </summary>
public static string IncludeXMLDocumentationCommentsInTheDecompiledCode {
get {
return ResourceManager.GetString("IncludeXMLDocumentationCommentsInTheDecompiledCode", resourceCulture);
}
}
/// <summary>
/// 查找类似 Insert using declarations 的本地化字符串。
/// </summary>
public static string InsertUsingDeclarations {
get {
return ResourceManager.GetString("InsertUsingDeclarations", resourceCulture);
}
}
/// <summary>
/// 查找类似 Introduce local functions (NOT IMPLEMENTED!) 的本地化字符串。
/// </summary>
public static string IntroduceLocalFunctionsNOTIMPLEMENTED {
get {
return ResourceManager.GetString("IntroduceLocalFunctionsNOTIMPLEMENTED", resourceCulture);
}
}
/// <summary>
/// 查找类似 IsByRefLikeAttribute should be replaced with &apos;ref&apos; modifiers on structs 的本地化字符串。
/// </summary>
public static string IsByRefLikeAttributeShouldBeReplacedWithRefModifiersOnStructs {
get {
return ResourceManager.GetString("IsByRefLikeAttributeShouldBeReplacedWithRefModifiersOnStructs", resourceCulture);
}
}
/// <summary>
/// 查找类似 IsReadOnlyAttribute should be replaced with &apos;readonly&apos;/&apos;in&apos; modifiers on structs/parameters 的本地化字符串。
/// </summary>
public static string IsReadOnlyAttributeShouldBeReplacedWithReadonlyInModifiersOnStructsParameters {
get {
return ResourceManager.GetString("IsReadOnlyAttributeShouldBeReplacedWithReadonlyInModifiersOnStructsParameters", resourceCulture);
}
}
/// <summary>
/// 查找类似 IsUnmanagedAttribute on type parameters should be replaced with &apos;unmanaged&apos; constraints 的本地化字符串。
/// </summary>
public static string IsUnmanagedAttributeOnTypeParametersShouldBeReplacedWithUnmanagedConstraints {
get {
return ResourceManager.GetString("IsUnmanagedAttributeOnTypeParametersShouldBeReplacedWithUnmanagedConstraints", resourceCulture);
}
}
/// <summary>
/// 查找类似 Nullable reference types 的本地化字符串。
/// </summary>
public static string NullableReferenceTypes {
get {
return ResourceManager.GetString("NullableReferenceTypes", resourceCulture);
}
}
/// <summary>
/// 查找类似 Object/collection initializer expressions 的本地化字符串。
/// </summary>
public static string ObjectCollectionInitializerExpressions {
get {
return ResourceManager.GetString("ObjectCollectionInitializerExpressions", resourceCulture);
}
}
/// <summary>
/// 查找类似 Other 的本地化字符串。
/// </summary>
public static string Other {
get {
return ResourceManager.GetString("Other", resourceCulture);
}
}
/// <summary>
/// 查找类似 Remove dead and side effect free code (use with caution!) 的本地化字符串。
/// </summary>
public static string RemoveDeadAndSideEffectFreeCodeUseWithCaution {
get {
return ResourceManager.GetString("RemoveDeadAndSideEffectFreeCodeUseWithCaution", resourceCulture);
}
}
/// <summary>
/// 查找类似 Remove optional arguments, if possible 的本地化字符串。
/// </summary>
public static string RemoveOptionalArgumentsIfPossible {
get {
return ResourceManager.GetString("RemoveOptionalArgumentsIfPossible", resourceCulture);
}
}
/// <summary>
/// 查找类似 Show info from debug symbols, if available 的本地化字符串。
/// </summary>
public static string ShowInfoFromDebugSymbolsIfAvailable {
get {
return ResourceManager.GetString("ShowInfoFromDebugSymbolsIfAvailable", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use discards 的本地化字符串。
/// </summary>
public static string UseDiscards {
get {
return ResourceManager.GetString("UseDiscards", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use expression-bodied member syntax for get-only properties 的本地化字符串。
/// </summary>
public static string UseExpressionBodiedMemberSyntaxForGetOnlyProperties {
get {
return ResourceManager.GetString("UseExpressionBodiedMemberSyntaxForGetOnlyProperties", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use extension method syntax 的本地化字符串。
/// </summary>
public static string UseExtensionMethodSyntax {
get {
return ResourceManager.GetString("UseExtensionMethodSyntax", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use implicit conversions between tuple types 的本地化字符串。
/// </summary>
public static string UseImplicitConversionsBetweenTupleTypes {
get {
return ResourceManager.GetString("UseImplicitConversionsBetweenTupleTypes", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use implicit method group conversions 的本地化字符串。
/// </summary>
public static string UseImplicitMethodGroupConversions {
get {
return ResourceManager.GetString("UseImplicitMethodGroupConversions", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use lambda syntax, if possible 的本地化字符串。
/// </summary>
public static string UseLambdaSyntaxIfPossible {
get {
return ResourceManager.GetString("UseLambdaSyntaxIfPossible", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use lifted operators for nullables 的本地化字符串。
/// </summary>
public static string UseLiftedOperatorsForNullables {
get {
return ResourceManager.GetString("UseLiftedOperatorsForNullables", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use LINQ expression syntax 的本地化字符串。
/// </summary>
public static string UseLINQExpressionSyntax {
get {
return ResourceManager.GetString("UseLINQExpressionSyntax", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use named arguments 的本地化字符串。
/// </summary>
public static string UseNamedArguments {
get {
return ResourceManager.GetString("UseNamedArguments", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use non-trailing named arguments 的本地化字符串。
/// </summary>
public static string UseNonTrailingNamedArguments {
get {
return ResourceManager.GetString("UseNonTrailingNamedArguments", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use out variable declarations 的本地化字符串。
/// </summary>
public static string UseOutVariableDeclarations {
get {
return ResourceManager.GetString("UseOutVariableDeclarations", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use stackalloc initializer syntax 的本地化字符串。
/// </summary>
public static string UseStackallocInitializerSyntax {
get {
return ResourceManager.GetString("UseStackallocInitializerSyntax", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use string interpolation 的本地化字符串。
/// </summary>
public static string UseStringInterpolation {
get {
return ResourceManager.GetString("UseStringInterpolation", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use tuple type syntax 的本地化字符串。
/// </summary>
public static string UseTupleTypeSyntax {
get {
return ResourceManager.GetString("UseTupleTypeSyntax", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use variable names from debug symbols, if available 的本地化字符串。
/// </summary>
public static string UseVariableNamesFromDebugSymbolsIfAvailable {
get {
return ResourceManager.GetString("UseVariableNamesFromDebugSymbolsIfAvailable", resourceCulture);
}
}
/// <summary>
/// 查找类似 VB-specific options 的本地化字符串。
/// </summary>
public static string VBSpecificOptions {
get {
return ResourceManager.GetString("VBSpecificOptions", resourceCulture);
}
}
}
}

279
ICSharpCode.Decompiler/Properties/Resources.resx

@ -0,0 +1,279 @@ @@ -0,0 +1,279 @@
<?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="DecompileEnumeratorsYieldReturn" xml:space="preserve">
<value>Decompile enumerators (yield return)</value>
</data>
<data name="DecompileAnonymousMethodsLambdas" xml:space="preserve">
<value>Decompile anonymous methods/lambdas</value>
</data>
<data name="DecompileAnonymousTypes" xml:space="preserve">
<value>Decompile anonymous types</value>
</data>
<data name="UseLambdaSyntaxIfPossible" xml:space="preserve">
<value>Use lambda syntax, if possible</value>
</data>
<data name="DecompileExpressionTrees" xml:space="preserve">
<value>Decompile expression trees</value>
</data>
<data name="DecompileUseOfTheDynamicType" xml:space="preserve">
<value>Decompile use of the 'dynamic' type</value>
</data>
<data name="DecompileAsyncMethods" xml:space="preserve">
<value>Decompile async methods</value>
</data>
<data name="DecompileAwaitInCatchFinallyBlocks" xml:space="preserve">
<value>Decompile await in catch/finally blocks</value>
</data>
<data name="DecompileDecimalConstantAsSimpleLiteralValues" xml:space="preserve">
<value>Decompile [DecimalConstant(...)] as simple literal values</value>
</data>
<data name="DecompileC10PublicUnsafeFixedIntArr10Members" xml:space="preserve">
<value>Decompile C# 1.0 'public unsafe fixed int arr[10];' members</value>
</data>
<data name="UseLiftedOperatorsForNullables" xml:space="preserve">
<value>Use lifted operators for nullables</value>
</data>
<data name="DecompileAndOperators" xml:space="preserve">
<value>Decompile ?. and ?[] operators</value>
</data>
<data name="DecompileAutomaticProperties" xml:space="preserve">
<value>Decompile automatic properties</value>
</data>
<data name="DecompileAutomaticEvents" xml:space="preserve">
<value>Decompile automatic events</value>
</data>
<data name="DetectUsingStatements" xml:space="preserve">
<value>Detect using statements</value>
</data>
<data name="Other" xml:space="preserve">
<value>Other</value>
</data>
<data name="AlwaysUseBraces" xml:space="preserve">
<value>Always use braces</value>
</data>
<data name="DetectForeachStatements" xml:space="preserve">
<value>Detect foreach statements</value>
</data>
<data name="DetectLockStatements" xml:space="preserve">
<value>Detect lock statements</value>
</data>
<data name="DetectSwitchOnString" xml:space="preserve">
<value>Detect switch on string</value>
</data>
<data name="InsertUsingDeclarations" xml:space="preserve">
<value>Insert using declarations</value>
</data>
<data name="UseExtensionMethodSyntax" xml:space="preserve">
<value>Use extension method syntax</value>
</data>
<data name="UseLINQExpressionSyntax" xml:space="preserve">
<value>Use LINQ expression syntax</value>
</data>
<data name="UseImplicitMethodGroupConversions" xml:space="preserve">
<value>Use implicit method group conversions</value>
</data>
<data name="AlwaysCastTargetsOfExplicitInterfaceImplementationCalls" xml:space="preserve">
<value>Always cast targets of explicit interface implementation calls</value>
</data>
<data name="UseVariableNamesFromDebugSymbolsIfAvailable" xml:space="preserve">
<value>Use variable names from debug symbols, if available</value>
</data>
<data name="ArrayInitializerExpressions" xml:space="preserve">
<value>Array initializer expressions</value>
</data>
<data name="ObjectCollectionInitializerExpressions" xml:space="preserve">
<value>Object/collection initializer expressions</value>
</data>
<data name="DictionaryInitializerExpressions" xml:space="preserve">
<value>Dictionary initializer expressions</value>
</data>
<data name="AllowExtensionAddMethodsInCollectionInitializerExpressions" xml:space="preserve">
<value>Allow extension 'Add' methods in collection initializer expressions</value>
</data>
<data name="UseStringInterpolation" xml:space="preserve">
<value>Use string interpolation</value>
</data>
<data name="IncludeXMLDocumentationCommentsInTheDecompiledCode" xml:space="preserve">
<value>Include XML documentation comments in the decompiled code</value>
</data>
<data name="UseExpressionBodiedMemberSyntaxForGetOnlyProperties" xml:space="preserve">
<value>Use expression-bodied member syntax for get-only properties</value>
</data>
<data name="UseOutVariableDeclarations" xml:space="preserve">
<value>Use out variable declarations</value>
</data>
<data name="UseDiscards" xml:space="preserve">
<value>Use discards</value>
</data>
<data name="IsByRefLikeAttributeShouldBeReplacedWithRefModifiersOnStructs" xml:space="preserve">
<value>IsByRefLikeAttribute should be replaced with 'ref' modifiers on structs</value>
</data>
<data name="IsReadOnlyAttributeShouldBeReplacedWithReadonlyInModifiersOnStructsParameters" xml:space="preserve">
<value>IsReadOnlyAttribute should be replaced with 'readonly'/'in' modifiers on structs/parameters</value>
</data>
<data name="IsUnmanagedAttributeOnTypeParametersShouldBeReplacedWithUnmanagedConstraints" xml:space="preserve">
<value>IsUnmanagedAttribute on type parameters should be replaced with 'unmanaged' constraints</value>
</data>
<data name="UseStackallocInitializerSyntax" xml:space="preserve">
<value>Use stackalloc initializer syntax</value>
</data>
<data name="UseTupleTypeSyntax" xml:space="preserve">
<value>Use tuple type syntax</value>
</data>
<data name="UseImplicitConversionsBetweenTupleTypes" xml:space="preserve">
<value>Use implicit conversions between tuple types</value>
</data>
<data name="DetectTupleComparisons" xml:space="preserve">
<value>Detect tuple comparisons</value>
</data>
<data name="UseNamedArguments" xml:space="preserve">
<value>Use named arguments</value>
</data>
<data name="UseNonTrailingNamedArguments" xml:space="preserve">
<value>Use non-trailing named arguments</value>
</data>
<data name="RemoveOptionalArgumentsIfPossible" xml:space="preserve">
<value>Remove optional arguments, if possible</value>
</data>
<data name="IntroduceLocalFunctionsNOTIMPLEMENTED" xml:space="preserve">
<value>Introduce local functions (NOT IMPLEMENTED!)</value>
</data>
<data name="C70LocalFunctionsAreNotImplemented" xml:space="preserve">
<value>C# 7.0 local functions are not implemented!</value>
</data>
<data name="NullableReferenceTypes" xml:space="preserve">
<value>Nullable reference types</value>
</data>
<data name="ShowInfoFromDebugSymbolsIfAvailable" xml:space="preserve">
<value>Show info from debug symbols, if available</value>
</data>
<data name="VBSpecificOptions" xml:space="preserve">
<value>VB-specific options</value>
</data>
<data name="FSpecificOptions" xml:space="preserve">
<value>F#-specific options</value>
</data>
<data name="RemoveDeadAndSideEffectFreeCodeUseWithCaution" xml:space="preserve">
<value>Remove dead and side effect free code (use with caution!)</value>
</data>
<data name="ApplyWindowsRuntimeProjectionsOnLoadedAssemblies" xml:space="preserve">
<value>Apply Windows Runtime projections on loaded assemblies</value>
</data>
</root>

279
ICSharpCode.Decompiler/Properties/Resources.zh-Hans.resx

@ -0,0 +1,279 @@ @@ -0,0 +1,279 @@
<?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="DecompileEnumeratorsYieldReturn" xml:space="preserve">
<value>反编译枚举器 (yield return)</value>
</data>
<data name="DecompileAnonymousMethodsLambdas" xml:space="preserve">
<value>反编译匿名方法或lambdas</value>
</data>
<data name="DecompileAnonymousTypes" xml:space="preserve">
<value>反编译匿名类型</value>
</data>
<data name="UseLambdaSyntaxIfPossible" xml:space="preserve">
<value>如果可能, 请使用 lambda 语法</value>
</data>
<data name="DecompileExpressionTrees" xml:space="preserve">
<value>反编译表达树</value>
</data>
<data name="DecompileUseOfTheDynamicType" xml:space="preserve">
<value>反编译使用"dynamic" 类型</value>
</data>
<data name="DecompileAsyncMethods" xml:space="preserve">
<value>反编译异步方法</value>
</data>
<data name="DecompileAwaitInCatchFinallyBlocks" xml:space="preserve">
<value>反编译catch/finally内的await</value>
</data>
<data name="DecompileDecimalConstantAsSimpleLiteralValues" xml:space="preserve">
<value>反编译 [DecimalConstant(...)] 作为简单的文本值</value>
</data>
<data name="DecompileC10PublicUnsafeFixedIntArr10Members" xml:space="preserve">
<value>反编译 C# 1.0 "public unsafe fixed int arr[10];" 成员</value>
</data>
<data name="UseLiftedOperatorsForNullables" xml:space="preserve">
<value>对空变量使用提升运算符</value>
</data>
<data name="DecompileAndOperators" xml:space="preserve">
<value>反编译 ?. 和 ?[] 运算符</value>
</data>
<data name="DecompileAutomaticProperties" xml:space="preserve">
<value>反编译自动属性</value>
</data>
<data name="DecompileAutomaticEvents" xml:space="preserve">
<value>反编译自动事件</value>
</data>
<data name="DetectUsingStatements" xml:space="preserve">
<value>检测using语句</value>
</data>
<data name="Other" xml:space="preserve">
<value>其他</value>
</data>
<data name="AlwaysUseBraces" xml:space="preserve">
<value>始终使用大括号</value>
</data>
<data name="DetectForeachStatements" xml:space="preserve">
<value>检测 foreach语句</value>
</data>
<data name="DetectLockStatements" xml:space="preserve">
<value>检测 lock语句</value>
</data>
<data name="DetectSwitchOnString" xml:space="preserve">
<value>检测switch 的字符串</value>
</data>
<data name="InsertUsingDeclarations" xml:space="preserve">
<value>插入using声明</value>
</data>
<data name="UseExtensionMethodSyntax" xml:space="preserve">
<value>使用扩展方法语法</value>
</data>
<data name="UseLINQExpressionSyntax" xml:space="preserve">
<value>使用 LINQ 表达式语法</value>
</data>
<data name="UseImplicitMethodGroupConversions" xml:space="preserve">
<value>使用隐式方法组转换</value>
</data>
<data name="AlwaysCastTargetsOfExplicitInterfaceImplementationCalls" xml:space="preserve">
<value>始终强制转换显式接口实现调用的目标</value>
</data>
<data name="UseVariableNamesFromDebugSymbolsIfAvailable" xml:space="preserve">
<value>使用调试符号中的变量名 (如果可用)</value>
</data>
<data name="ArrayInitializerExpressions" xml:space="preserve">
<value>数组初始化器表达式</value>
</data>
<data name="ObjectCollectionInitializerExpressions" xml:space="preserve">
<value>对象或集合初始化器表达式</value>
</data>
<data name="DictionaryInitializerExpressions" xml:space="preserve">
<value>Dictionary初始值设定项表达式</value>
</data>
<data name="AllowExtensionAddMethodsInCollectionInitializerExpressions" xml:space="preserve">
<value>在集合初始化器表达式中允许扩展 "添加" 方法</value>
</data>
<data name="UseStringInterpolation" xml:space="preserve">
<value>使用字符串插值</value>
</data>
<data name="IncludeXMLDocumentationCommentsInTheDecompiledCode" xml:space="preserve">
<value>在反编译代码中包括 XML 文档注释</value>
</data>
<data name="UseExpressionBodiedMemberSyntaxForGetOnlyProperties" xml:space="preserve">
<value>对仅获取属性使用表达式内部成员语法</value>
</data>
<data name="UseOutVariableDeclarations" xml:space="preserve">
<value>使用外部变量声明</value>
</data>
<data name="UseDiscards" xml:space="preserve">
<value>使用丢弃物</value>
</data>
<data name="IsByRefLikeAttributeShouldBeReplacedWithRefModifiersOnStructs" xml:space="preserve">
<value>IsByRefLikeAttribute应替换为结构上的 "ref" 修饰符</value>
</data>
<data name="IsReadOnlyAttributeShouldBeReplacedWithReadonlyInModifiersOnStructsParameters" xml:space="preserve">
<value>IsReadOnlyAttribute 应替为结构参数上的 "readonly"/"中的修饰符</value>
</data>
<data name="IsUnmanagedAttributeOnTypeParametersShouldBeReplacedWithUnmanagedConstraints" xml:space="preserve">
<value>类型参数上的IsUnmanagedAttribute 应替换为 "非托管" 约束</value>
</data>
<data name="UseStackallocInitializerSyntax" xml:space="preserve">
<value>使用stackalloc 初始化器语法</value>
</data>
<data name="UseTupleTypeSyntax" xml:space="preserve">
<value>使用元组类型语法</value>
</data>
<data name="UseImplicitConversionsBetweenTupleTypes" xml:space="preserve">
<value>在元组类型之间使用隐式转换</value>
</data>
<data name="DetectTupleComparisons" xml:space="preserve">
<value>检测元组比较</value>
</data>
<data name="UseNamedArguments" xml:space="preserve">
<value>使用命名参数</value>
</data>
<data name="UseNonTrailingNamedArguments" xml:space="preserve">
<value>使用非尾随命名参数</value>
</data>
<data name="RemoveOptionalArgumentsIfPossible" xml:space="preserve">
<value>如果可能, 删除可选参数</value>
</data>
<data name="IntroduceLocalFunctionsNOTIMPLEMENTED" xml:space="preserve">
<value>引入本地功能 (未实现!)</value>
</data>
<data name="C70LocalFunctionsAreNotImplemented" xml:space="preserve">
<value>C# 7.0 本地函数未实现!</value>
</data>
<data name="NullableReferenceTypes" xml:space="preserve">
<value>可空引用类型</value>
</data>
<data name="ShowInfoFromDebugSymbolsIfAvailable" xml:space="preserve">
<value>显示调试符号中的信息 (如果可用)</value>
</data>
<data name="VBSpecificOptions" xml:space="preserve">
<value>Vb 特定选项</value>
</data>
<data name="FSpecificOptions" xml:space="preserve">
<value>F # 特定选项</value>
</data>
<data name="RemoveDeadAndSideEffectFreeCodeUseWithCaution" xml:space="preserve">
<value>删除死的和副作用免费的代码 (请谨慎使用)</value>
</data>
<data name="ApplyWindowsRuntimeProjectionsOnLoadedAssemblies" xml:space="preserve">
<value>在已加载的程序集上应用 Windows 运行时投影</value>
</data>
</root>

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

4
ILSpy/MainWindow.xaml

@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
<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>
@ -87,7 +87,7 @@ @@ -87,7 +87,7 @@
<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 />

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()
@ -161,12 +162,16 @@ namespace ICSharpCode.ILSpy.Options @@ -161,12 +162,16 @@ namespace ICSharpCode.ILSpy.Options
public class CSharpDecompilerSetting : INotifyPropertyChanged
{
bool isEnabled;
internal static string GetResourceString(string key)
{
var str = !string.IsNullOrEmpty(key) ? ICSharpCode.Decompiler.Properties. Resources.ResourceManager.GetString(key) : null;
return string.IsNullOrEmpty(key) || string.IsNullOrEmpty(str) ? key : str;
}
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; }

8
ILSpy/Options/DisplaySettingsPanel.xaml

@ -12,7 +12,7 @@ @@ -12,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" />
@ -63,16 +63,16 @@ @@ -63,16 +63,16 @@
<StackPanel Margin="3">
<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}" Content="{x:Static properties:Resources.ShowLineNumbers}"></CheckBox>
<CheckBox IsChecked="{Binding ShowMetadataTokens}" Content="{x:Static properties:Resources.ShowMetadataTokens}"></CheckBox>

63
ILSpy/Properties/Resources.Designer.cs generated

@ -456,6 +456,15 @@ namespace ICSharpCode.ILSpy.Properties { @@ -456,6 +456,15 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// 查找类似 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. 的本地化字符串。
/// </summary>
public static string DecompilerSettingsPanelLongText {
get {
return ResourceManager.GetString("DecompilerSettingsPanelLongText", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decompiling... 的本地化字符串。
/// </summary>
@ -654,6 +663,15 @@ namespace ICSharpCode.ILSpy.Properties { @@ -654,6 +663,15 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// 查找类似 Indent size: 的本地化字符串。
/// </summary>
public static string IndentSize {
get {
return ResourceManager.GetString("IndentSize", resourceCulture);
}
}
/// <summary>
/// 查找类似 Insert using declarations 的本地化字符串。
/// </summary>
@ -825,6 +843,15 @@ namespace ICSharpCode.ILSpy.Properties { @@ -825,6 +843,15 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// 查找类似 Other 的本地化字符串。
/// </summary>
public static string Other {
get {
return ResourceManager.GetString("Other", resourceCulture);
}
}
/// <summary>
/// 查找类似 Other options 的本地化字符串。
/// </summary>
@ -960,6 +987,15 @@ namespace ICSharpCode.ILSpy.Properties { @@ -960,6 +987,15 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// 查找类似 Search (Ctrl+Shift+F or Ctrl+E) 的本地化字符串。
/// </summary>
public static string SearchCtrlShiftFOrCtrlE {
get {
return ResourceManager.GetString("SearchCtrlShiftFOrCtrlE", resourceCulture);
}
}
/// <summary>
/// 查找类似 Searching... 的本地化字符串。
/// </summary>
@ -1014,6 +1050,15 @@ namespace ICSharpCode.ILSpy.Properties { @@ -1014,6 +1050,15 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// 查找类似 Show _all types and members 的本地化字符串。
/// </summary>
public static string Show_allTypesAndMembers {
get {
return ResourceManager.GetString("Show_allTypesAndMembers", resourceCulture);
}
}
/// <summary>
/// 查找类似 Show _internal types and members 的本地化字符串。
/// </summary>
@ -1023,6 +1068,15 @@ namespace ICSharpCode.ILSpy.Properties { @@ -1023,6 +1068,15 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// 查找类似 Show all types and members 的本地化字符串。
/// </summary>
public static string ShowAllTypesAndMembers {
get {
return ResourceManager.GetString("ShowAllTypesAndMembers", resourceCulture);
}
}
/// <summary>
/// 查找类似 Show assembly load log 的本地化字符串。
/// </summary>
@ -1185,6 +1239,15 @@ namespace ICSharpCode.ILSpy.Properties { @@ -1185,6 +1239,15 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// 查找类似 Tab size: 的本地化字符串。
/// </summary>
public static string TabSize {
get {
return ResourceManager.GetString("TabSize", resourceCulture);
}
}
/// <summary>
/// 查找类似 Toggle All Folding 的本地化字符串。
/// </summary>

21
ILSpy/Properties/Resources.resx

@ -546,4 +546,25 @@ @@ -546,4 +546,25 @@
<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>
</root>

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

@ -528,4 +528,43 @@ @@ -528,4 +528,43 @@
<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>
</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();
}
}
@ -394,8 +394,8 @@ namespace ICSharpCode.ILSpy @@ -394,8 +394,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()

Loading…
Cancel
Save