/// <summary> /// Selects the given issue /// Selection Mode should be set to true; otherwise, the method has no effect /// </summary> /// <param name="issue">The issue to select</param> public void SetSelected(Issue issue) { if (SelectionModeActive) { SelectedIssues.Add(issue); IssueSelectionChanged?.Invoke(this, new IssueSelectionChangedArgs(issue, true)); } }
/// <summary> /// Deselects the given issue /// SelectionModeActive should be set to true; otherwise the method has no effect /// </summary> /// <param name="issue">The issue to deselect</param> public void SetDeselected(Issue issue) { if (SelectionModeActive) { bool removeSuccessful = SelectedIssues.Remove(issue); if (removeSuccessful) { IssueSelectionChanged?.Invoke(this, new IssueSelectionChangedArgs(issue, false)); } } }
/// <summary> /// Checks whether or not the given issue is selected /// </summary> /// <param name="issue">THe issue to check</param> /// <returns>True if the issue is selected; otherwise false</returns> public bool IsSelected(Issue issue) { return(SelectedIssues.Contains(issue)); }