private void AddThumbnail(ThumbnailListViewItem item) { if (Disposing) { return; } if (this.InvokeRequired) { AddThumbnailDelegate d = new AddThumbnailDelegate(AddThumbnail); this.Invoke(d, new object[] { item }); } else { Image image = GetThumbnail(item.Bitmap); LargeImageList.Images.Add(image); //Images[i].repl int imageIndex = LargeImageList.Images.Count - 1; int itemIndex = 0; // 이 태그에 맞는 아이템을 찾자 for (int i = 0; i < Items.Count; i++) { if (Items[i].Tag == item) { itemIndex = i; } } Items[itemIndex].ImageIndex = imageIndex; //Logger.Log("item {0}, name {1}, image {2}", itemIndex, item.Name, imageIndex); } }
private void AddThumbnail(ThumbnailListViewItem item) { if (Disposing) return; if (this.InvokeRequired) { AddThumbnailDelegate d = new AddThumbnailDelegate(AddThumbnail); this.Invoke(d, new object[] { item }); } else { Image image = GetThumbnail(item.Bitmap); LargeImageList.Images.Add(image); //Images[i].repl int imageIndex = LargeImageList.Images.Count - 1; int itemIndex = 0; // 이 태그에 맞는 아이템을 찾자 for (int i = 0; i < Items.Count; i++ ) { if (Items[i].Tag == item) { itemIndex = i; } } Items[itemIndex].ImageIndex = imageIndex; //Logger.Log("item {0}, name {1}, image {2}", itemIndex, item.Name, imageIndex); } }