public void RenderAll(Graphics g)
{
try
{
Control.InitVars();
Control.InitScrollbars();
SetBrackets();
SetSpanIndicators();
int j = Control.View.FirstVisibleRow;
int diff = j - LastRow;
LastRow = j;
if (Control.SmoothScroll)
{
if (diff == 1)
{
for (int i = Control.View.RowHeight; i > 0; i -= Control.SmoothScrollSpeed)
{
yOffset = i + Control.View.YOffset;
RenderAll2();
g.Flush();
Thread.Sleep(0);
}
}
else if (diff == -1)
{
for (int i = -Control.View.RowHeight; i < 0; i += Control.SmoothScrollSpeed)
{
yOffset = i + Control.View.YOffset;
RenderAll2();
g.Flush();
Thread.Sleep(0);
}
}
}
yOffset = Control.View.YOffset;
RenderAll2();
//g.Flush ();
//System.Threading.Thread.Sleep (0);
}
catch {}
}