public void DeleteCard(int id) { var tempModel = DeckList.AsParallel().AsEnumerable().First(model => model.Id.Equals(id)); DeckList.Remove(tempModel); UpdateChartColumn(DeckStatistical()); GetTypeCountList(); }
private bool CheckCard(int id) { var name = CardUtils.GetName(id); var canAdd = !CardUtils.IsToekn(id) && (DeckList.Count < 40) && (DeckList.AsParallel().Count(deckModel => name.Equals(deckModel.Name)) < 3); return(canAdd); }