public bool RemoveFilterTags(params CTag[] tags) { if (tags == null) { throw new NullReferenceException("Tags reference is null"); } if (m_tagFilter != null) { bool changed = false; foreach (CTag tag in tags) { changed |= m_tagFilter.RemoveTag(tag); } if (changed) { if (!m_tagFilter.HasTags) // no tags left { RemoveFilter(m_tagFilter); m_tagFilter = null; } return(ApplyFilter(this)); } } return(false); }
public bool AddFilterTags(params CTag[] tags) { if (tags == null) { throw new NullReferenceException("Tags reference is null"); } if (m_tagFilter == null) { m_tagFilter = new CConsoleViewTagFilter(); AddFilter(m_tagFilter); } bool changed = false; foreach (CTag tag in tags) { changed |= m_tagFilter.AddTag(tag); } return(changed && ApplyFilter(this)); // can increase filtered items count }
public bool SetFilterTags(params CTag[] tags) { if (tags == null) { throw new NullReferenceException("Tags reference is null"); } if (tags.Length == 0) { RemoveFilter(m_tagFilter); m_tagFilter = null; return(ApplyFilter(this)); } if (m_tagFilter == null) { m_tagFilter = new CConsoleViewTagFilter(); AddFilter(m_tagFilter); } m_tagFilter.SetTags(tags); return(ApplyFilter(this)); // can increase filtered items count }