void drawFormBox(FormBox fb) { foreach (ControlBox cb in fb.ControlBoxes) { if (cb is TextBox) { drawTextBox((TextBox)cb, fb.Location); } else if (cb is TextureBox) { drawTextureBox((TextureBox)cb, fb.Location); } else if (cb is ButtonBox) { drawButtonBox((ButtonBox)cb, fb.Location); } } }
public void Add(FormBox texture) { foreach (FormBox mxt in items) { if (mxt.Name == texture.Name) { return; } } items.Add(texture); }