Andwho.Windows.Forms.TabStripCloseButton.DrawCross C# (CSharp) Method

DrawCross() public method

public DrawCross ( Graphics g ) : void
g System.Drawing.Graphics
return void
        public void DrawCross(Graphics g)
        {
            if (this._mouseState == EMouseState.Move)
            {
                Color fill = this._renderer.ColorTable.ButtonSelectedHighlight;
                using (Brush brush = new SolidBrush(fill))
                {
                    g.FillRectangle(brush, this._bounds);
                    Rectangle borderRect = this._bounds;

                    borderRect.Width--;
                    borderRect.Height--;

                    g.DrawRectangle(SystemPens.Highlight, borderRect);
                }
            }
            using (Pen pen = new Pen(Color.Black))
            {
                g.DrawLine(
                    pen,
                    this._bounds.Left + 3,
                    this._bounds.Top + 3,
                    this._bounds.Right - 5,
                    this._bounds.Bottom - 4);
                g.DrawLine(
                    pen,
                    this._bounds.Right - 5,
                    this._bounds.Top + 3,
                    this._bounds.Left + 3,
                    this._bounds.Bottom - 4);
            }
        }