Ejemplo n.º 1
0
        internal PackageFolder(PackageFolder parent, FolderEntry entry, bool readData = true, Package pk = null)
        {
            this.FolderEntry = entry;
            Parent = parent;
            Package = pk;
            Files = new List<PackageFile>();
            Folders = new List<PackageFolder>();

            foreach (var f in entry.GetSubFiles())
            {
                Files.Add(new PackageFile(this, f, readData, pk));
            }

            foreach (var f in entry.GetSubFolders())
            {
                Folders.Add(new PackageFolder(this, f, readData, pk));
            }
        }
Ejemplo n.º 2
0
        void xReturn_NodeClick(object sender, EventArgs e)
        {
            Node        xsender = (Node)sender;
            FolderEntry x       = (FolderEntry)xsender.DataKey;

            FileEntry[]   xFiles   = x.GetSubFiles();
            FolderEntry[] xFolders = x.GetSubFolders();
            listView1.Items.Clear();
            foreach (FileEntry y in xFiles)
            {
                ListViewItem z = new ListViewItem(y.Name);
                z.SubItems.Add(y.Size.ToString());
                z.Tag = y;
                listView1.Items.Add(z);
            }
            xsender.Nodes.Clear();
            foreach (FolderEntry y in xFolders)
            {
                xsender.Nodes.Add(GetNode(y));
            }
        }