Example #1
0
 /// <summary>
 /// Construct a RectangleBorder with the specified Right and Bottom border and a 0 Left and Top border
 /// </summary>
 /// <param name="p_Right"></param>
 /// <param name="p_Bottom"></param>
 public RectangleBorder(BorderLine p_Right, BorderLine p_Bottom)
 {
     Right = p_Right;
     Bottom = p_Bottom;
     Top = new BorderLine(Color.White, 0);
     Left = new BorderLine(Color.White, 0);
 }
Example #2
0
 /// <summary>
 /// Construct a RectangleBorder with the specified Right and Bottom border and a 0 Left and Top border
 /// </summary>
 /// <param name="p_Right"></param>
 /// <param name="p_Bottom"></param>
 public RectangleBorder(BorderLine p_Right, BorderLine p_Bottom)
 {
     m_Right  = p_Right;
     m_Bottom = p_Bottom;
     m_Top    = new BorderLine(Color.White, 0);
     m_Left   = new BorderLine(Color.White, 0);
 }
Example #3
0
 /// <summary>
 /// Construct a RectangleBorder with the specified borders
 /// </summary>
 /// <param name="p_Top"></param>
 /// <param name="p_Bottom"></param>
 /// <param name="p_Left"></param>
 /// <param name="p_Right"></param>
 public RectangleBorder(BorderLine p_Top, BorderLine p_Bottom, BorderLine p_Left, BorderLine p_Right)
 {
     Top = p_Top;
     Bottom = p_Bottom;
     Left = p_Left;
     Right = p_Right;
 }
Example #4
0
 /// <summary>
 /// Construct a RectangleBorder with the specified borders
 /// </summary>
 /// <param name="p_Top"></param>
 /// <param name="p_Bottom"></param>
 /// <param name="p_Left"></param>
 /// <param name="p_Right"></param>
 public RectangleBorder(BorderLine p_Top, BorderLine p_Bottom, BorderLine p_Left, BorderLine p_Right)
 {
     Top    = p_Top;
     Bottom = p_Bottom;
     Left   = p_Left;
     Right  = p_Right;
 }
Example #5
0
 /// <summary>
 /// Construct a RectangleBorder with the same border on all the side
 /// </summary>
 /// <param name="p_Border"></param>
 public RectangleBorder(BorderLine p_Border)
 {
     Top    = p_Border;
     Bottom = p_Border;
     Left   = p_Border;
     Right  = p_Border;
 }
Example #6
0
 /// <summary>
 /// Construct a RectangleBorder with the specified Right and Bottom border and a 0 Left and Top border
 /// </summary>
 /// <param name="p_Right"></param>
 /// <param name="p_Bottom"></param>
 public RectangleBorder(BorderLine p_Right, BorderLine p_Bottom)
 {
     Right  = p_Right;
     Bottom = p_Bottom;
     Top    = new BorderLine(Color.White, 0);
     Left   = new BorderLine(Color.White, 0);
 }
Example #7
0
 /// <summary>
 /// Construct a RectangleBorder with the specified borders
 /// </summary>
 /// <param name="p_Top"></param>
 /// <param name="p_Bottom"></param>
 /// <param name="p_Left"></param>
 /// <param name="p_Right"></param>
 public RectangleBorder(BorderLine p_Top, BorderLine p_Bottom, BorderLine p_Left, BorderLine p_Right)
 {
     m_Top    = p_Top;
     m_Bottom = p_Bottom;
     m_Left   = p_Left;
     m_Right  = p_Right;
 }
Example #8
0
 /// <summary>
 /// Construct a RectangleBorder with the same border on all the side
 /// </summary>
 /// <param name="p_Border"></param>
 public RectangleBorder(BorderLine p_Border)
 {
     Top = p_Border;
     Bottom = p_Border;
     Left = p_Border;
     Right = p_Border;
 }
Example #9
0
 /// <summary>
 /// Construct a RectangleBorder with the same border on all the side
 /// </summary>
 /// <param name="p_Border"></param>
 public RectangleBorder(BorderLine p_Border)
 {
     m_Top    = p_Border;
     m_Bottom = p_Border;
     m_Left   = p_Border;
     m_Right  = p_Border;
 }
Example #10
0
        /// <summary>
        /// Change the color of the current struct instance and return a copy of the modified struct.
        /// </summary>
        /// <param name="p_Color"></param>
        /// <returns></returns>
        public RectangleBorder SetColor(Color p_Color)
        {
            Top    = new BorderLine(p_Color, Top.Width, Top.DashStyle, Top.Padding);
            Bottom = new BorderLine(p_Color, Bottom.Width, Bottom.DashStyle, Bottom.Padding);
            Left   = new BorderLine(p_Color, Left.Width, Left.DashStyle, Left.Padding);
            Right  = new BorderLine(p_Color, Right.Width, Right.DashStyle, Right.Padding);

            return(this);
        }
