private void AddDebugValues(List <PAOResult> results) { if (isDebugModeEnabled) { // testResult1 var testResult1 = new PAOResult { Comment = "Test Result 1", DeckTitle = "Test Deck 1" }; testResult1.Items.Add(new PAOResultItem { Person = PlayingCard.Diamond_Jack, Action = PlayingCard.Diamond_Queen, Object = PlayingCard.Diamond_King, RecallState = 0 }); testResult1.Items.Add(new PAOResultItem { Person = PlayingCard.Heart_Jack, Action = PlayingCard.Heart_Queen, Object = PlayingCard.Heart_King, RecallState = 1 }); testResult1.Items.Add(new PAOResultItem { Person = PlayingCard.Spade_Jack, Action = PlayingCard.Spade_Queen, Object = PlayingCard.Spade_King, RecallState = 2 }); // testResult2 var testResult2 = new PAOResult(); testResult2.Comment = "Test Result 2"; testResult2.DeckTitle = "Test Deck 2"; testResult2.Items.Add(new PAOResultItem { Person = PlayingCard.Diamond_2, Action = PlayingCard.Diamond_3, Object = PlayingCard.Diamond_4 }); results.Add(testResult1); results.Add(testResult2); } }
private void OnStoreResult() { var facade = FacadeFactory.Create(); var overview = facade.Get <ResultOverview>(Bootstrap.Results) as ResultOverview; if (overview != null) { // Build the result and store it var paoResult = new PAOResult(); foreach (var item in RecentCards) { var resultItem = new PAOResultItem(); FillResultItem(item, resultItem); paoResult.Items.Add(resultItem); } // Add it to the overview. paoResult.Comment = "Added at " + DateTime.Now.ToShortDateString(); paoResult.DeckTitle = CurrentDeck.Title; overview.Add(paoResult); //TODO: Fire event that a reload is required in the result overview? var eventManager = facade.Get <EventController>(Bootstrap.EventManager); var newCardGameResult = eventManager.GetEvent(Bootstrap.EventNewCardGame); newCardGameResult.Trigger(); } }