public LibraryFilter(Configuration.ConfigLibraryList libraryListSettings) { LibraryListSettings = libraryListSettings; text = ""; filters = libraryListSettings.Filter.Filters; dateFilters = libraryListSettings.Filter.DateFilters; afterDate = libraryListSettings.Filter.AfterDate; beforeDate = libraryListSettings.Filter.BeforeDate; sortType = libraryListSettings.SortType; sortOrder = libraryListSettings.SortOrder; }
public static LibraryDateFilters ToggleFlag(this LibraryDateFilters flags, LibraryDateFilters flag) { if (flags.HasFlag(flag)) { flags &= ~flag; } else { flags |= flag; } return(flags); }