Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. private void PopulateThumbnails(List<string> queryResults)
  2. {
  3. this.playerListView.Items.Clear();
  4. this.imageList1.Images.Clear();
  5. ImageViewer imageViewer = new ImageViewer();
  6.  
  7. foreach (string file in queryResults)
  8. {
  9. try
  10. this.imageList1.Images.Add(Image.FromFile(file));
  11. catch
  12. Console.WriteLine("This is not an image file");
  13. }
  14.  
  15. this.ListView.View = View.LargeIcon;
  16. this.imageList1.ImageSize = new Size(256, 144);
  17. this.ListView.LargeImageList = this.imageList1;
  18.  
  19. for (int j = 0; j < this.imageList1.Images.Count; j++)
  20. {
  21. ListViewItem item = new ListViewItem();
  22. item.ImageIndex = j;
  23. this.ListView.Items.Add(item);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement