private void OpenPrivateWindow(IPAddress remoteClientIP, string clientName, string initMsg)
 {
     if (client.Connected)
     {
         PrivateChatScreen privateWindow = new PrivateChatScreen(client, remoteClientIP, clientName, initMsg);
         chatList.Add(privateWindow);
         privateWindow.FormClosed += new FormClosedEventHandler(privateWindow_formClosed);
         privateWindow.Show(this);
     }
 }
 private void OpenPrivateWindow(IPAddress remoteClientIP, string clientName)
 {
     if (client.Connected)
     {
         if (!IsPrivateWindowOpened(clientName))
         {
             PrivateChatScreen privateWindow = new PrivateChatScreen(client, remoteClientIP, clientName);
             chatList.Add(privateWindow);
             privateWindow.FormClosed   += new FormClosedEventHandler(privateWindow_formClosed);
             privateWindow.StartPosition = FormStartPosition.CenterParent;
             privateWindow.Show(this);
         }
     }
 }
        private void RemoveFromList(string name)
        {
            ListViewItem item = listView_Users.FindItemWithText(name);

            if (item.Text != client.ClientIP.ToString())
            {
                listView_Users.Items.Remove(item);
                Utils.PlaySound(Utils.SoundType.Exit);
            }

            //close any private chats that might be upon on clients' screens
            PrivateChatScreen target = FindPrivateChat(name);

            if (target != null)
            {
                target.Close();
            }
        }