示例#1
0
 protected override void RemoveManagers()
 {
     MatchStateManager = null;
     HandManager       = null;
     CharacterManager  = null;
     MatchViewManager  = null;
 }
示例#2
0
 protected override void AddManagers()
 {
     CharacterManager          = new MatchCharacterManager();
     MatchStateManager         = new MatchStateManager();
     PlayerControlStateManager = new PlayerControlStateManager();
     HandManager      = new MatchHandManager();
     MatchViewManager = new MatchViewManager();
 }
        public ActionResult Settings(string taxonId)
        {
            TaxonSearchResult searchResult = this.TaxonSearchManager.GetTaxon(taxonId);

            if (searchResult.NumberOfMatches != 1)
            {
                return(RedirectToSearch(taxonId));
            }

            ITaxon taxon = searchResult.Taxon;

            this.TaxonIdentifier = TaxonIdTuple.Create(taxonId, searchResult.Taxon.Id);
            ViewBag.Taxon        = taxon;
            var viewManager = new MatchViewManager(GetCurrentUser());
            MatchSettingsViewModel model = viewManager.GetMatchSettingsViewModel(taxon);

            CreateMatchSelectLists(model);
            ModelState.Remove("TaxonId");

            return(View(model));
        }