private void OnScrollTick(object sender, EventArgs e)
{
// Update the offset by scroll move amount
if (_offset != 0)
{
if (_offset > 0)
_offset = Math.Max(0, _offset - SCROLL_MOVE);
else
_offset = Math.Min(0, _offset + SCROLL_MOVE);
}
// If we have finished the scrolling
if (_offset == 0)
{
_beginLine = -1;
_scrollTimer.Stop();
}
// Need to repaint to show changes
_needPaint(this, new NeedLayoutEventArgs(true));
}