void aplayClient_ConnectionFailedEventHandler() { if (ServerNotFoundViewModel == null) { ServerNotFoundViewModel = new ServerNotFoundViewModel(); } Thread.Sleep(2000); _aplayClient.Start(_serverAddress); }
private void StartNewClient() { _aplayClient = _aplayClientFactory.Create(); _aplayClient.ConnectionFailedEventHandler += aplayClient_ConnectionFailedEventHandler; _aplayClient.ConnectEventHandler += _aplayClient_ConnectEventHandler; _aplayClient.DisconnectEventHandler += _aplayClient_DisconnectEventHandler; _aplayClient.Start(_serverAddress); }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { _client = new APlayClient(); _client.Start("127.0.0.1:55555"); _client.ConnectEventHandler += _client_ConnectEventHandler; }