private static void EndLoadImage(IAsyncResult result, FileNode node) { var fileSet = ((IListViewFileSet)node.ParentNode); if (fileSet.ListView.InvokeRequired) { var d = new EndLoadImageCallback(EndLoadImage); fileSet.ListView.Invoke(d, new object[] { result, node }); } else { node.Image = node.ImageGetter.EndGetImage(result); fileSet.ImageList.Images.Add(node.Key, node.Image); fileSet.ListView.Items[node.Key].ImageKey = node.Key; node.Done = true; Trace.WriteLine(string.Format("Updated image file {0}", node.Key)); } }
private static void EndLoadImage(IAsyncResult result, FileNode node) { var fileSet = ((IListViewFileSet) node.ParentNode); if (fileSet.ListView.InvokeRequired) { var d = new EndLoadImageCallback(EndLoadImage); fileSet.ListView.Invoke(d, new object[] { result, node }); } else { node.Image = node.ImageGetter.EndGetImage(result); fileSet.ImageList.Images.Add(node.Key, node.Image); fileSet.ListView.Items[node.Key].ImageKey = node.Key; node.Done = true; Trace.WriteLine(string.Format("Updated image file {0}", node.Key)); } }