Reverted few changes

- Get selected clients after disconnectecd client is removed from the
clients list
This commit is contained in:
MaxXor 2015-04-13 10:25:45 +02:00
parent 7b040d8988
commit b360e2d91f
1 changed files with 3 additions and 1 deletions

View File

@ -186,6 +186,7 @@ private void ClientState(Server server, Client client, bool connected)
} }
else else
{ {
int selectedClients = 0;
this.Invoke((MethodInvoker) delegate this.Invoke((MethodInvoker) delegate
{ {
foreach (ListViewItem lvi in lstClients.Items) foreach (ListViewItem lvi in lstClients.Items)
@ -196,8 +197,9 @@ private void ClientState(Server server, Client client, bool connected)
server.ConnectedClients--; server.ConnectedClients--;
} }
} }
selectedClients = lstClients.SelectedItems.Count;
}); });
UpdateWindowTitle(ListenServer.ConnectedClients, lstClients.SelectedItems.Count); UpdateWindowTitle(ListenServer.ConnectedClients, selectedClients);
} }
} }