private void redraw() { this.flowLayoutPanel1.Controls.Clear(); foreach (WappMessage msg in this.messages) { ListChat chat = new ListChat(msg); this.flowLayoutPanel1.Controls.Add(chat); } }
private void addChatMessage(WappMessage message) { ListChat lc = new ListChat(message); this.flowLayoutPanel1.Controls.Add(lc); while (this.flowLayoutPanel1.Controls.Count > MESSAGE_LIMIT) { this.flowLayoutPanel1.Controls.Remove(this.flowLayoutPanel1.Controls[0]); } }