/// <summary> /// Refreshes the cache of cards from the carddata directory /// </summary> private void RefreshList() { var parser = new Cards.XMLParser(Config.DataDirectory); List <Card> list = parser.GetCards(); cards.Clear(); foreach (Card c in list) { try { cards.Add(c.Name.ToLower(), c); } catch (ArgumentException) { Console.Error.WriteLine("Multiple cards have the name \"{0}\".", c.Name); } } }
/// <summary> /// Refreshes the cache of cards from the carddata directory /// </summary> private void RefreshList() { var parser = new Cards.XMLParser(Config.DataDirectory); List<Card> list = parser.GetCards(); cards.Clear(); foreach (Card c in list) { try { cards.Add(c.Name.ToLower(), c); } catch (ArgumentException) { Console.Error.WriteLine("Multiple cards have the name \"{0}\".", c.Name); } } }