예제 #1
0
        Task IHandleAsync <LoadEventModel> .HandleAsync(LoadEventModel message)
        {
            AccordianSolitaireSaveInfo thisSave = cons !.Resolve <AccordianSolitaireSaveInfo>();

            //todo:  most of the time needs this.  if in a case its not needed, then delete then.

            return(this.RefreshBindingsAsync(_aggregator));
        }
예제 #2
0
 public AccordianSolitaireMainGameClass(ISaveSinglePlayerClass thisState,
                                        IEventAggregator aggregator,
                                        IGamePackageResolver container
                                        )
 {
     _thisState = thisState;
     Aggregator = aggregator;
     _saveRoot  = container.ReplaceObject <AccordianSolitaireSaveInfo>(); //can't create new one.  because if doing that, then anything that needs it won't have it.
     _saveRoot.LoadMod(Aggregator);
 }
예제 #3
0
        public override async Task OpenSavedGameAsync()
        {
            DeckList.OrderedObjects(); //i think
            _saveRoot = await _thisState.RetrieveSinglePlayerGameAsync <AccordianSolitaireSaveInfo>();

            if (_saveRoot.DeckList.Count > 0)
            {
                var newList = _saveRoot.DeckList.GetNewObjectListFromDeckList(DeckList);
                DeckPile !.OriginalList(newList);
                //not sure if we need this or not (?)
                //DeckPile.Visible = true;
            }
            //anything else that is needed to open the saved game will be here.
            _saveRoot.LoadMod(Aggregator);
            _board !.ReloadSavedGame(_saveRoot);
        }