Beispiel #1
0
        private void UpdateClientDisconnected(object state)
        {
            ClientDisconnectedArgs args = state as ClientDisconnectedArgs;

            //we know that there's a client by that name
            foreach (ListViewItem clientRecord in lstClients.Items)
            {
                //find him an update his connection status
                if (args != null && clientRecord.Text == args.UserName)
                {
                    clientRecord.SubItems[1].Text = "Disconnected";
                }
            }
            //move to the clients tab
            tabMain.SelectedTab = tabClients;
        }
Beispiel #2
0
 private void ClientDisconnected(object sender, ClientDisconnectedArgs e)
 {
     Connections.TryRemove(e.Id, out _);
 }
Beispiel #3
0
 private void TCPServer_ClientDisconnected(object sender, ClientDisconnectedArgs e)
 {
     _ui.Post(UpdateClientDisconnected, e);
 }
Beispiel #4
0
 private void OnClientDisconnected(object sender, ClientDisconnectedArgs e)
 {
     Components.First(x => x.BindingSource.Id == e.Id).Entity.ShouldDestroy = true;
 }