Esempio 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);
        }
Esempio n. 2
0
		/// <summary>
		/// Default constructor
		/// </summary>
		public PageSettings()
		{
			m_oHeader = new HeaderInformation(PageInformationBorder.Bottom, InformationType.DocumentName, InformationType.Nothing, InformationType.PageNumber);
			m_oFooter = new FooterInformation(PageInformationBorder.Top, InformationType.Nothing, InformationType.Nothing, InformationType.Nothing);
			m_sFontMagnification = 0;
			m_eColorMode = PrintColorMode.Normal;

			// Set default margins to 1/2 inch (50/100ths)
			base.Margins.Top = 50;
			base.Margins.Left = 50;
			base.Margins.Right = 50;
			base.Margins.Bottom = 50;
		}
Esempio n. 3
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public PageSettings()
        {
            m_oHeader            = new HeaderInformation(PageInformationBorder.Bottom, InformationType.DocumentName, InformationType.Nothing, InformationType.PageNumber);
            m_oFooter            = new FooterInformation(PageInformationBorder.Top, InformationType.Nothing, InformationType.Nothing, InformationType.Nothing);
            m_sFontMagnification = 0;
            m_eColorMode         = PrintColorMode.Normal;

            // Set default margins to 1/2 inch (50/100ths)
            base.Margins.Top    = 50;
            base.Margins.Left   = 50;
            base.Margins.Right  = 50;
            base.Margins.Bottom = 50;
        }
Esempio n. 4
0
        /// <summary>
        /// Translate PrintColorMode to int.
        /// </summary>
        /// <param name="mode">A PrintColorMode value.</param>
        /// <returns>The value as an int (0, 1 or 2).</returns>
        public int GetPrintingColorModeCode(PrintColorMode mode)
        {
            switch (mode)
            {
            case PrintColorMode.BlackOnWhite:
                return(1);

            case PrintColorMode.ColorOnWhite:
                return(2);

            default:
                return(0);
            }
        }
Esempio n. 5
0
        /// <summary>
        ///     Default constructor
        /// </summary>
        public PageSettings()
        {
            // Keep track of the base color for designer serialization. This is a workaround that should
            // last until the PageSettings can be redesigned.
            this._baseColor = base.Color;

            this._oHeader = new HeaderInformation(PageInformationBorder.Bottom, InformationType.DocumentName, InformationType.Nothing, InformationType.PageNumber);
            this._oFooter = new FooterInformation(PageInformationBorder.Top, InformationType.Nothing, InformationType.Nothing, InformationType.Nothing);
            this._sFontMagnification = 0;
            this._eColorMode = PrintColorMode.Normal;

            // Set default margins to 1/2 inch (50/100ths)
            base.Margins.Top = 50;
            base.Margins.Left = 50;
            base.Margins.Right = 50;
            base.Margins.Bottom = 50;
        }
Esempio n. 6
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public PageSettings()
        {
            // Keep track of the base color for designer serialization. This is a workaround that should
            // last until the PageSettings can be redesigned.
            baseColor = base.Color;


            m_oHeader            = new HeaderInformation(PageInformationBorder.Bottom, InformationType.DocumentName, InformationType.Nothing, InformationType.PageNumber);
            m_oFooter            = new FooterInformation(PageInformationBorder.Top, InformationType.Nothing, InformationType.Nothing, InformationType.Nothing);
            m_sFontMagnification = 0;
            m_eColorMode         = PrintColorMode.Normal;

            // Set default margins to 1/2 inch (50/100ths)
            base.Margins.Top    = 50;
            base.Margins.Left   = 50;
            base.Margins.Right  = 50;
            base.Margins.Bottom = 50;
        }
Esempio n. 7
0
 private void ResetColorMode()
 {
     m_eColorMode = PrintColorMode.Normal;
 }
Esempio n. 8
0
		private void ResetColorMode()
		{
			m_eColorMode = PrintColorMode.Normal;
		}