private void PokemonCards_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { UpdatePokemonFilter(); AllPokemonNames = PokemonCards.Select(p => p.Card.Name).Distinct().ToList(); AllPokemonNames.Insert(0, string.Empty); }
internal async Task Save() { var json = Serializer.SerializeFormatted(PokemonCards.Select(card => card.Card).ToList()); await File.WriteAllTextAsync("Data/pokemon.json", json); }