public void Draw()
{
lock (this.CheckListItems)
{
if (rowcount == this.CheckListItems.Count)
return;
panel1.SuspendLayout();
panel1.Controls.Clear();
int y = 0;
rowcount = 0;
foreach (var item in this.CheckListItems)
{
var wrnctl = addwarningcontrol(5, y, item);
rowcount++;
y = wrnctl.Bottom;
}
}
panel1.ResumeLayout(true);
}