private void OnFlagChanged(bool isSet, SearchResultsGrouping value) { if (isSet) { currentGroupingFlags |= value; } else { currentGroupingFlags &= ~value; } IsGroupedViewMode = currentGroupingFlags != SearchResultsGrouping.None; UpdateGroups(); }
private EnumFlagViewModel <SearchResultsGrouping> CreateEnumFlag(string name, SearchResultsGrouping value) { return(new EnumFlagViewModel <SearchResultsGrouping>( name, (currentGroupingFlags & value) == value, value, OnFlagChanged )); }
public IEnumerable <IGrouping <string, ArmorSetViewModel> > GroupBy(IEnumerable <ArmorSetViewModel> results, SearchResultsGrouping grouping) { this.grouping = grouping; return(results.GroupBy(CreateGroupKey)); }