|
|
|
@ -1393,12 +1393,12 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -1393,12 +1393,12 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
firstValue = currentValue; |
|
|
|
|
first = false; |
|
|
|
|
} |
|
|
|
|
else if (currentValue < previousValue) |
|
|
|
|
else if (currentValue <= previousValue) |
|
|
|
|
{ |
|
|
|
|
// If the values are out of order, we fallback to displaying all values.
|
|
|
|
|
return EnumValueDisplayMode.All; |
|
|
|
|
} |
|
|
|
|
else if ((!allConsecutive && !allPowersOfTwo)) |
|
|
|
|
else if (!allConsecutive && !allPowersOfTwo) |
|
|
|
|
{ |
|
|
|
|
// We already know that the values are neither consecutive nor all powers of 2,
|
|
|
|
|
// so we can abort, and just display all values as-is.
|
|
|
|
@ -1406,10 +1406,18 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -1406,10 +1406,18 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
} |
|
|
|
|
previousValue = currentValue; |
|
|
|
|
} |
|
|
|
|
if (allPowersOfTwo && previousValue > 2) |
|
|
|
|
if (allPowersOfTwo) |
|
|
|
|
{ |
|
|
|
|
// If all values are powers of 2, display all enum values, but use hex.
|
|
|
|
|
return EnumValueDisplayMode.AllHex; |
|
|
|
|
if (previousValue > 8) |
|
|
|
|
{ |
|
|
|
|
// If all values are powers of 2 and greater 8, display all enum values, but use hex.
|
|
|
|
|
return EnumValueDisplayMode.AllHex; |
|
|
|
|
} |
|
|
|
|
else if (!allConsecutive) |
|
|
|
|
{ |
|
|
|
|
// If all values are powers of 2, display all enum values.
|
|
|
|
|
return EnumValueDisplayMode.All; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (settings.AlwaysShowEnumMemberValues) |
|
|
|
|
{ |
|
|
|
|