예제 #1
0
 public void CopyValues(DisplaySettings s)
 {
     this.SelectedFont       = s.selectedFont;
     this.SelectedFontSize   = s.selectedFontSize;
     this.ShowLineNumbers    = s.showLineNumbers;
     this.ShowMetadataTokens = s.showMetadataTokens;
     this.EnableWordWrap     = s.enableWordWrap;
     this.SortResults        = s.sortResults;
 }
예제 #2
0
        public static DisplaySettings LoadDisplaySettings(ILSpySettings settings)
        {
            XElement e = settings["DisplaySettings"];
            var      s = new DisplaySettings();

            s.SelectedFont       = new FontFamily((string)e.Attribute("Font") ?? "Consolas");
            s.SelectedFontSize   = (double?)e.Attribute("FontSize") ?? 10.0 * 4 / 3;
            s.ShowLineNumbers    = (bool?)e.Attribute("ShowLineNumbers") ?? false;
            s.ShowMetadataTokens = (bool?)e.Attribute("ShowMetadataTokens") ?? false;
            s.EnableWordWrap     = (bool?)e.Attribute("EnableWordWrap") ?? false;
            s.SortResults        = (bool?)e.Attribute("SortResults") ?? true;

            return(s);
        }