/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="getDownloadSharesFilter"]/AddNodeIdFilter/*'/> public void AddNodeIdFilter(DracoonFilterType <NodeIdFilter> nodeIdFilter) { CheckFilter(nodeIdFilter, nameof(nodeIdFilter)); FiltersList.Add(nodeIdFilter); }
/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="getDownloadSharesFilter"]/AddNameFilter/*'/> public void AddNameFilter(DracoonFilterType <NameFilter> nameFilter) { CheckFilter(nameFilter, nameof(nameFilter)); FiltersList.Add(nameFilter); }
/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="getDownloadSharesFilter"]/AddCreatedByFilter/*'/> public void AddCreatedByFilter(DracoonFilterType <CreatedByFilter> createdByFilter) { CheckFilter(createdByFilter, nameof(createdByFilter)); FiltersList.Add(createdByFilter); }
public void ApplySelectedFilter() { if (SelectedFilter.sortType != SortType.None || SelectedFilter.FilterCriteria.Where(f => f.IsChecked).Any()) { ColumnHeaderTextBlocks[SelectedFilter.columnId].Foreground = (Windows.UI.Xaml.Media.Brush)Windows.UI.Xaml.Application.Current.Resources["HudlBlue"]; if (ColumnHeaderTextBlocks[SelectedFilter.columnId].Inlines.Count > 1) { ColumnHeaderTextBlocks[SelectedFilter.columnId].Inlines.RemoveAt(1); } if (SelectedFilter.sortType == SortType.Ascending) { Run text = new Run(); text.Text = " \u25B2"; ColumnHeaderTextBlocks[SelectedFilter.columnId].Text = GridHeadersTextSorted[SelectedFilter.columnId]; ColumnHeaderTextBlocks[SelectedFilter.columnId].Inlines.Add(text); } else if (SelectedFilter.sortType == SortType.Descending) { Run text = new Run(); text.Text = " \u25BC"; ColumnHeaderTextBlocks[SelectedFilter.columnId].Text = GridHeadersTextSorted[SelectedFilter.columnId]; ColumnHeaderTextBlocks[SelectedFilter.columnId].Inlines.Add(text); } List <Clip> newFilteredClips = new List <Clip>(); List <Clip> currentFilteredClips; if (FiltersList.Contains(SelectedFilter)) { currentFilteredClips = removeFilter(); } else { currentFilteredClips = FilteredClips.ToList(); } if (SelectedFilter.FilterCriteria != null && SelectedFilter.FilterCriteria.Any(c => c.IsChecked)) { List <String> filtersApplied = new List <String>(); foreach (FilterCriteriaViewModel criteria in SelectedFilter.FilterCriteria.Where(c => c.IsChecked)) { newFilteredClips.AddRange(currentFilteredClips.Where(clip => clip.breakDownData[SelectedFilter.columnId].Equals(criteria.Name))); filtersApplied.Add(criteria.Name); } Logger.Instance.LogFilterApplied(filtersApplied); } else { newFilteredClips.AddRange(currentFilteredClips); } FilterViewModel currentSortFilter = FiltersList.FirstOrDefault(f => f.sortType != SortType.None); if (SelectedFilter.sortType == SortType.Ascending || SelectedFilter.sortType == SortType.Descending) { if (currentSortFilter != null) { if (!currentSortFilter.FilterCriteria.Any(c => c.IsChecked)) { ColumnHeaderTextBlocks[currentSortFilter.columnId].Foreground = (Windows.UI.Xaml.Media.Brush)Windows.UI.Xaml.Application.Current.Resources["HudlMediumDarkGray"]; if (ColumnHeaderTextBlocks[currentSortFilter.columnId].Inlines.Count > 1) { ColumnHeaderTextBlocks[currentSortFilter.columnId].Inlines.RemoveAt(1); ColumnHeaderTextBlocks[currentSortFilter.columnId].Text = GridHeadersTextUnsorted[currentSortFilter.columnId]; } FiltersList.Remove(currentSortFilter); } else { if (ColumnHeaderTextBlocks[currentSortFilter.columnId].Inlines.Count > 1) { ColumnHeaderTextBlocks[currentSortFilter.columnId].Inlines.RemoveAt(1); ColumnHeaderTextBlocks[currentSortFilter.columnId].Text = GridHeadersTextUnsorted[currentSortFilter.columnId]; } currentSortFilter.setSortType(SortType.None); } } currentSortFilter = SelectedFilter; } sortClips(ref newFilteredClips, currentSortFilter); FiltersList.Add(SelectedFilter); applyFilter(newFilteredClips); } else { if (FiltersList.Contains(SelectedFilter)) { RemoveSelectedFilter(); } } }
/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="getDownloadSharesFilter"]/AddUserIdFilter/*'/> public void AddUserIdFilter(DracoonFilterType <UserIdFilter> userIdFilter) { CheckFilter(userIdFilter, nameof(userIdFilter)); FiltersList.Add(userIdFilter); }
// This is only override method to simplify programming /// <summary> /// Adds a new filter to filter expression /// </summary> /// <param name="columnName">column Name</param> /// <param name="value">value</param> public void AddFilter(string columnName, object value) { FiltersList.Add(new Filter(columnName, value)); }
// This is only override method to simplify programming /// <summary> /// Adds a new filter to filter expression /// </summary> /// <param name="columnName">column Name</param> /// <param name="value">value</param> public void AddFilter(string columnName, object value, FilterOperatorEnum filterOperator) { FiltersList.Add(new Filter(columnName, value, filterOperator)); }
/// <summary> /// Adds the filter expression. /// </summary> /// <param name="filterExp">The filter exp.</param> public void AddFilterExpression(FilterExpression filterExp) { Check.Require(filterExp != null); FiltersList.Add(filterExp); }
/// <summary> /// Adds the filter. /// </summary> /// <param name="filter">The filter.</param> public void AddFilter(Filter filter) { Check.Require(filter != null); FiltersList.Add(filter); }
/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="searchNodesFilter"]/AddFileTypeFilter/*'/> public void AddFileTypeFilter(DracoonFilterType <FileTypeFilter> fileTypeFilter) { CheckFilter(fileTypeFilter, nameof(fileTypeFilter)); FiltersList.Add(fileTypeFilter); }
/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="searchNodesFilter"]/AddClassificationFilter/*'/> public void AddClassificationFilter(DracoonFilterType <ClassificationFilter> classificationFilter) { CheckFilter(classificationFilter, nameof(classificationFilter)); FiltersList.Add(classificationFilter); }
/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="searchNodesFilter"]/AddUpdatedByFilter/*'/> public void AddUpdatedByFilter(DracoonFilterType <UpdatedByFilter> updatedByFilter) { CheckFilter(updatedByFilter, nameof(updatedByFilter)); FiltersList.Add(updatedByFilter); }
/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="searchNodesFilter"]/AddParentPathFilter/*'/> public void AddParentPathFilter(DracoonFilterType <ParentPathFilter> parentPathFilter) { CheckFilter(parentPathFilter, nameof(parentPathFilter)); FiltersList.Add(parentPathFilter); }
/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="searchNodesFilter"]/AddIsFavoriteFilter/*'/> public void AddIsFavoriteFilter(DracoonFilterType <IsFavoriteFilter> isFavoriteFilter) { CheckFilter(isFavoriteFilter, nameof(isFavoriteFilter)); FiltersList.Add(isFavoriteFilter); }
/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="searchNodesFilter"]/AddNodeTypeFilter/*'/> public void AddNodeTypeFilter(DracoonFilterType <NodeTypeFilter> typeFilter) { CheckFilter(typeFilter, nameof(typeFilter)); FiltersList.Add(typeFilter); }
/// <include file="SpecificFilterDoc.xml" path='docs/members[@name="getNodesFilter"]/AddNodeIsEncryptedFilter/*'/> public void AddNodeIsEncryptedFilter(DracoonFilterType <NodeIsEncryptedFilter> isEncryptedFilter) { CheckFilter(isEncryptedFilter, nameof(isEncryptedFilter)); FiltersList.Add(isEncryptedFilter); }