private void OpenPrivateWindow(IPAddress remoteClientIP, string clientName, string initialMessage)
 {
     if (_client.Connected)
     {
         frmPrivate privateWindow = new frmPrivate(_client, remoteClientIP, clientName, initialMessage);
         _privateWindowsList.Add(privateWindow);
         privateWindow.FormClosed += new FormClosedEventHandler(privateWindow_FormClosed);
         privateWindow.Show(this);
     }
 }
 private void OpenPrivateWindow(IPAddress remoteClientIP, string clientName)
 {
     if (_client.Connected)
     {
         if (!IsPrivateWindowOpened(clientName))
         {
             frmPrivate privateWindow = new frmPrivate(_client, remoteClientIP, clientName);
             _privateWindowsList.Add(privateWindow);
             privateWindow.FormClosed   += new FormClosedEventHandler(privateWindow_FormClosed);
             privateWindow.StartPosition = FormStartPosition.CenterParent;
             privateWindow.Show(this);
         }
     }
 }
        private void RemoveFromList(string name)
        {
            ListViewItem item = lstViwUsers.FindItemWithText(name);

            if (item.Text != _client.IP.ToString())
            {
                lstViwUsers.Items.Remove(item);
                // ShareUtils.PlaySound(ShareUtils.SoundType.ClientExit);
            }

            frmPrivate target = FindPrivateWindow(name);

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