예제 #1
0
        public void OnContactUnchecked(TLUserBase user)
        {
            if (user == null)
            {
                return;
            }

            user.IsSelected = false;
            SelectedUsers.Remove(user);
            _selectedUsersCache.Remove(user.Index);
            NotifyOfPropertyChange(() => SelectedUsers);
        }
예제 #2
0
        public void ListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            User user = (User)e.ClickedItem;

            if (SelectedUsers.Contains(user))
            {
                SelectedUsers.Remove(user);
            }
            else
            {
                SelectedUsers.Add(user);
            }
        }
예제 #3
0
        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");
            }
        }
예제 #4
0
        //取消选中
        /// <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;
        }
예제 #5
0
 /// <summary>
 /// ユーザーを削除する
 /// </summary>
 private void ExecuteRemoveUserFromSelectedUsersCommand()
 {
     SelectedUsers.Remove(SelectedUserInSelectedUsers);
 }