private void OnClientStateChanged(object sender, ClientStateChangedEvent e) { if (!e.Connected) { RootElement = RootElement = new NoConnectionView(); TabItem.Content = RootElement; } }
public TabMessage() { LCPClient client = Ressources.Client; client.ClientStateChangedEvent += OnClientStateChanged; client.LogInSuccessfullEvent += OnLogInSuccessfull; client.ClientSignedOutEvent += OnClientSignedOut; if (client.Connected && client.LoggedIn) { RootElement = new TabMessageUI(); } else { RootElement = new NoConnectionView(); } }
private void OnClientSignedOut(object sender, ClientSignedOutEvent e) { RootElement = new NoConnectionView(); TabItem.Content = RootElement; }