コード例 #1
0
ファイル: CustomButtonStyle.cs プロジェクト: NTDLS/SyntaxBox
        private ShapeRectangle ConvertShape(ButtonBorder border)
        {
            ShapeRectangle shape = null;

            switch (border)
            {
            case ButtonBorder.Rectangle:
                shape = new ShapeRectangle(0, 0, _width - 1, _height - 1);
                break;

            case ButtonBorder.RoundRectangle:
                shape = new ShapeRoundRectangle(0, 0, _width - 1, _height - 1, _cornerRadius);
                break;

            case ButtonBorder.Ellipse:
                shape = new ShapeEllipse(0, 0, _width - 1, _height - 1);
                break;
            }
            if (shape != null)
            {
                shape.Brush = _fillBrushNormal;
                shape.Pen   = _borderPenNormal;
            }
            return(shape);
        }
コード例 #2
0
ファイル: GroupPanel.cs プロジェクト: NTDLS/SyntaxBox
        public GroupPanel()
        {
            _shape = new ShapeRoundRectangle(new Rectangle(0, 0, 100, 100), 6);

            _fillColor   = Color.Transparent;
            _borderColor = SystemColors.ControlDark;

            _shape.Pen   = new Pen(_borderColor);
            _shape.Brush = new SolidBrush(_fillColor);
        }