Exemple #1
0
 public void Reset()
 {
     renamed = added = false;
     foreach (TreeNode node in Nodes)
     {
         PackEntryNode packNode = node as PackEntryNode;
         packNode.Reset();
     }
 }
Exemple #2
0
        private void InsertNew(PackEntry entry)
        {
            PackEntryNode node = null;

            if (entry is PackedFile)
            {
                node = new PackedFileNode(entry as PackedFile);
            }
            else
            {
                node = new DirEntryNode(entry as VirtualDirectory);
            }
            node.Added = true;
            int index = 0;
            List <PackEntry> entries = (Tag as VirtualDirectory).Entries;

            for (index = 0; index < entries.Count; index++)
            {
                if (entries[index] == entry)
                {
                    break;
                }
            }
            Nodes.Insert(index, node);
            node.ChangeColor();

            ChangeColor();
            PackEntryNode parent = Parent as PackEntryNode;

            while (parent != null)
            {
                parent.ChangeColor();
                parent = parent.Parent as PackEntryNode;
            }

            Expand();
        }