private PictureBox AddBitmapToDebug(Bitmap bmp)
{
if (debugPanel != null)
{
PictureBox b = new PictureBox();
b.SizeMode = PictureBoxSizeMode.AutoSize;
b.Image = bmp;
debugPanel.Controls.Add(b);
debugPanel.Controls.SetChildIndex(b, 0);
return b;
}
else
return null;
}