Esempio n. 1
0
 public BorderProperties(BorderStyleValues? borderStyle, UInt32Value color)
 {
     this.borderStyle = borderStyle;
     this.color = color;
 }
        public void RegisterBorder(string name, BorderStyleValues left = BorderStyleValues.None, BorderStyleValues top = BorderStyleValues.None, 
																						BorderStyleValues right = BorderStyleValues.None, BorderStyleValues bottom = BorderStyleValues.None)
        {
            RegisterBorder(name, new Border
            {
                LeftBorder = new LeftBorder { Style = left },
                RightBorder = new RightBorder { Style = right },
                TopBorder = new TopBorder { Style = top },
                BottomBorder = new BottomBorder { Style = bottom },
                DiagonalBorder = new DiagonalBorder()
            });
        }
Esempio n. 3
0
 /// <summary>
 /// Set the vertical border with a border style and a color.
 /// </summary>
 /// <param name="BorderStyle">The border style. Default is none.</param>
 /// <param name="BorderColor">The border color.</param>
 public void SetVerticalBorder(BorderStyleValues BorderStyle, System.Drawing.Color BorderColor)
 {
     this.Border.VerticalBorder.BorderStyle = BorderStyle;
     this.Border.VerticalBorder.Color = BorderColor;
 }
Esempio n. 4
0
 /// <summary>
 /// Set the vertical border with a border style and a theme color, modifying the theme color with a tint value.
 /// </summary>
 /// <param name="BorderStyle">The border style. Default is none.</param>
 /// <param name="BorderColor">The theme color to be used.</param>
 /// <param name="Tint">The tint applied to the theme color, ranging from -1.0 to 1.0. Negative tints darken the theme color and positive tints lighten the theme color.</param>
 public void SetVerticalBorder(BorderStyleValues BorderStyle, SLThemeColorIndexValues BorderColor, double Tint)
 {
     this.Border.VerticalBorder.BorderStyle = BorderStyle;
     this.Border.VerticalBorder.SetBorderThemeColor(BorderColor, Tint);
 }
Esempio n. 5
0
 /// <summary>
 /// Set the right border with a border style and a color.
 /// </summary>
 /// <param name="BorderStyle">The border style. Default is none.</param>
 /// <param name="BorderColor">The border color.</param>
 public void SetRightBorder(BorderStyleValues BorderStyle, System.Drawing.Color BorderColor)
 {
     this.Border.RightBorder.BorderStyle = BorderStyle;
     this.Border.RightBorder.Color = BorderColor;
 }
Esempio n. 6
0
 /// <summary>
 /// Set the top border with a border style and a theme color.
 /// </summary>
 /// <param name="BorderStyle">The border style. Default is none.</param>
 /// <param name="BorderColor">The theme color to be used.</param>
 public void SetTopBorder(BorderStyleValues BorderStyle, SLThemeColorIndexValues BorderColor)
 {
     this.Border.TopBorder.BorderStyle = BorderStyle;
     this.Border.TopBorder.SetBorderThemeColor(BorderColor);
 }
Esempio n. 7
0
 /// <summary>
 /// Set the horizontal border with a border style and a color.
 /// </summary>
 /// <param name="BorderStyle">The border style. Default is none.</param>
 /// <param name="BorderColor">The border color.</param>
 public void SetHorizontalBorder(BorderStyleValues BorderStyle, System.Drawing.Color BorderColor)
 {
     this.Border.HorizontalBorder.BorderStyle = BorderStyle;
     this.Border.HorizontalBorder.Color = BorderColor;
 }
Esempio n. 8
0
 /// <summary>
 /// Set the horizontal border with a border style and a theme color.
 /// </summary>
 /// <param name="BorderStyle">The border style. Default is none.</param>
 /// <param name="BorderColor">The theme color to be used.</param>
 public void SetHorizontalBorder(BorderStyleValues BorderStyle, SLThemeColorIndexValues BorderColor)
 {
     this.Border.HorizontalBorder.BorderStyle = BorderStyle;
     this.Border.HorizontalBorder.SetBorderThemeColor(BorderColor);
 }
Esempio n. 9
0
        internal void FromBorderPropertiesType(HorizontalBorder border)
        {
            if (border.Color != null)
            {
                this.clrReal = new SLColor(this.listThemeColors, this.listIndexedColors);
                this.clrReal.FromSpreadsheetColor(border.Color);
                HasColor = !this.clrReal.IsEmpty();
            }
            else
            {
                RemoveColor();
            }

            if (border.Style != null) this.BorderStyle = border.Style.Value;
            else RemoveBorderStyle();
        }
Esempio n. 10
0
 /// <summary>
 /// Remove any existing border style.
 /// </summary>
 public void RemoveBorderStyle()
 {
     this.vBorderStyle = BorderStyleValues.None;
     HasBorderStyle = false;
 }
Esempio n. 11
0
 /// <summary>
 /// Set the diagonal border with a border style and a theme color.
 /// </summary>
 /// <param name="BorderStyle">The border style. Default is none.</param>
 /// <param name="BorderColor">The theme color to be used.</param>
 public void SetDiagonalBorder(BorderStyleValues BorderStyle, SLThemeColorIndexValues BorderColor)
 {
     this.DiagonalBorder.BorderStyle = BorderStyle;
     this.DiagonalBorder.SetBorderThemeColor(BorderColor);
 }
Esempio n. 12
0
 /// <summary>
 /// Set the diagonal border with a border style and a color.
 /// </summary>
 /// <param name="BorderStyle">The border style. Default is none.</param>
 /// <param name="BorderColor">The border color.</param>
 public void SetDiagonalBorder(BorderStyleValues BorderStyle, System.Drawing.Color BorderColor)
 {
     this.DiagonalBorder.BorderStyle = BorderStyle;
     this.DiagonalBorder.Color = BorderColor;
 }
Esempio n. 13
0
        internal string GetBorderStyleAttribute(BorderStyleValues bsv)
        {
            string result = "none";
            switch (bsv)
            {
                case BorderStyleValues.DashDot:
                    result = "dashDot";
                    break;
                case BorderStyleValues.DashDotDot:
                    result = "dashDotDot";
                    break;
                case BorderStyleValues.Dashed:
                    result = "dashed";
                    break;
                case BorderStyleValues.Dotted:
                    result = "dotted";
                    break;
                case BorderStyleValues.Double:
                    result = "double";
                    break;
                case BorderStyleValues.Hair:
                    result = "hair";
                    break;
                case BorderStyleValues.Medium:
                    result = "medium";
                    break;
                case BorderStyleValues.MediumDashDot:
                    result = "mediumDashDot";
                    break;
                case BorderStyleValues.MediumDashDotDot:
                    result = "mediumDashDotDot";
                    break;
                case BorderStyleValues.MediumDashed:
                    result = "mediumDashed";
                    break;
                case BorderStyleValues.None:
                    result = "none";
                    break;
                case BorderStyleValues.SlantDashDot:
                    result = "slantDashDot";
                    break;
                case BorderStyleValues.Thick:
                    result = "thick";
                    break;
                case BorderStyleValues.Thin:
                    result = "thin";
                    break;
            }

            return result;
        }