private void showDebug_Click(object sender, EventArgs e) { debugWindow = new DebugForm(); debugWindow.Size = new Size(190, 280); container = new List <DebugContainer>(); foreach (var player in round.player) { //window ia already the size of 1 if (player.index != 0) { Window.resize(debugWindow); } container.Add(new DebugContainer()); int x = (player.index * 190); for (int index = 0; index < 6; index++) { int y = 110 + ((index + 1) * 18); container[player.index].right.Add(Window.makeLabel(debugWindow, x + 12, y)); container[player.index].left.Add(Window.makeLabel(debugWindow, x + 90, y)); } container[player.index].cards.Add(Window.makePicture(debugWindow, x + 12, 12)); container[player.index].cards.Add(Window.makePicture(debugWindow, x + 90, 12)); } debugWindow.Show(); }
public static PictureBox makePicture(DebugForm form, int x, int y) { PictureBox pic = new PictureBox(); pic.Location = new Point(x, y); pic.Size = new Size(72, 96); pic.Image = null; pic.Parent = form; return(pic); }
public static Label makeLabel(DebugForm form, int x, int y) { Label label = new Label(); label.Location = new Point(x, y); label.AutoSize = true; label.Text = "string"; label.Parent = form; return(label); }
public static void resize(DebugForm form) { form.Size = new Size(form.Size.Width + 190, form.Size.Height); }