Ejemplo n.º 1
0
        private void InsertFiles(TreeNode parentNode, NameSpaceDirectory folder)
        {
            var files = folder.Files.Where(x => x.Name.EndsWith(".img")).ToDictionary(x => x.Name, x => x);

            foreach (var kvp in files)
            {
                var name = kvp.Key;
                var node = new WZTreeNode();
                node.Name          = name;
                node.Text          = name;
                node.Tag           = kvp.Value;
                kvp.Value.TreeNode = node;
                node.SetNotLoaded();

                parentNode.Nodes.Add(node);
            }
        }
Ejemplo n.º 2
0
        private void InsertFiles(TreeNode parentNode, NameSpaceDirectory folder)
        {
            var files = folder.Files.Where(x => x.Name.EndsWith(".img")).OrderBy(x => x.Name);

            foreach (var file in files)
            {
                var name = file.Name;
                var node = new WZTreeNode();
                node.Name = name;
                node.Text = name;
                node.Tag  = file;

                node.SetNotLoaded();

                parentNode.Nodes.Add(node);
            }

            parentNode.ToolTipText = $"Subnodes: {parentNode.Nodes.Count}";
        }