private void listUser_DoubleClick(object sender, EventArgs e) { if (listUser.SelectedIndex == -1) { return; } if (!Security.IsAuthorized(Permissions.TaskEdit, true) && Userods.GetInbox(shortList[listUser.SelectedIndex].UserNum) != 0) { MsgBox.Show(this, "Please select a user that does not have an inbox."); return; } SelectedUserNum = shortList[listUser.SelectedIndex].UserNum; DialogResult = DialogResult.OK; }
private void listUser_DoubleClick(object sender, EventArgs e) { if (listUser.SelectedIndex == -1) { return; } if (!Security.IsAuthorized(Permissions.TaskEdit, true) && Userods.GetInbox(ListUserodsShowing[listUser.SelectedIndex].UserNum) != 0 && !IsSelectionmode) { MsgBox.Show(this, "Please select a user that does not have an inbox."); return; } SelectedUserNum = ListUserodsShowing[listUser.SelectedIndex].UserNum; foreach (int index in listUser.SelectedIndices) { ListSelectedUserNums.Add(ListUserodsShowing[index].UserNum); } DialogResult = DialogResult.OK; }