private void chatWithClientToolStripMenuItem_Click(object sender, EventArgs e) { foreach (var client in from ListViewItem item in lstClients.SelectedItems select(CLient) item.Tag) { client.Send("Chat|"); pChat = new PrivateChat(this); pChat.Show(); } }
private void NewChatWindow(string username) { string chatWith = username; if (!openChat.ContainsKey(chatWith)) { var chat = new PrivateChat(openChat, chatWith, clientManager); chat.Show(); openChat.Add(chatWith, chat); } openChat[chatWith].BringToFront(); }