コード例 #1
0
ファイル: Form1.cs プロジェクト: westybsa/MP.LSharp
        public Form1()
        {
            InitializeComponent();

            CustomButtonStyle style2 = new CustomButtonStyle(customButton2.Width, customButton2.Height,ButtonBorder.RoundRectangle);
            customButton2.Style = style2;
        }
コード例 #2
0
ファイル: CustomButtonStyle.cs プロジェクト: NTDLS/SyntaxBox
        public CustomButtonStyle Clone()
        {
            CustomButtonStyle style = new CustomButtonStyle(this._width, this._height, _border);

            style.FillBrushNormal  = _fillBrushNormal;
            style.BorderPenNormal  = _borderPenNormal;
            style.FillBrushHot     = _fillBrushHot;
            style.BorderPenHot     = _borderPenHot;
            style.FillBrushPressed = _fillBrushPressed;
            style.BorderPenPressed = _borderPenPressed;

            style.CornerRadius = _cornerRadius;
            style.Shape        = ConvertShape(_border);

            return(style);
        }
コード例 #3
0
ファイル: CustomButton.cs プロジェクト: uvbs/FullSource
        public CustomButton(int width, int height)
        {
            this.Width  = width;
            this.Height = height;

            base.SetStyle(ControlStyles.StandardDoubleClick | ControlStyles.StandardClick, false);
            this.SetStyle(
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.OptimizedDoubleBuffer |
                ControlStyles.ResizeRedraw |
                ControlStyles.UserPaint |
                ControlStyles.SupportsTransparentBackColor,
                true
                );

            this.BackColor = Color.Transparent;

            _onMove    = false;
            _onPress   = false;
            _lastPoint = new Point(-1, -1);

            _style = CustomButtonStyle.CreateDefaultStyle(width, height);
        }
コード例 #4
0
ファイル: CustomButton.cs プロジェクト: itsbth/GLuaR
        public CustomButton(int width,int height)
        {
            this.Width = width;
            this.Height = height;

            base.SetStyle(ControlStyles.StandardDoubleClick | ControlStyles.StandardClick, false);
            this.SetStyle(
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.OptimizedDoubleBuffer |
                ControlStyles.ResizeRedraw |
                ControlStyles.UserPaint |
                ControlStyles.SupportsTransparentBackColor,
                true
            );

            this.BackColor = Color.Transparent;

            _onMove = false;
            _onPress = false;
            _lastPoint = new Point(-1, -1);

            _style = CustomButtonStyle.CreateDefaultStyle(width, height);
        }
コード例 #5
0
ファイル: CustomButtonStyle.cs プロジェクト: itsbth/GLuaR
        public CustomButtonStyle Clone()
        {
            CustomButtonStyle style = new CustomButtonStyle(this._width, this._height, _border);

            style.FillBrushNormal = _fillBrushNormal;
            style.BorderPenNormal = _borderPenNormal;
            style.FillBrushHot = _fillBrushHot;
            style.BorderPenHot = _borderPenHot;
            style.FillBrushPressed = _fillBrushPressed;
            style.BorderPenPressed = _borderPenPressed;

            style.CornerRadius = _cornerRadius;
            style.Shape = ConvertShape(_border);

            return style;
        }