Exemplo n.º 1
0
        private void FillItems(TreeListItemCollection items, List <GroupDefinition> groups, List <PartitionDefinition> partitions)
        {
            foreach (var group in groups)
            {
                var item = new TreeListItem(group.Name);
                items.Add(item);

                item.Tag   = 0;
                item.Image = Properties.Resources.category;

                FillItems(item.Items, group.Groups, group.Partitions);

                item.Expended = true;
            }

            foreach (var part in partitions)
            {
                var item = new TreeListItem(part.Name);
                items.Add(item);
                item.Tag            = 1;
                item.Cells[1].Value = part.FileName;
                item.Cells[2].Value = part.Output;
                item.Cells[3].Value = part.Loop.ToString();
                item.Cells[4].Value = part.Syntax;
                item.Image          = Properties.Resources.file;
            }
        }
Exemplo n.º 2
0
 private void LoadTables(TreeListItemCollection items, List <PdmTable> tables)
 {
     foreach (var t in tables)
     {
         var item = new TreeListItem(t.Name);
         item.Tag        = t;
         item.ImageIndex = 2;
         items.Add(item);
         item.Cells[1].Value = t.Description;
     }
 }
Exemplo n.º 3
0
 private void FillPartitions(TreeListItemCollection items, List <PartitionDefinition> partitions)
 {
     foreach (var part in partitions)
     {
         var item = new TreeListItem(part.Name);
         item.Checked = true;
         item.Image   = Properties.Resources.file;
         item.Tag     = part;
         items.Add(item);
         item.Cells[1].Value = part.Output;
     }
 }
Exemplo n.º 4
0
        private void FillItems(TreeListItemCollection items, List <TemplateDirectory> directories, List <TemplateFile> files)
        {
            foreach (var dir in directories)
            {
                var item = new TreeListItem(dir.Name);
                items.Add(item);

                item.Image = Properties.Resources.category;

                FillItems(item.Items, dir.Directories, dir.Files);

                item.Expended = true;
            }

            foreach (var file in files)
            {
                var item = new TreeListItem(file.Name);
                items.Add(item);
                item.Tag   = file;
                item.Image = Properties.Resources.file;
            }
        }
Exemplo n.º 5
0
        private void LoadCategories(TreeListItemCollection items, List <PdmPackage> packages, List <PdmDiagram> diagrams)
        {
            foreach (var p in packages)
            {
                var item = new TreeListItem(p.Name);
                items.Add(item);
                LoadCategories(item.Items, p.Packages, p.Diagrams);
                item.Expended   = true;
                item.ImageIndex = 0;
            }

            foreach (var d in diagrams)
            {
                var item = new TreeListItem(d.Name);
                item.ImageIndex = 1;
                item.Tag        = d;
                items.Add(item);

                LoadTables(item.Items, d.Tables);
                item.Expended = true;
            }
        }
Exemplo n.º 6
0
        private void FillGroups(TreeListItemCollection items, List <GroupDefinition> groups)
        {
            foreach (var group in groups)
            {
                var item = new TreeListItem(group.Name);
                item.Checked = true;
                item.Image   = Properties.Resources.category;
                items.Add(item);

                FillGroups(item.Items, group.Groups);
                FillPartitions(item.Items, group.Partitions);

                item.Expended = true;
            }
        }