public ProjectTreeNode AddNode(string text, ProjectTreeNode.NodeTypes nodeType)
        {
            ProjectTreeNode node = new ProjectTreeNode();

            node.NodeType = nodeType;
            node.SetImage(nodeType);
            node.Text = text;
            this.Nodes.Add(node);
            return(node);
        }
        public ProjectTreeNode AddFolder(string nodeName)
        {
            string fileName = ((LogicalPath() + "\\" + nodeName).Replace("\\\\", "\\"));

            Directory.CreateDirectory(fileName);

            ProjectTreeNode node = new ProjectTreeNode();

            node.NodeType = NodeTypes.Folder;
            node.SetImage(node.NodeType);
            node.Text = nodeName;
            this.Nodes.Add(node);
            return(node);
        }
        public ProjectTreeNode CreateNewFile(string extension)
        {
            string nodeName = "New file" + extension;
            string fileName = ((LogicalPath() + "\\" + nodeName).Replace("\\\\", "\\"));

            try
            {
                File.Create(fileName).Dispose();
            }
            catch// (Exception ex)
            {
            }

            ProjectTreeNode node = new ProjectTreeNode();

            node.NodeType = DetermineNodeType(fileName);
            node.SetImage(node.NodeType);
            node.Text = nodeName;
            this.Nodes.Add(node);
            return(node);
        }