public void refresh() { textBox1.Text = Engine.crtPlayer.name; panel2.BackColor = Engine.crtPlayer.fillColor; panel3.Controls.Clear(); T = new FleetDisplay[Engine.crtPlayer.fleets.Count]; for (int i = 0; i < Engine.crtPlayer.fleets.Count; i++) { T[i] = new FleetDisplay(Engine.crtPlayer.fleets[i]); T[i].Location = new Point(2, T[i].Height * i + 2); T[i].Parent = panel3; T[i].isFighting = false; } }
public void refresh() { panel1.Controls.Clear(); panel2.Controls.Clear(); ADisplay = new FleetDisplay[A.Count]; BDisplay = new FleetDisplay[B.Count]; for (int i = 0; i < A.Count; i++) { ADisplay[i] = new FleetDisplay(A[i]); ADisplay[i].Location = new Point(5, 5 + i * ADisplay[i].Height); ADisplay[i].Parent = panel1; ADisplay[i].isFighting = true; ADisplay[i].refresh(); } for (int i = 0; i < B.Count; i++) { BDisplay[i] = new FleetDisplay(B[i]); BDisplay[i].Location = new Point(5, 5 + i * BDisplay[i].Height); BDisplay[i].Parent = panel2; BDisplay[i].isFighting = true; BDisplay[i].refresh(); } }