protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
if (_byteProvider == null)
return;
//System.Diagnostics.Debug.WriteLine("OnPaint " + DateTime.Now.ToString(), "HexBox");
// 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);
}
}