public void OnContactUnchecked(TLUserBase user) { if (user == null) { return; } user.IsSelected = false; SelectedUsers.Remove(user); _selectedUsersCache.Remove(user.Index); NotifyOfPropertyChange(() => SelectedUsers); }
public void ListView_ItemClick(object sender, ItemClickEventArgs e) { User user = (User)e.ClickedItem; if (SelectedUsers.Contains(user)) { SelectedUsers.Remove(user); } else { SelectedUsers.Add(user); } }
public void RemoveUser(User user) { var userToRemove = SelectedUsers.SingleOrDefault(u => u.User.UserID == user.UserID); if (userToRemove != null) { if (_timeEntryFilter != null) { _timeEntryFilter.RemoveUser(user); } SelectedUsers.Remove(userToRemove); OnPropertyChanged("SelectedUsers"); OnPropertyChanged("HasConsultants"); } }
//取消选中 /// <summary> /// 取消选中 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnUnSelect_Click(object sender, EventArgs e) { if (gridViewSel.RowCount <= 0 || gridViewSel.SelectedRows.Count <= 0) { return; } var rightUser = gridViewSel.SelectedRows[0].DataBoundItem as RightUser; if (rightUser == null) { return; } SelectedUsers.Remove(rightUser); NotSelectedUsers.Add(rightUser); BindingGridView(); CurrentOperationStatus = OperationStatus.Edit; }
/// <summary> /// ユーザーを削除する /// </summary> private void ExecuteRemoveUserFromSelectedUsersCommand() { SelectedUsers.Remove(SelectedUserInSelectedUsers); }