예제 #1
0
 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);
     }
 }
예제 #2
0
 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);
         }
     }
 }
예제 #3
0
        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();
            }
        }