ATMLCommonLibrary.controls.awb.ScrollBox.btnDrop_Paint C# (CSharp) Method

btnDrop_Paint() private method

private btnDrop_Paint ( object sender, PaintEventArgs e ) : void
sender object
e PaintEventArgs
return void
        private void btnDrop_Paint(object sender, PaintEventArgs e)
        {
            int width = btnDrop.Width;
            int height = btnDrop.Height;
            int center = width/2;
            //e.Graphics.FillRectangle(Brushes.White, 0, 0, width, height);
            //var pt1 = new Point(width/2, 0);
            //var pt2 = new Point(width/2, height);
            //e.Graphics.DrawLine(Pens.Black, width/2, 3, width/2, height - 3);

            if (_currentIndex > 0)
            {
                //--------------------------//
                //--- Draw Upper Trangle ---//
                //--------------------------//
                e.Graphics.DrawLine(Pens.Gray, center - 3, _buttonPadding + 3, center + 3, _buttonPadding + 3);
                e.Graphics.DrawLine(Pens.Gray, center - 2, _buttonPadding + 2, center + 2, _buttonPadding + 2);
                e.Graphics.DrawLine(Pens.Gray, center - 1, _buttonPadding + 1, center + 1, _buttonPadding + 1);
                e.Graphics.DrawLine(Pens.Gray, center - 0, _buttonPadding + 0, center + 0, _buttonPadding + 3);
            }

            if (_currentIndex < (_values.Count - 1))
            {
                //--------------------------//
                //--- Draw Lower Trangle ---//
                //--------------------------//
                e.Graphics.DrawLine(Pens.Gray, center - 3, ( height - _buttonPadding ) - 5, center + 3, ( height - _buttonPadding ) - 5 );
                e.Graphics.DrawLine(Pens.Gray, center - 2, ( height - _buttonPadding ) - 4, center + 2, ( height - _buttonPadding ) - 4 );
                e.Graphics.DrawLine(Pens.Gray, center - 1, ( height - _buttonPadding ) - 3, center + 1, ( height - _buttonPadding ) - 3 );
                e.Graphics.DrawLine(Pens.Gray, center - 0, ( height - _buttonPadding ) - 2, center + 0, ( height - _buttonPadding ) - 5 );
            }

            HideCaret(edtValue.Handle);
        }