Ejemplo n.º 1
0
        private void addNode(TreeNodeCollection nodes, string name, FileFindResult result)
        {
            int image = 0;

            if (result.Type == FileFindResultType.File)
            {
                image = 4;
            }
            if (result.Type == FileFindResultType.Project)
            {
                image = 5;
            }
            var node = nodes.Add(name);

            node.ImageIndex         = image;
            node.SelectedImageIndex = image;
            node.Tag = result;
            if (isDirectory(result))
            {
                node.Nodes.Add("");
            }
        }
Ejemplo n.º 2
0
 private static bool isDirectory(FileFindResult x)
 {
     return(x.Type == FileFindResultType.Directory || x.Type == FileFindResultType.DirectoryInProject);
 }