Exemple #1
0
        internal void AddItemAsDvd(IFolder folderInDatabase)
        {
            LogicalFolder newFolder = new LogicalFolder((folderInDatabase as ItemInDatabase).Name, LogicalFolderType.Disc, 0, 0);

            AddFolder(newFolder);
            foreach (FileInDatabase file in folderInDatabase.Files)
            {
                newFolder.AddItem(file);
            }
            foreach (IFolder folder in folderInDatabase.Folders)
            {
                if (folder is FolderInDatabase)
                {
                    // nie dodajemy CompressedFile
                    newFolder.AddItemAsFolder(folder, null);
                }
            }
        }
Exemple #2
0
        internal void AddItemAsFolder(IFolder folderInDatabase, string asName)
        {
            LogicalFolder newFolder = new LogicalFolder(folderType, asName != null ? asName : (folderInDatabase as ItemInDatabase).Name);

            AddFolder(newFolder);
            foreach (FileInDatabase file in folderInDatabase.Files)
            {
                newFolder.AddItem(file);
            }
            foreach (IFolder folder in folderInDatabase.Folders)
            {
                if (folder is FolderInDatabase)
                {
                    // nie dodajemy CompressedFile
                    newFolder.AddItemAsFolder(folder, null);
                }
            }
        }