Example #1
0
        public int NumeralVariant;              //(Integer) The variant of the digit format to use.

        /// <summary>
        /// Constructor using all defaults for the style.
        /// </summary>
        public StyleInfo()
        {
            BColorLeft = BColorRight = BColorTop = BColorBottom = System.Drawing.Color.Black;                   // (Color) Color of the bottom border
            BStyleLeft = BStyleRight = BStyleTop = BStyleBottom = BorderStyleEnum.None;
            // _BorderWdith
            BWidthLeft = BWidthRight = BWidthTop = BWidthBottom = 1;

            BackgroundColor            = System.Drawing.Color.Empty;
            BackgroundColorText        = string.Empty;
            BackgroundGradientType     = BackgroundGradientTypeEnum.None;
            BackgroundGradientEndColor = System.Drawing.Color.Empty;
            BackgroundImage            = null;

            FontStyle   = FontStyleEnum.Normal;
            _FontFamily = "Arial";
            FontSize    = 10;
            FontWeight  = FontWeightEnum.Normal;

            TextDecoration       = TextDecorationEnum.None;
            TextAlign            = TextAlignEnum.General;
            VerticalAlign        = VerticalAlignEnum.Top;
            Color                = System.Drawing.Color.Black;
            ColorText            = "Black";
            PaddingLeft          = PaddingRight = PaddingTop = PaddingBottom = 0;
            LineHeight           = 0;
            Direction            = DirectionEnum.LTR;
            WritingMode          = WritingModeEnum.lr_tb;
            Language             = "en-US";
            UnicodeBiDirectional = UnicodeBiDirectionalEnum.Normal;
            Calendar             = CalendarEnum.Gregorian;
            NumeralLanguage      = Language;
            NumeralVariant       = 1;
        }
Example #2
0
        /// <summary>
        /// Returns the font style (normal or italic).
        /// </summary>
        /// <param name="v"></param>
        /// <param name="def"></param>
        /// <returns></returns>
        public static FontStyleEnum GetFontStyle(string v, FontStyleEnum def)
        {
            FontStyleEnum f;

            try
            {
                f = (FontStyleEnum)Enum.Parse(typeof(FontStyleEnum), v);
            }
            catch
            {
                f = def;
            }

            return(f);
        }
        /// <summary>
        /// Returns the font style (normal or italic).
        /// </summary>
        /// <param name="v"></param>
        /// <param name="def"></param>
        /// <returns></returns>
        public static FontStyleEnum GetFontStyle(string v, FontStyleEnum def)
        {
            FontStyleEnum f;

            switch (v.ToLower())
            {
            case "normal":
                f = FontStyleEnum.Normal;
                break;

            case "italic":
                f = FontStyleEnum.Italic;
                break;

            default:
                f = def;
                break;
            }
            return(f);
        }
Example #4
0
        public int NumeralVariant;              //(Integer) The variant of the digit format to use.

        /// <summary>
        /// Constructor using all defaults for the style.
        /// </summary>
        public StyleInfo()
        {
            BColorLeft = BColorRight = BColorTop = BColorBottom = System.Drawing.Color.Black;                   // (Color) Color of the bottom border
            BStyleLeft = BStyleRight = BStyleTop = BStyleBottom = BorderStyleEnum.None;
            // _BorderWdith
            BWidthLeft = BWidthRight = BWidthTop = BWidthBottom = 1;

            BackgroundColor            = System.Drawing.Color.Empty;
            BackgroundColorText        = string.Empty;
            BackgroundGradientType     = BackgroundGradientTypeEnum.None;
            BackgroundGradientEndColor = System.Drawing.Color.Empty;
            BackgroundImage            = null;

            FontStyle   = FontStyleEnum.Normal;
            _FontFamily = "Arial";
            //WRP 291008 numFmtId should be 0 (Zero) for General format - will be interpreted as a string
            //It has default values in Excel07 as per ECMA-376 standard (SEction 3.8.30) for Office Open XML Excel07
            _Format    = "General";
            FontSize   = 10;
            FontWeight = FontWeightEnum.Normal;

            PatternType          = patternTypeEnum.None;
            TextDecoration       = TextDecorationEnum.None;
            TextAlign            = TextAlignEnum.General;
            VerticalAlign        = VerticalAlignEnum.Top;
            Color                = System.Drawing.Color.Black;
            ColorText            = "Black";
            PaddingLeft          = PaddingRight = PaddingTop = PaddingBottom = 0;
            LineHeight           = 0;
            Direction            = DirectionEnum.LTR;
            WritingMode          = WritingModeEnum.lr_tb;
            Language             = "en-US";
            UnicodeBiDirectional = UnicodeBiDirectionalEnum.Normal;
            Calendar             = CalendarEnum.Gregorian;
            NumeralLanguage      = Language;
            NumeralVariant       = 1;
        }
