private void SetAllPictures(string link, string className1, Image picBox1, string className2, Image picBox2) { Thread.Sleep(1000); WebsiteSearch web = new WebsiteSearch(); // Get links string imageLink1 = web.GetPictureLink(link, className1); string imageLink2 = web.GetPictureLink(link, className2); thumbnailImage = GetPicture(imageLink1); fullImage = GetPicture(imageLink2); syncContext.Post(o => RefreshPictures(), null); }
private void SetPicture(string link, string className, Image picBox) { // This can go to WebsiteSearch web = new WebsiteSearch(); // Get Image link string imageLink = web.GetPictureLink(link, className); // Load images if they return a value Console.WriteLine(imageLink); if (imageLink != null) { picBox.Source = GetPicture(imageLink); } }