System.Windows.Forms.HexBox.OnPaint C# (CSharp) Method

OnPaint() protected method

Paints the hex box.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs A PaintEventArgs that contains the event data.
return void
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            if(_byteProvider == null)
                return;

            // draw only in the content rectangle, so exclude the border and the scrollbar.
            Region r = new Region(ClientRectangle);
            r.Exclude(_recContent);
            e.Graphics.ExcludeClip(r);

            UpdateVisibilityBytes();

            if(_lineInfoVisible)
                PaintLineInfo(e.Graphics, _startByte, _endByte);

            if(!_stringViewVisible)
            {
                PaintHex(e.Graphics, _startByte, _endByte);
            }
            else
            {
                PaintHexAndStringView(e.Graphics, _startByte, _endByte);
                if(_shadowSelectionVisible)
                    PaintCurrentBytesSign(e.Graphics);
            }
        }