Example #5
0
		/// <summary>
		/// Returns the font style (normal or italic).
		/// </summary>
		/// <param name="v"></param>
		/// <param name="def"></param>
		/// <returns></returns>
		public static FontStyleEnum GetFontStyle(string v, FontStyleEnum def)
		{
			FontStyleEnum f;
            try
            {
                f = (FontStyleEnum)Enum.Parse(typeof(FontStyleEnum), v);
            }
            catch
            {
                f = def;
            }

            return f; 
		}
Example #6
0
		public int NumeralVariant;	//(Integer) The variant of the digit format to use.

		/// <summary>
		/// Constructor using all defaults for the style.
		/// </summary>
		public StyleInfo()
		{
			BColorLeft = BColorRight = BColorTop = BColorBottom = System.Drawing.Color.Black;	// (Color) Color of the bottom border
			BStyleLeft = BStyleRight = BStyleTop = BStyleBottom = BorderStyleEnum.None;
			// _BorderWdith
			BWidthLeft = BWidthRight = BWidthTop = BWidthBottom = 1;

			BackgroundColor = System.Drawing.Color.Empty;
            BackgroundColorText = string.Empty;
			BackgroundGradientType = BackgroundGradientTypeEnum.None;
			BackgroundGradientEndColor = System.Drawing.Color.Empty;
			BackgroundImage = null;

			FontStyle = FontStyleEnum.Normal;
			_FontFamily = "Arial";
            //WRP 291008 numFmtId should be 0 (Zero) for General format - will be interpreted as a string
            //It has default values in Excel07 as per ECMA-376 standard (SEction 3.8.30) for Office Open XML Excel07
            _Format = "General";  
			FontSize = 10;
			FontWeight = FontWeightEnum.Normal;

			PatternType = patternTypeEnum.None;
			TextDecoration = TextDecorationEnum.None;
			TextAlign = TextAlignEnum.General;
			VerticalAlign = VerticalAlignEnum.Top;
			Color = System.Drawing.Color.Black;
            ColorText = "Black";
            PaddingLeft = PaddingRight = PaddingTop = PaddingBottom = 0;
			LineHeight = 0;
			Direction = DirectionEnum.LTR;
			WritingMode = WritingModeEnum.lr_tb;
			Language = "en-US";
			UnicodeBiDirectional = UnicodeBiDirectionalEnum.Normal;
			Calendar = CalendarEnum.Gregorian;
			NumeralLanguage = Language;
			NumeralVariant=1;
		}
Example #7
0
		/// <summary>
		/// Returns the font style (normal or italic).
		/// </summary>
		/// <param name="v"></param>
		/// <param name="def"></param>
		/// <returns></returns>
		public static FontStyleEnum GetFontStyle(string v, FontStyleEnum def)
		{
			FontStyleEnum f;
			switch (v.ToLower())
			{
				case "normal":
					f = FontStyleEnum.Normal;
					break;
				case "italic":
					f = FontStyleEnum.Italic;
					break;
				default:
					f = def;
					break;
			}
			return f;
		}
Example #8
0
		public int NumeralVariant;	//(Integer) The variant of the digit format to use.

		/// <summary>
		/// Constructor using all defaults for the style.
		/// </summary>
		public StyleInfo()
		{
			BColorLeft = BColorRight = BColorTop = BColorBottom = System.Drawing.Color.Black;	// (Color) Color of the bottom border
			BStyleLeft = BStyleRight = BStyleTop = BStyleBottom = BorderStyleEnum.None;
			// _BorderWdith
			BWidthLeft = BWidthRight = BWidthTop = BWidthBottom = 1;

			BackgroundColor = System.Drawing.Color.Empty;
			BackgroundGradientType = BackgroundGradientTypeEnum.None;
			BackgroundGradientEndColor = System.Drawing.Color.Empty;
			BackgroundImage = null;

			FontStyle = FontStyleEnum.Normal;
			_FontFamily = "Arial";
			FontSize = 10;
			FontWeight = FontWeightEnum.Normal;

			TextDecoration = TextDecorationEnum.None;
			TextAlign = TextAlignEnum.Left;
			VerticalAlign = VerticalAlignEnum.Top;
			Color = System.Drawing.Color.Black;
			PaddingLeft = PaddingRight = PaddingTop = PaddingBottom = 0;
			LineHeight = 0;
			Direction = DirectionEnum.LTR;
			WritingMode = WritingModeEnum.lr_tb;
			Language = "en-US";
			UnicodeBiDirectional = UnicodeBiDirectionalEnum.Normal;
			Calendar = CalendarEnum.Gregorian;
			NumeralLanguage = Language;
			NumeralVariant=1;
		}
Example #9
0
 public void SetFontStyle(FontStyleEnum style)
 {
     fontStyle = style;
 }