Exemple #1
0
        private void AppendContent(StringBuilder buffer, ProjectItemCollection items, int count)
        {
            string indent = new string(' ', count * 2);

            ProjectItemCollection.Enumerator e = items.GetEnumerator();
            while (e.MoveNext())
            {
                ProjectItem item = e.Current;

                if (item.IsDirectory)
                {
                    buffer.Append(indent + "Begin Folder = \"" + item.Name + "\"" + CR);
                    AppendContent(buffer, item.Items, count + 1);
                    buffer.Append(indent + "End" + CR);
                }
                else
                {
                    if (Path.GetExtension(item.Name).Equals(".sql"))
                    {
                        buffer.Append(indent + "Script = \"" + item.Name + "\"" + CR);
                    }
                    else
                    {
                        buffer.Append(indent + "Node = \"" + item.Name + "\"" + CR);
                    }
                }
            }
        }
Exemple #2
0
        public ProjectItem(string path)
        {
            this.path  = path;
            this.name  = System.IO.Path.GetFileName(path);
            this.info  = null;
            this.items = new ProjectItemCollection();

            this.properties           = new HybridDictionary();
            this.propertyDescriptions = null;
        }
Exemple #3
0
        //========================================================================================
        // PopulateProject()
        //========================================================================================

        private void PopulateProject(ProjectItemCollection items, TreeNodeCollection nodes)
        {
            ProjectItemCollection.Enumerator e = items.GetEnumerator();
            while (e.MoveNext())
            {
                ProjectItem item = e.Current;

                TreeNode node = CreateNode(item);
                nodes.Add(node);

                if (item.IsDirectory)
                {
                    PopulateProject(item.Items, node.Nodes);
                }
            }
        }