From 01ca28dec60de45c6984d14f0ddcb38ba87053e5 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 1 Nov 2017 23:47:46 +0100 Subject: [PATCH] Add more options to options dialog for easy testing. --- ILSpy/Options/DecompilerSettingsPanel.xaml | 4 +++- ILSpy/Options/DecompilerSettingsPanel.xaml.cs | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ILSpy/Options/DecompilerSettingsPanel.xaml b/ILSpy/Options/DecompilerSettingsPanel.xaml index 4d76de14e..d18e38b3f 100644 --- a/ILSpy/Options/DecompilerSettingsPanel.xaml +++ b/ILSpy/Options/DecompilerSettingsPanel.xaml @@ -14,6 +14,8 @@ Show info from debug symbols, if available Show XML documentation in decompiled code Enable folding on all blocks in braces - Remove dead and side effect free code. + Remove dead and side effect free code + Insert using declarations + Fully qualify ambiguous type names \ No newline at end of file diff --git a/ILSpy/Options/DecompilerSettingsPanel.xaml.cs b/ILSpy/Options/DecompilerSettingsPanel.xaml.cs index 8541be53d..a420c6c43 100644 --- a/ILSpy/Options/DecompilerSettingsPanel.xaml.cs +++ b/ILSpy/Options/DecompilerSettingsPanel.xaml.cs @@ -61,6 +61,8 @@ namespace ICSharpCode.ILSpy.Options s.ShowDebugInfo = (bool?)e.Attribute("showDebugInfo") ?? s.ShowDebugInfo; s.ShowXmlDocumentation = (bool?)e.Attribute("xmlDoc") ?? s.ShowXmlDocumentation; s.FoldBraces = (bool?)e.Attribute("foldBraces") ?? s.FoldBraces; + s.UsingDeclarations = (bool?)e.Attribute("usingDeclarations") ?? s.UsingDeclarations; + s.FullyQualifyAmbiguousTypeNames = (bool?)e.Attribute("fullyQualifyAmbiguousTypeNames") ?? s.FullyQualifyAmbiguousTypeNames; return s; } @@ -79,7 +81,10 @@ namespace ICSharpCode.ILSpy.Options section.SetAttributeValue("showDebugInfo", s.ShowDebugInfo); section.SetAttributeValue("xmlDoc", s.ShowXmlDocumentation); section.SetAttributeValue("foldBraces", s.FoldBraces); - + section.SetAttributeValue("foldBraces", s.RemoveDeadCode); + section.SetAttributeValue("usingDeclarations", s.UsingDeclarations); + section.SetAttributeValue("fullyQualifyAmbiguousTypeNames", s.FullyQualifyAmbiguousTypeNames); + XElement existingElement = root.Element("DecompilerSettings"); if (existingElement != null) existingElement.ReplaceWith(section);