コード例 #1
0
        private Rectangle GetElement(int amount, Point startingPoint)
        {
            int Height = bodyRectangle.Height / amount;
            int Width  = bodyRectangle.Width;

            Rectangle partRectangle = new Rectangle(startingPoint.X, startingPoint.Y, Width, Height);

            return(RectFactory.CreateRect(partRectangle, new Padding(10, 10, 10, 10)));
        }
コード例 #2
0
 public CustomButton(Rectangle ButtonRect, Padding ButtonPadding, AppData data, Color ButtonFillColor, Color ButtonOutlineColor, Color ButtonHighlightColor, Color ButtonPressedColor) : base(ButtonRect, ButtonPadding, data)
 {
     rectangle         = RectFactory.CreateRect(ButtonRect, ButtonPadding);
     highlightingColor = ButtonHighlightColor;
     padding           = ButtonPadding;
     currentColor      = ButtonFillColor;
     fillColor         = ButtonFillColor;
     outlineColor      = ButtonOutlineColor;
     highlightingColor = ButtonHighlightColor;
     pressedColor      = ButtonPressedColor;
 }
コード例 #3
0
 public CustomElement(Rectangle ButtonRect, Padding ButtonPadding, AppData appData)
 {
     data      = appData;
     rectangle = RectFactory.CreateRect(ButtonRect, ButtonPadding);
     padding   = ButtonPadding;
 }
コード例 #4
0
 public CustomLabel(Rectangle ButtonRect, Padding ButtonPadding, AppData data, string content) : base(ButtonRect, ButtonPadding, data)
 {
     rectangle = RectFactory.CreateRect(ButtonRect, ButtonPadding);
     padding   = ButtonPadding;
     SetText(content, new Font("Arial", 12), 12, Color.Black);
 }
コード例 #5
0
 public void ResizeInParent(Rectangle parent)
 {
     rectangle = RectFactory.CreateRect(parent, padding);
 }