Esempio n. 1
0
        public void SetImages(Search data)
        {
            Dictionary <string, ImageItem> images = new Dictionary <string, ImageItem>();

            if (data != null)
            {
                foreach (var card in data.Data)
                {
                    MTGClient client = new MTGClient();
                    images.Add(card.Id, new ImageItem(card.Id, card.Name, client.GetImageFromCard(card)));
                }
            }
            ViewBag.CardImages = images;
        }
Esempio n. 2
0
        public void SetImages(Search data)
        {
            Dictionary <string, Tuple <string, string> > images = new Dictionary <string, Tuple <string, string> >();

            if (data != null)
            {
                foreach (var card in data.Data)
                {
                    MTGClient client = new MTGClient();
                    images.Add(card.Id, new Tuple <string, string>(client.GetImageFromCard(card), card.ScryfallUri));
                }
            }
            ViewBag.CardImages = images;
        }