Example #11
0
        /// <summary>
        /// Change the width of the current struct instance and return a copy of the modified struct.
        /// </summary>
        /// <returns></returns>
        public RectangleBorder SetPadding(int padding)
        {
            Top    = new BorderLine(Top.Color, Top.Width, Top.DashStyle, padding);
            Bottom = new BorderLine(Bottom.Color, Bottom.Width, Bottom.DashStyle, padding);
            Left   = new BorderLine(Left.Color, Left.Width, Left.DashStyle, padding);
            Right  = new BorderLine(Right.Color, Right.Width, Right.DashStyle, padding);

            return(this);
        }
Example #12
0
        /// <summary>
        /// Change the width of the current struct instance and return a copy of the modified struct.
        /// </summary>
        /// <param name="p_Width"></param>
        /// <returns></returns>
        public RectangleBorder SetWidth(int p_Width)
        {
            Top    = new BorderLine(Top.Color, p_Width, Top.DashStyle, Top.Padding);
            Bottom = new BorderLine(Bottom.Color, p_Width, Bottom.DashStyle, Bottom.Padding);
            Left   = new BorderLine(Left.Color, p_Width, Left.DashStyle, Left.Padding);
            Right  = new BorderLine(Right.Color, p_Width, Right.DashStyle, Right.Padding);

            return(this);
        }
Example #13
0
        /// <summary>
        /// Change the dashStyle of the current struct instance and return a copy of the modified struct.
        /// </summary>
        /// <param name="dashStyle"></param>
        /// <returns></returns>
        public RectangleBorder SetDashStyle(System.Drawing.Drawing2D.DashStyle dashStyle)
        {
            Top    = new BorderLine(Top.Color, Top.Width, dashStyle, Top.Padding);
            Bottom = new BorderLine(Bottom.Color, Bottom.Width, dashStyle, Bottom.Padding);
            Left   = new BorderLine(Left.Color, Left.Width, dashStyle, Left.Padding);
            Right  = new BorderLine(Right.Color, Right.Width, dashStyle, Right.Padding);

            return(this);
        }
Example #14
0
        /// <summary>
        /// Change the color of the current struct instance and return a copy of the modified struct.
        /// </summary>
        /// <param name="p_Color"></param>
        /// <returns></returns>
        public RectangleBorder SetColor(Color p_Color)
        {
            Top = new BorderLine(p_Color, Top.Width, Top.DashStyle, Top.Padding);
            Bottom = new BorderLine(p_Color, Bottom.Width, Bottom.DashStyle, Bottom.Padding);
            Left = new BorderLine(p_Color, Left.Width, Left.DashStyle, Left.Padding);
            Right = new BorderLine(p_Color, Right.Width, Right.DashStyle, Right.Padding);

            return this;
        }
Example #15
0
        /// <summary>
        /// Compare to current border with another border.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj.GetType() != GetType())
            {
                return(false);
            }
            BorderLine l_Other = (BorderLine)obj;

            if (l_Other.Width == Width && l_Other.Color == Color && l_Other.DashStyle == DashStyle && l_Other.Padding == Padding)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #16
0
        /// <summary>
        /// Change the dashStyle of the current struct instance and return a copy of the modified struct.
        /// </summary>
        /// <param name="dashStyle"></param>
        /// <returns></returns>
        public RectangleBorder SetDashStyle(System.Drawing.Drawing2D.DashStyle dashStyle)
        {
            Top = new BorderLine(Top.Color, Top.Width, dashStyle, Top.Padding);
            Bottom = new BorderLine(Bottom.Color, Bottom.Width, dashStyle, Bottom.Padding);
            Left = new BorderLine(Left.Color, Left.Width, dashStyle, Left.Padding);
            Right = new BorderLine(Right.Color, Right.Width, dashStyle, Right.Padding);

            return this;
        }
Example #17
0
        /// <summary>
        /// Change the width of the current struct instance and return a copy of the modified struct.
        /// </summary>
        /// <param name="p_Width"></param>
        /// <returns></returns>
        public RectangleBorder SetWidth(int p_Width)
        {
            Top = new BorderLine(Top.Color, p_Width, Top.DashStyle, Top.Padding);
            Bottom = new BorderLine(Bottom.Color, p_Width, Bottom.DashStyle, Bottom.Padding);
            Left = new BorderLine(Left.Color, p_Width, Left.DashStyle, Left.Padding);
            Right = new BorderLine(Right.Color, p_Width, Right.DashStyle, Right.Padding);

            return this;
        }
Example #18
0
        /// <summary>
        /// Change the width of the current struct instance and return a copy of the modified struct.
        /// </summary>
        /// <returns></returns>
        public RectangleBorder SetPadding(int padding)
        {
            Top = new BorderLine(Top.Color, Top.Width, Top.DashStyle, padding);
            Bottom = new BorderLine(Bottom.Color, Bottom.Width, Bottom.DashStyle, padding);
            Left = new BorderLine(Left.Color, Left.Width, Left.DashStyle, padding);
            Right = new BorderLine(Right.Color, Right.Width, Right.DashStyle, padding);

            return this;
        }