Beispiel #1
0
        private void InitializeSearch(SearchViewModel model)
        {
            model.Cards = new List <CardViewModel>();

            SearchViewModel.Keywords                = _cardService.Keywords().GetSelectListItems();
            SearchViewModel.Traits                  = _cardService.Traits().GetSelectListItems();
            SearchViewModel.ResourceCosts           = _cardService.ResourceCosts().GetSelectListItems();
            SearchViewModel.ThreatCosts             = _cardService.ThreatCosts().GetSelectListItems();
            SearchViewModel.EngagementCosts         = _cardService.EngagementCosts().GetSelectListItems();
            SearchViewModel.CardSets                = _cardService.SetNames.GetSelectListItems();
            SearchViewModel.Scenarios               = _cardService.GetScenarioTitles().GetSelectListItems();
            SearchViewModel.EncounterSets           = _cardService.EncounterSetNames.GetSelectListItems();
            SearchViewModel.Categories              = _cardService.Categories().Select(x => x.ToString().Replace('_', ' ')).GetSelectListItems().OrderBy(x => x.Text).ToList();
            SearchViewModel.EncounterCategories     = _cardService.EncounterCategories().Select(x => x.ToString().Replace('_', ' ')).GetSelectListItems().OrderBy(x => x.Text).ToList();
            SearchViewModel.QuestCategories         = _cardService.QuestCategories().Select(x => x.ToString().Replace('_', ' ')).GetSelectListItems().OrderBy(x => x.Text).ToList();
            SearchViewModel.VictoryPointValues      = _cardService.VictoryPointValues().GetSelectListItems();
            SearchViewModel.AttackStrengthValues    = _cardService.AttackStrengthValues().GetSelectListItems();
            SearchViewModel.DefenseStrengthValues   = _cardService.DefenseStrengthValues().GetSelectListItems();
            SearchViewModel.HitPointsValues         = _cardService.HitPointsValues().GetSelectListItems();
            SearchViewModel.WillpowerStrengthValues = _cardService.WillpowerStrengthValues().GetSelectListItems();
            SearchViewModel.ThreatStrengthValues    = _cardService.ThreatStrengthValues().GetSelectListItems();
            SearchViewModel.QuestPointsValues       = _cardService.QuestPointsValues().GetSelectListItems();
        }