void _newServer_ClientDisconnected() { Console.WriteLine("[FORM] Client Disconnected"); this.Invoke((MethodInvoker) delegate { _numClientsConn.Text = _newServer.ConnectedClients().ToString(); }); }
void _newServer_ClientConnected() { _secondsTimer.Stop(); _newServer.StopBroadcast(); _newServer.OnDiscoveryTimeOut -= _newServer_OnDiscoveryTimeOut; InvokeOnMainThread(() => { DiscoveryModeBtn.Enabled = true; ConnectedClientsLabel.StringValue = _newServer.ConnectedClients().ToString(); ServerStatusLabel.StringValue = "Server Started"; }); }