Ejemplo n.º 1
0
        public ObservableCollection <UserEintrag> GetFilledUserListWithAllInformation()
        {
            ObservableCollection <UserEintrag> userList = new ObservableCollection <UserEintrag>();
            var usersInChat = GetAllUsersInTheCurrentChat("SentioLIVE");

            foreach (var user in usersInChat)
            {
                UserEintrag _user = new UserEintrag();
                _user.UserName = user.Username;
                userList.Add(_user);
            }
            userList = CheckIfUserIsSub(userList, GetSubsOfChannel());
            userList = CheckIfUserIsFollower(userList, GetFollowersOfChannel());
            return(userList);
        }
Ejemplo n.º 2
0
 private void Timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     if (UserList.Count == 0)
     {
         return;
     }
     for (int i = 0; i < UserList.Count; i++)
     {
         var user = new UserEintrag
         {
             Since            = UserList[i].Since,
             UserType         = UserList[i].UserType,
             UserName         = UserList[i].UserName,
             UserId           = UserList[i].UserId,
             CurrentWatchTime = UserList[i].CurrentWatchTime.Add(new TimeSpan(0, 1, 0))
         };
         UserList.RemoveAt(i);
         UserList.Insert(i, user);
     }
 }
Ejemplo n.º 3
0
        private UserEintrag GetDataClassOfSend(object sender)
        {
            MenuItem mi = sender as MenuItem;

            if (mi != null)
            {
                ContextMenu cm = mi.CommandParameter as ContextMenu;
                if (cm != null)
                {
                    DataGridRow gridRow = cm.PlacementTarget as DataGridRow;
                    if (gridRow != null)
                    {
                        if (gridRow.Item is UserEintrag)
                        {
                            UserEintrag user = gridRow.Item as UserEintrag;
                            return(user);
                        }
                    }
                }
            }
            return(null);
        }
Ejemplo n.º 4
0
 public void AddNewUserToDb(UserEintrag user)
 {
 }
Ejemplo n.º 5
0
 public void AddNewUserToCurrentChannel(UserEintrag user)
 {
     UserList.Add(user);
 }