/// <summary> /// Format the border /// </summary> /// <param name="p_Style">The style.</param> /// <param name="p_width">The width.</param> /// <param name="p_ShadowColor">Color of the shadow.</param> /// <param name="p_LightColor">Color of the light.</param> /// <returns></returns> public static RectangleBorder FormatBorder(CommonBorderStyle p_Style, int p_width, Color p_ShadowColor, Color p_LightColor) { RectangleBorder l_Border = new RectangleBorder(new Border(Color.White)); if (p_Style == CommonBorderStyle.Inset) { l_Border.Top = new Border(p_ShadowColor, p_width); l_Border.Left = new Border(p_ShadowColor, p_width); l_Border.Bottom = new Border(p_LightColor, p_width); l_Border.Right = new Border(p_LightColor, p_width); } else if (p_Style == CommonBorderStyle.Raised) { l_Border.Top = new Border(p_LightColor, p_width); l_Border.Left = new Border(p_LightColor, p_width); l_Border.Bottom = new Border(p_ShadowColor, p_width); l_Border.Right = new Border(p_ShadowColor, p_width); } else { l_Border.Top = new Border(p_ShadowColor, p_width); l_Border.Left = new Border(p_ShadowColor, p_width); l_Border.Bottom = new Border(p_ShadowColor, p_width); l_Border.Right = new Border(p_ShadowColor, p_width); } return(l_Border); }
/// <summary> /// Initializes a new instance of the <see cref="Header"/> class. /// </summary> /// <remarks> /// Copy Constructor. This method duplicates all the reference field (Image, Font, StringFormat) creating a new instance. /// </remarks> /// <param name="source">The source.</param> /// <param name="isReadOnly">if set to <c>true</c> is read only.</param> public Header(Header source, bool isReadOnly) : base(source, isReadOnly) { this.borderStyle = source.borderStyle; this.headerTopLeftWidth = source.headerTopLeftWidth; this.headerBottomRightWidth = source.headerBottomRightWidth; this.headerLightColor = source.headerLightColor; this.headerShadowColor = source.headerShadowColor; this.ExpandedCell = false; }
/// <summary> /// Format the border /// </summary> /// <param name="p_Style">The style.</param> /// <param name="p_width">The width.</param> /// <param name="p_ShadowColor">Color of the shadow.</param> /// <param name="p_LightColor">Color of the light.</param> /// <returns></returns> public static RectangleBorder FormatBorder(CommonBorderStyle p_Style, int p_width, Color p_ShadowColor, Color p_LightColor) { RectangleBorder l_Border = new RectangleBorder(new Border(Color.White)); if (p_Style == CommonBorderStyle.Inset) { l_Border.Top = new Border(p_ShadowColor, p_width); l_Border.Left = new Border(p_ShadowColor, p_width); l_Border.Bottom = new Border(p_LightColor, p_width); l_Border.Right = new Border(p_LightColor, p_width); } else if (p_Style == CommonBorderStyle.Raised) { l_Border.Top = new Border(p_LightColor, p_width); l_Border.Left = new Border(p_LightColor, p_width); l_Border.Bottom = new Border(p_ShadowColor, p_width); l_Border.Right = new Border(p_ShadowColor, p_width); } else { l_Border.Top = new Border(p_ShadowColor, p_width); l_Border.Left = new Border(p_ShadowColor, p_width); l_Border.Bottom = new Border(p_ShadowColor, p_width); l_Border.Right = new Border(p_ShadowColor, p_width); } return l_Border; }