Ejemplo n.º 1
0
        /// <summary>
        /// Retrieve the settings from the session persistence store (e.g. the registry).
        /// </summary>
        public void Update()
        {
            OverrideConfigFiles = _persistenceManager.ReadBoolean(
                Constants.KEY_OVERRIDE_CONFIG_FILES, true);
            TabSize = _persistenceManager.ReadInt(
                Constants.KEY_TAB_SIZE, 4);
            UseTabs = _persistenceManager.ReadBoolean(
                Constants.KEY_USE_TABS, false);
            BackspaceUnindents = _persistenceManager.ReadBoolean(
                Constants.KEY_BACKSPACE_UNINDENTS, true);
            ShowIndentationGuides = _persistenceManager.ReadBoolean(
                Constants.KEY_SHOW_INDENTATION_GUIDES, false);
            LineNumberMarginSize = _persistenceManager.ReadInt(
                Constants.KEY_LINE_NUMBER_MARGIN_SIZE, 36);
            ShowFolding = _persistenceManager.ReadBoolean(
                Constants.KEY_SHOW_FOLDING, true);
            FoldStyle = _persistenceManager.ReadInt(
                Constants.KEY_FOLD_STYLE, 2);
            FoldMarkerStyle = _persistenceManager.ReadInt(
                Constants.KEY_FOLD_MARKER_STYLE, 0);
            FontName = _persistenceManager.ReadString(
                Constants.KEY_FONT_NAME, Constants.DEFAULT_FONT_NAME);
            FontSize = (float)_persistenceManager.ReadDouble(
                Constants.KEY_FONT_SIZE, 10.0F);
            MatchBraces = _persistenceManager.ReadBoolean(
                Constants.KEY_MATCH_BRACES, true);
            WordWrap = _persistenceManager.ReadBoolean(
                Constants.KEY_WORD_WRAP, false);

            int colorMode = _persistenceManager.ReadInt(
                Constants.KEY_PRINTING_COLOR_MODE, 0);

            PrintingColorMode = GetPrintingColorMode(colorMode);
        }