/// <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); }
public void RemoveUserItem() { var item = UserItems.FirstOrDefault(); if (item != null) { item.Count++; UserItems.Remove(item); } }
public void RemoveUserTab(TabItemViewModel vm) { if (UserItems.Contains(vm)) { UserItems.Remove(vm); if (UserItems.Count == 0) { SelectedTab = Owner.Start; } else { SelectedTab = UserItems.Last(); } } }
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); } }