Esempio n. 1
0
        private void GetFiles(DirectoryInfo dir, TreeNode nodeToAddTo)
        {
            foreach (var fileinfo in dir.GetFiles())
            {
                TreeNode child;
                switch (fileinfo.Extension.ToLower())
                {
                case ".nud":
                    child = new NUDNode(fileinfo.FullName);
                    break;

                case ".nut":
                    child = new NUTNode(fileinfo.FullName);
                    break;

                case ".vbn":
                    child = new VBNNode(fileinfo.FullName);
                    break;

                default:
                    child = new BaseNode(fileinfo.FullName);
                    break;
                }
                child.Tag = fileinfo;
                nodeToAddTo.Nodes.Add(child);
            }
        }
Esempio n. 2
0
 public ModelNode()
 {
     Text = "Model";
     NUD  = new NUDNode();
     NUT  = new NUTNode();
     MTA  = new MTANode();
     VBN  = new VBNNode();
     Nodes.Add(NUD);
     Nodes.Add(NUT);
     Nodes.Add(VBN);
     Nodes.Add(MTA);
 }