Beispiel #1
0
        private void UpdateUserList()
        {
            var userList = connectionService.GetAllCurrentlyLoggedInUser();

            Application.Current.Dispatcher.Invoke(() =>
            {
                CurrentlyLoggedInUser.Clear();
                userList.Do(user => CurrentlyLoggedInUser.Add(user.Name));

                if (CurrentlyLoggedInUser.Count == 0)
                {
                    CurrentlyLoggedInUser.Add("momentan ist kein Benutzer eingeloggt");
                }
            });
        }
Beispiel #2
0
        private void OnConnectionStatusChanged()
        {
            IsConnectionActive = connectionService.IsConnectionActive;

            ConnectionStatusText = connectionService.IsConnectionActive
                                                                                ? "active"
                                                                                : "inactive";

            if (!IsConnectionActive)
            {
                CurrentlyLoggedInUser.Clear();
                CurrentlyLoggedInUser.Add("momentan ist kein Benutzer eingeloggt");
            }
            else
            {
                UpdateUserList();
            }
        }