public void UpdateUserCardsInfo() { var json = Http.GetStringAsync(cardsapi).Result; var cards = JsonConvert.DeserializeObject <carddata>(json); AllCards.Clear(); AllCards.AddRange(cards.data); Save(); }
public void ResetState() { ActionsAvailable = 0; AllCards.Clear(); Deck.Clear(); Discard.Clear(); Hand.Clear(); Characters.Clear(); Lessons.Clear(); Creatures.Clear(); Location.Clear(); Match.Clear(); Items.Clear(); Adventure.Clear(); }
private void CollectionSet() { AllCards.Clear(); _nextCards.Clear(); _mainGrid.Children.Clear(); if (ItemsSource == null) { return; } //Add all items to the queue. foreach (object o in ItemsSource) { _nextCards.Enqueue(o); } //Add the first three queue items as card to the view. for (int i = 0; i < 3; i++) { AddCardFromQueue(); } SetCardSize(); }