private void Bot_ConnectionClosed() { Dispatcher.InvokeAsync(delegate { _lastQueueBreakPoint = null; LoginMenuItem.IsEnabled = true; LogoutMenuItem.IsEnabled = false; LoginButton.IsEnabled = true; LoginButtonIcon.Icon = FontAwesome.WPF.FontAwesomeIcon.SignIn; UpdateBotMenu(); StatusText.Text = "Offline"; StatusText.Foreground = Brushes.DarkRed; Players.ClearList(); }); }