示例#1
0
        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();
            }
        }
示例#2
0
        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;
        }