|
|
|
@ -104,6 +104,8 @@ namespace ICSharpCode.ILSpy.Options
@@ -104,6 +104,8 @@ namespace ICSharpCode.ILSpy.Options
|
|
|
|
|
s.ShowMetadataTokensInBase10 = (bool?)e.Attribute("ShowMetadataTokensInBase10") ?? false; |
|
|
|
|
s.EnableWordWrap = (bool?)e.Attribute("EnableWordWrap") ?? false; |
|
|
|
|
s.SortResults = (bool?)e.Attribute("SortResults") ?? true; |
|
|
|
|
s.FoldBraces = (bool?)e.Attribute("FoldBraces") ?? false; |
|
|
|
|
s.ExpandMemberDefinitions = (bool?)e.Attribute("ExpandMemberDefinitions") ?? false; |
|
|
|
|
|
|
|
|
|
return s; |
|
|
|
|
} |
|
|
|
@ -120,6 +122,8 @@ namespace ICSharpCode.ILSpy.Options
@@ -120,6 +122,8 @@ namespace ICSharpCode.ILSpy.Options
|
|
|
|
|
section.SetAttributeValue("ShowMetadataTokensInBase10", s.ShowMetadataTokensInBase10); |
|
|
|
|
section.SetAttributeValue("EnableWordWrap", s.EnableWordWrap); |
|
|
|
|
section.SetAttributeValue("SortResults", s.SortResults); |
|
|
|
|
section.SetAttributeValue("FoldBraces", s.FoldBraces); |
|
|
|
|
section.SetAttributeValue("ExpandMemberDefinitions", s.ExpandMemberDefinitions); |
|
|
|
|
|
|
|
|
|
XElement existingElement = root.Element("DisplaySettings"); |
|
|
|
|
if (existingElement != null) |
|
|
|
@ -136,8 +140,8 @@ namespace ICSharpCode.ILSpy.Options
@@ -136,8 +140,8 @@ namespace ICSharpCode.ILSpy.Options
|
|
|
|
|
{ |
|
|
|
|
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
|
|
|
{ |
|
|
|
|
if (value is double) { |
|
|
|
|
return Math.Round((double)value / 4 * 3); |
|
|
|
|
if (value is double d) { |
|
|
|
|
return Math.Round(d / 4 * 3); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
throw new NotImplementedException(); |
|
|
|
@ -145,11 +149,10 @@ namespace ICSharpCode.ILSpy.Options
@@ -145,11 +149,10 @@ namespace ICSharpCode.ILSpy.Options
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
|
|
|
{ |
|
|
|
|
if (value is string) { |
|
|
|
|
double d; |
|
|
|
|
if (double.TryParse((string)value, out d)) |
|
|
|
|
if (value is string s) { |
|
|
|
|
if (double.TryParse(s, out double d)) |
|
|
|
|
return d * 4 / 3; |
|
|
|
|
return 11 * 4 / 3; |
|
|
|
|
return 11.0 * 4 / 3; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
throw new NotImplementedException(); |
|
|
|
|