private void RoomMessage(frmChat frm, string roomID, LiveCodingChat.Xmpp.MessageReceivedEventArgs e) { if (frm.InvokeRequired) { frm.Invoke(new MethodInvoker(delegate() { RoomMessage(frm, roomID, e); })); return; } frm.Activate(); frm.AddMessage(roomID, e); }
private void RoomMessage(frmChat frm,LiveCodingChat.Xmpp.MessageReceivedEventArgs e) { if (frm.InvokeRequired) { frm.Invoke(new MethodInvoker(delegate() { RoomMessage(frm, e); })); return; } frm.Activate(); frm.AddMessage(e); }
private void CreateForm() { if (this.InvokeRequired) { this.Invoke(new MethodInvoker(delegate() { CreateForm(); })); } else { if (chatForms.Count == 0) { chatForms.Add(new frmChat()); } frmChat frm = chatForms [0]; frm.AddTabPage(frm.CreateTabPage(room.Room)); frm.Show(); frm.Activate(); channels.Add(room.Room.ID, frm); } }