private void UpdateLocalConnectionStatus(Guid clientId, ClientConnectionStatus status) { var method = new MethodInvoker(() => { switch (status) { case ClientConnectionStatus.Opened: Text = "Подключение к серверу событий установлено."; break; case ClientConnectionStatus.Opening: Text = "Подключение к серверу событий..."; //config.Clear(); //fetching.Clear(); break; default: break; } }); if (InvokeRequired) { BeginInvoke(method); } else { method(); } }
private void ConnectionStatus(Guid clientId, ClientConnectionStatus status) { if (status == ClientConnectionStatus.Faulted) { if (_showError != null) { var mess = "Канал связи перешёл в состояние \"Ошибка\""; _showError(mess); } _faultTimer.Enabled = true; } _connectionStatus?.Invoke(clientId, status); }
private void ConnectionStatus(Guid clientId, string ipaddr, ClientConnectionStatus status) { if (status == ClientConnectionStatus.Faulted) { if (_showError != null) { var mess = "Канал связи [" + ipaddr + "] перешёл в состояние \"Ошибка\""; _showError(mess); } _faultTimer.Enabled = true; } if (_connectionStatus != null) { _connectionStatus(clientId, ipaddr, status); } }
private static void UpdateConnectionStatus(Guid clientId, string ipaddr, ClientConnectionStatus status) { lock (Data.StationNodes) { foreach (var stationNode in Data.StationNodes) { if (stationNode.Enable && !stationNode.ItThisStation && stationNode.ClientId == clientId) { stationNode.Actived = true; stationNode.ConnectionStatus = status; } else { stationNode.Actived = false; } } } }
public ClientConnectionChangedEventArgs(ClientConnectionStatus status, IDataServiceClient client) { Status = status; Client = client; }
static void UpdateLocalConnectionStatus(Guid clientId, ClientConnectionStatus status) { if (status == ClientConnectionStatus.Opened) { } }
private void IndicateConnectionState( ClientConnectionStatus newState ) { if( newState == ClientConnectionStatus.Disconnected && AutoReconnect ) { AttemptReconnectIfAppropriate(); } if( ConnectionStatus == newState ) return; var previousState = ConnectionStatus; ConnectionStatus = newState; OnSteamChatClientConnectionChange( new SteamChatConnectionChangeEventArgs { ChangeDateTime = DateTime.UtcNow, PreviousConnectionState = previousState, NewConnectionState = ConnectionStatus } ); }
protected virtual void OnStateChanged(StateChangedEventArgs e) { _status = e.NextState; StateChanged?.Invoke(this, e); }
protected void SetStatus(ClientConnectionStatus status) { Logger.WriteDebug($"Authentication client status changing to: {status}"); _status.OnNext(status); }