Ejemplo n.º 1
0
        public AutoFilterEmulators(List <Emulator> _sourceCollection, string _title)
        {
            title            = _title;
            sourceCollection = _sourceCollection;

            StringFilters.Add(PlatformFilter = new StringFilter("Platform", () => Update(), Settings.EmulatorFilterPlatform));

            BoolFilters.Add(IncludedFilter = new BoolFilter("Included", () => Update(), Settings.EmulatorFilterIncluded));
            BoolFilters.Add(CrapFilter     = new BoolFilter("Crap", () => Update(), Settings.EmulatorFilterIsCrap));

            Update();
        }
Ejemplo n.º 2
0
        public AutoFilterReleases(List <Release> _sourceCollection, string _title)
        {
            title            = _title;
            sourceCollection = _sourceCollection.OrderBy(x => x.Platform.ID).ThenBy(x => x.Title).ToList();;

            StringFilters.Add(PublisherFilter = new StringFilter("Publisher", () => Update(), Settings.ReleaseFilterPublisher));
            StringFilters.Add(GenreFilter     = new StringFilter("Genre", () => Update(), Settings.ReleaseFilterGenre));
            StringFilters.Add(PlayersFilter   = new StringFilter("Players", () => Update(), Settings.ReleaseFilterPlayers));
            StringFilters.Add(PlatformFilter  = new StringFilter("Platform", () => Update(), Settings.ReleaseFilterPlatform));
            StringFilters.Add(RegionsFilter   = new StringFilter("Regions", () => Update(), Settings.ReleaseFilterRegions));
            StringFilters.Add(YearFilter      = new StringFilter("Year", () => Update(), Settings.ReleaseFilterYear));

            BoolFilters.Add(UnlicensedFilter = new BoolFilter("Unlicensed", () => Update(), Settings.ReleaseFilterUnlicensed));
            BoolFilters.Add(BeatenFilter     = new BoolFilter("Beaten", () => Update(), Settings.ReleaseFilterIsBeaten));

            if (Settings.DisplayCrap)
            {
                BoolFilters.Add(CrapFilter = new BoolFilter("Crap", () => Update(), Settings.ReleaseFilterIsCrap));
            }
            else
            {
                sourceCollection = sourceCollection.Where(x => !x.IsCrap).ToList();
            }

            if (Settings.DisplayNotIncluded)
            {
                BoolFilters.Add(IncludedFilter = new BoolFilter("Playable", () => Update(), Settings.ReleaseFilterIncluded));
            }
            else
            {
                sourceCollection = sourceCollection.Where(x => x.Included).ToList();
            }

            if (Settings.DisplayNonGames)
            {
                BoolFilters.Add(IsGameFilter = new BoolFilter("Is Game", () => Update(), Settings.ReleaseFilterIsGame));
            }
            else
            {
                sourceCollection = sourceCollection.Where(x => x.IsGame).ToList();
            }

            if (Settings.DisplayAdult)
            {
                BoolFilters.Add(AdultFilter = new BoolFilter("Adult", () => Update(), Settings.ReleaseFilterAdult));
            }
            else
            {
                sourceCollection = sourceCollection.Where(x => !x.IsAdult).ToList();
            }

            Update();
        }
Ejemplo n.º 3
0
        public AutoFilterPlatforms(List <Platform> _sourceCollection, string _title)
        {
            title            = _title;
            sourceCollection = _sourceCollection;

            StringFilters.Add(TypeFilter         = new StringFilter("Type", () => Update(), Settings.PlatformFilterType));
            StringFilters.Add(GenerationFilter   = new StringFilter("Generation", () => Update(), Settings.PlatformFilterGeneration));
            StringFilters.Add(DeveloperFilter    = new StringFilter("Developer", () => Update(), Settings.PlatformFilterDeveloper));
            StringFilters.Add(ManufacturerFilter = new StringFilter("Manufacturer", () => Update(), Settings.PlatformFilterManufacturer));
            StringFilters.Add(MediaFilter        = new StringFilter("Media", () => Update(), Settings.PlatformFilterMedia));

            BoolFilters.Add(IncludedFilter   = new BoolFilter("Playable", () => Update(), Settings.PlatformFilterIncluded));
            BoolFilters.Add(PreferreddFilter = new BoolFilter("Preferred", () => Update(), Settings.PlatformFilterPreferred));

            Update();
        }