示例#1
0
        /// <summary> Удалить пользователя. </summary>
        /// <param name="user"> Пользователь для удаления. </param>
        private void RemoveUser(User user)
        {
            var userItem = UserItems.Where(u => u.Content == user).SingleOrDefault();

            Users.Remove(user);
            UserItems.Remove(userItem);
        }
示例#2
0
        public void RemoveUserItem()
        {
            var item = UserItems.FirstOrDefault();

            if (item != null)
            {
                item.Count++;
                UserItems.Remove(item);
            }
        }
示例#3
0
        public void RemoveUserTab(TabItemViewModel vm)
        {
            if (UserItems.Contains(vm))
            {
                UserItems.Remove(vm);

                if (UserItems.Count == 0)
                {
                    SelectedTab = Owner.Start;
                }
                else
                {
                    SelectedTab = UserItems.Last();
                }
            }
        }
示例#4
0
        public void RemoveVideoView(VideoViewModel vm)
        {
            var index = VideoView.VideoList.IndexOf(vm);

            if (index < 0)
            {
                return;
            }
            if (index == 0)
            {
                VideoView.Remove(vm);
                VideoView.SelectedList = VideoView.VideoList.FirstOrDefault();
            }
            else
            {
                VideoView.Remove(vm);
                VideoView.SelectedList = VideoView.VideoList[index - 1];
            }

            if (VideoView.VideoList.Count == 0)
            {
                UserItems.Remove(VideoView);
            }
        }