private void client_StateChanged(object sender, NetSockStateChangedEventArgs e) { switch (e.NewState) { case SocketState.Closed: account.SetStatus(Enums.Status.Disconnected); break; case SocketState.Connected: account.SetStatus(Enums.Status.None); break; } State = e.NewState; }
private void server_StateChanged(object sender, NetSockStateChangedEventArgs e) { account.Log(new ConnectionTextInformation("New server state : " + e.NewState), 0); }