Пример #1
0
        public GalleryBrowserFilter(Configuration.ConfigGalleryBrowserView galleryBrowserSettings)
        {
            GalleryBrowserSettings = galleryBrowserSettings;

            text      = "";
            sortType  = galleryBrowserSettings.SortType;
            sortOrder = galleryBrowserSettings.SortOrder;
        }
Пример #2
0
 public SearchProgressArg(ISearchArg searchArg, SearchResult searchResult, int pageIndex, MetadataKeywordLists metadataKeywordLists, GallerySortType sortType, SortOrder sortOrder)
 {
     SearchArg            = searchArg;
     SearchResult         = searchResult;
     PageIndex            = pageIndex;
     MetadataKeywordLists = metadataKeywordLists;
     SortType             = sortType;
     SortOrder            = sortOrder;
 }
Пример #3
0
        public LibraryBrowserFilter(Configuration.ConfigLibraryBrowserView libraryBrowserSettings)
        {
            LibraryBrowserSettings = libraryBrowserSettings;

            text            = "";
            sortType        = libraryBrowserSettings.SortType;
            sortOrder       = libraryBrowserSettings.SortOrder;
            globalSortType  = libraryBrowserSettings.GlobalSortType;
            globalSortOrder = libraryBrowserSettings.GlobalSortOrder;
        }
Пример #4
0
 public SearchDoArg(SearchArg searchArg
                    , TagsModel tagsModel
                    , SearchHandler searchHandler
                    , GallerySortType sortType
                    , SortOrder sortOrder
                    , MetadataKeywordLists metadataKeywordLists)
 {
     SearchArg            = searchArg;
     TagsModel            = tagsModel;
     SearchHandler        = searchHandler;
     SortType             = sortType;
     SortOrder            = sortOrder;
     MetadataKeywordLists = metadataKeywordLists;
 }
Пример #5
0
 public LibraryLoadRunArg(IPathFormatter pathFormatter, ISearchResultCache searchResultCache, SearchArg searchArg, int numItemsPerPage, string libraryPath
                          , GallerySortType sortType, LibrarySortType globalSortType
                          , SortOrder sortOrder, SortOrder globalSortOrder)
 {
     PathFormatter     = pathFormatter;
     SearchResultCache = searchResultCache;
     SearchArg         = searchArg;
     NumItemsPerPage   = numItemsPerPage;
     LibraryPath       = libraryPath;
     SortType          = sortType;
     GlobalSortType    = globalSortType;
     SortOrder         = sortOrder;
     GlobalSortOrder   = globalSortOrder;
 }
Пример #6
0
        public static IEnumerable <Metadata> GetSortedSearchResult(this IEnumerable <Metadata> Result, GallerySortType sortType, SortOrder sortOrder)
        {
            IEnumerable <Metadata> orderedResult = new List <Metadata>(Result.Count());

            if (sortType == GallerySortType.Title)
            {
                orderedResult = OrderByTitle(Result, sortOrder);
            }
            else if (sortType == GallerySortType.Language)
            {
                orderedResult = OrderByLanguage(Result, sortOrder);
            }
            else if (sortType == GallerySortType.Artist)
            {
                orderedResult = OrderByArtist(Result, sortOrder);
            }
            else if (sortType == GallerySortType.Group)
            {
                orderedResult = OrderByGroup(Result, sortOrder);
            }
            else if (sortType == GallerySortType.Tag)
            {
                orderedResult = OrderByTag(Result, sortOrder);
            }
            else if (sortType == GallerySortType.Parody)
            {
                orderedResult = OrderByParody(Result, sortOrder);
            }
            else if (sortType == GallerySortType.Character)
            {
                orderedResult = OrderByCharacter(Result, sortOrder);
            }
            else if (sortType == GallerySortType.Category)
            {
                orderedResult = OrderByCategory(Result, sortOrder);
            }
            else if (sortType == GallerySortType.Scanlator)
            {
                orderedResult = OrderByScanlator(Result, sortOrder);
            }
            else if (sortType == GallerySortType.UploadDate)
            {
                orderedResult = OrderByUploadDate(Result, sortOrder);
            }
            else if (sortType == GallerySortType.NumPages)
            {
                orderedResult = OrderByPageCount(Result, sortOrder);
            }
            else if (sortType == GallerySortType.NumFavorites)
            {
                orderedResult = OrderByFavoriteCount(Result, sortOrder);
            }
            else if (sortType == GallerySortType.Id)
            {
                orderedResult = OrderById(Result, sortOrder);
            }

            return(orderedResult);
        }