private void DrawScrollBarArrawTest(Graphics g)
        {
            Rectangle rect = new Rectangle(100, 50, 20, 20);

            ControlPaintEx.DrawScrollBarArraw(g, rect, Color.Black, Color.Bisque, Color.BlueViolet,
                                              Color.CadetBlue, Color.Chartreuse, Orientation.Vertical, ArrowDirection.Down, true);
        }
Exemple #2
0
        protected internal virtual void OnPaintScrollBarArrow(TCEventArgs.PaintScrollBarArrowEventArgs e)
        {
            Graphics       graphics       = e.Graphics;
            Rectangle      arrowRectangle = e.ArrowRectangle;
            ControlState   controlState   = e.ControlState;
            ArrowDirection arrowDirection = e.ArrowDirection;
            Orientation    orientation    = e.Orientation;
            bool           enabled        = e.Enabled;
            Color          backNormal     = this.BackNormal;
            Color          begin          = this.Base;
            Color          border         = this.Border;
            Color          innerBorder    = this.InnerBorder;
            Color          fore           = this.Fore;
            bool           changeColor    = false;

            if (enabled)
            {
                switch (controlState)
                {
                case ControlState.Hover:
                    begin = this.BackHover;
                    goto Label_00BD;

                case ControlState.Pressed:
                    begin       = this.BackPressed;
                    changeColor = true;
                    goto Label_00BD;
                }
                begin = this.Base;
            }
            else
            {
                backNormal = this.GetGray(backNormal);
                begin      = this.GetGray(this.Base);
                border     = this.GetGray(border);
                fore       = this.GetGray(fore);
            }
Label_00BD:
            using (new SmoothingModeGraphics(graphics))
            {
                ControlPaintEx.DrawScrollBarArraw(graphics, arrowRectangle, begin, backNormal, border, innerBorder, fore, e.Orientation, arrowDirection, changeColor);
            }
        }