public void OnLoadNextLevel(NodeLoader loader) { if (!_nextLevelLoaded) { _nextLevelLoaded = true; WixIconCollection icons = this.IconNodes; if (icons != null && icons.Icons.Count > 0) { ImageList imgs = null; if (this.TreeView != null) { imgs = this.TreeView.ImageList; } foreach (WixIconNode ico in icons.Icons) { int idx = -1; if (imgs != null) { if (!string.IsNullOrEmpty(ico.SourceFile)) { if (File.Exists(ico.SourceFile)) { Image img = Image.FromFile(ico.SourceFile); imgs.Images.Add(img); idx = imgs.Images.Count - 1; } } } TreeNodeWixIcon iconNode = new TreeNodeWixIcon(ico, idx); Nodes.Add(iconNode); } } } }
public TreeNodeWixIconCollection(WixIconCollection node) : base(node) { ImageIndex = TreeViewWix.IMG_ICONS; SelectedImageIndex = ImageIndex; Nodes.Add(new CLoader()); }