private void ViewItemImage(Item item) { string query = $"{item.ManufacturerItemDescription} {item.ManufacturerName}"; string itemPicUrl = GoogleEngine.GetPictureUrl(query); if (itemPicUrl != null) { ItemImageForm itemImageForm = new ItemImageForm(); itemImageForm.ShowImage(itemPicUrl); itemImageForm.ShowDialog(); } }
public void SetItemPic(Item item) { _itemPic = new PictureBox(); _itemPic.Height = 100; _itemPic.Width = (int)(_itemPic.Height); _itemPic.SizeMode = PictureBoxSizeMode.Zoom; string query = $"{_item.ManufacturerItemDescription} {item.ManufacturerName}"; string itemPicUrl = GoogleEngine.GetPictureUrl(query); if (itemPicUrl != null) { _itemPic.ImageLocation = itemPicUrl; } _itemPic.Anchor = AnchorStyles.Bottom; }