예제 #1
0
        public void Save()
        {
            XElement doc = new XElement("SessionSettings");

            doc.Add(this.FilterSettings.SaveAsXml());
            if (this.ActiveAssemblyList != null)
            {
                doc.Add(new XElement("ActiveAssemblyList", Escape(this.ActiveAssemblyList)));
            }
            doc.Add(new XElement("WindowState", ToString(this.WindowState)));
            doc.Add(new XElement("IsFullScreen", ToString(this.IsFullScreen)));
            if (this.WindowBounds != null)
            {
                doc.Add(new XElement("WindowBounds", ToString(this.WindowBounds)));
            }
            doc.Add(new XElement("WordWrap", ToString(this.WordWrap)));
            doc.Add(new XElement("HighlightCurrentLine", ToString(this.HighlightCurrentLine)));
            doc.Add(new XElement("LeftColumnWidth", ToString(this.LeftColumnWidth)));
            doc.Add(new XElement("TopPaneHeight", ToString(this.TopPaneSettings.Height)));
            doc.Add(new XElement("TopPaneName", ToString(this.TopPaneSettings.Name)));
            doc.Add(new XElement("BottomPaneHeight", ToString(this.BottomPaneSettings.Height)));
            doc.Add(new XElement("BottomPaneName", ToString(this.BottomPaneSettings.Name)));
            doc.Add(new XElement("ThemeName", ToString(this.ThemeName)));
            doc.Add(new XElement("IgnoredWarnings", IgnoredWarnings.Select(id => new XElement("Warning", Escape(id)))));

            if (ICSharpCode.ILSpy.Options.DisplaySettingsPanel.CurrentDisplaySettings.RestoreTabsAtStartup)
            {
                doc.Add(SavedTabGroupsState.ToXml(new XElement("TabGroups")));
            }

            ILSpySettings.SaveSettings(doc);
        }