コード例 #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;
            }
        }
コード例 #2
0
 private void CheckedItems(TreeListItemCollection items)
 {
     foreach (var item in items)
     {
         item.Checked = true;
         CheckedItems(item.Items);
     }
 }
コード例 #3
0
ファイル: frmTable.cs プロジェクト: faib920/codebuilder
        private void UpdateObjectByProfile(TreeListItemCollection items)
        {
            foreach (var item in items)
            {
                InitializerUnity.Initialize(item.Tag as SchemaBase);

                UpdateObjectByProfile(item.Items);
            }
        }
コード例 #4
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;
     }
 }
コード例 #5
0
        private void GetPartitions(TreeListItemCollection items)
        {
            foreach (var item in items)
            {
                if (item.Tag is PartitionDefinition && item.Checked)
                {
                    Partitions.Add(item.Tag as PartitionDefinition);
                }

                GetPartitions(item.Items);
            }
        }
コード例 #6
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;
     }
 }
コード例 #7
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;
            }
        }
コード例 #8
0
 private void GetSelectedTables(TreeListItemCollection items)
 {
     foreach (var item in items)
     {
         var t = item.Tag as PdmTable;
         if (t == null)
         {
             GetSelectedTables(item.Items);
         }
         else if (item.Checked)
         {
             Selected.Add(t);
         }
     }
 }
コード例 #9
0
        private void GenerateVirtualListItems(TreeListItemCollection items)
        {
            for (var i = 0; i < items.Count; i++)
            {
                var vitem = new VirtualTreeListItem(items[i], virtualList.Count);
                items[i].DataIndex = (++rowNumberIndex);
                virtualList.Add(vitem);

                if (items[i].Selected)
                {
                    treeList.SelectedItems.Add(items[i]);
                }

                if (items[i].Expended)
                {
                    GenerateVirtualListItems(items[i].Items);
                }
            }
        }
コード例 #10
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;
            }
        }
コード例 #11
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;
            }
        }