Beispiel #1
0
        public List <FolderTreeModel> GetDirectory2(string DirPath)
        {
            if (root == null)
            {
                return(new List <FolderTreeModel>());
            }
            string[]        splitedPath = DirPath.ToLower().Split(Path.DirectorySeparatorChar);
            FolderTreeModel directory   = null;
            Action <IEnumerable <string>, FolderTreeModel> getDirectory = null;

            getDirectory = (path, pckentry) =>
            {
                if (path.Any())
                {
                    var title = path.First().ToLower();
                    var child = pckentry.Rows.Where(x => x.Title.ToLower() == title).SingleOrDefault();
                    if (child != null && child.Title.ToLower() == path.Last().ToLower())
                    {
                        directory = child;
                    }
                    getDirectory(path.Skip(1), child);
                }
            };
            getDirectory(splitedPath, root);
            if (directory != null)
            {
                if (directory.Rows == null || directory.Rows != null && directory.Rows.Count == 0)
                {
                    return(new List <FolderTreeModel>());
                }

                return(directory.Rows.OrderBy(x => x.File != null).ToList());
            }
            return(new List <FolderTreeModel>());
        }
Beispiel #2
0
        public void addfille(PckEntry file)
        {
            Action <FolderTreeModel, IEnumerable <string>, PckEntry> ensureExists = null;

            ensureExists = (root, path, pckentry) =>
            {
                if (path.Any())
                {
                    var title = path.First();
                    var child = root.Rows.Where(x => x.Title == title).SingleOrDefault();
                    if (child == null)
                    {
                        child = new FolderTreeModel()
                        {
                            Title = title,
                            Rows  = new List <FolderTreeModel>(),
                        };
                        if (Path.HasExtension(title))
                        {
                            child.File = pckentry;
                        }
                        root.Rows.Add(child);
                    }
                    ensureExists(child, path.Skip(1), pckentry);
                }
            };
            string[] splitedPath = file.filePath.Split(Path.DirectorySeparatorChar);
            ensureExists(root, splitedPath, file);
        }
Beispiel #3
0
        public List <PckEntry> getAllFIles(FolderTreeModel rootx)
        {
            if (root == null)
            {
                return(new List <PckEntry>());
            }
            List <PckEntry>          files        = new List <PckEntry>();
            Action <FolderTreeModel> ensureExists = null;

            ensureExists = (root) =>
            {
                if (root.File != null)
                {
                    files.Add(root.File);
                }

                foreach (FolderTreeModel ftm in root.Rows)
                {
                    if (ftm.File != null)
                    {
                        files.Add(ftm.File);
                    }

                    if (ftm.Rows != null && ftm.Rows.Count > 0)
                    {
                        ensureExists(ftm);
                    }
                }
            };
            ensureExists(rootx);
            return(files);
        }
Beispiel #4
0
        public void drawListViewInitial()
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new MethodInvoker(delegate {
                    drawListViewInitial();
                }));
                return;
            }
            folderDeeplist = new Dictionary <int, FolderTreeModel>();
            folderDeep     = 0;
            FileList.Items.Clear();
            ListViewItem lvi = new ListViewItem();

            textBox1.Text = "";
            PackStructureManager row = openedPckFies.directoryStructure;

            lvi            = new ListViewItem();
            lvi.Text       = row.Title;
            lvi.ImageIndex = _iconListManager.AddFileId(row.Title, row.Title, true);
            lvi.Tag        = row;
            FileList.Items.Add(lvi);
            selectedtree = null;
            FileList.Items[0].Selected = true;
            FileList.Select();
            listView1_MouseDoubleClick(null, null);
            progress_bar("Ready", 0, 0);
        }
Beispiel #5
0
 public PackStructureManager(string _Title)
 {
     Title = _Title;
     root  = new FolderTreeModel()
     {
         Title = _Title, Rows = new List <FolderTreeModel>()
     };
 }
Beispiel #6
0
        private void refreshToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lockedItemDrop || selectedPck == null || selectedtree == null)
            {
                return;
            }

            if (selectedtree.Rows == null || selectedtree.Rows != null && selectedtree.Rows.Count == 0)
            {
                selectedtree = selectedPck.root;
            }

            this.FileList.SuspendLayout();
            this.FileList.BeginUpdate();
            FileList.Items.Clear();
            ListViewItem lvi = new ListViewItem();

            lvi.Text       = "..";
            lvi.ImageIndex = _iconListManager.AddFileId("d", "d", true);
            FileList.Items.Add(lvi);
            //folderDeeplist[folderDeep - 1] = selectedtree;
            foreach (FolderTreeModel row in selectedtree.Rows.OrderBy(o => o.File != null).ToList())
            {
                lvi      = new ListViewItem();
                lvi.Text = row.Title;
                if (row.File != null)
                {
                    lvi.ImageIndex = _iconListManager.AddFileId(Path.GetExtension(row.Title), row.Title, false);
                    double compresRatio = ConvertSize(row.File.decompressedSize, "MB") - ConvertSize(row.File.compressedSize, "MB") / ConvertSize(row.File.decompressedSize, "MB");
                    lvi.SubItems.Add(SizeSuffix(row.File.compressedSize));
                    lvi.SubItems.Add(SizeSuffix(row.File.decompressedSize));
                    lvi.SubItems.Add((compresRatio * 100).ToString("F").Substring(1) + " %");
                    lvi.Tag = row.File;
                }
                else
                {
                    lvi.ImageIndex = _iconListManager.AddFileId(row.Title, row.Title, true);
                    lvi.SubItems.Add("-");
                    lvi.SubItems.Add("-");
                    lvi.SubItems.Add("-");
                    lvi.Tag = row;
                }

                FileList.Items.Add(lvi);
            }
            this.FileList.ResumeLayout();
            this.FileList.EndUpdate();
            textBox1.Text = "";
            foreach (FolderTreeModel list in folderDeeplist.Values)
            {
                textBox1.AppendText(list.Title + Path.DirectorySeparatorChar);
            }
            string ddd = textBox1.Text;

            textBox1.Text = ddd.TrimEnd(Path.DirectorySeparatorChar);
        }
Beispiel #7
0
        public FolderTreeModel GetDirectory(string DirPath)
        {
            string[]        splitedPath = DirPath.ToLower().Split(Path.DirectorySeparatorChar);
            FolderTreeModel last        = null;

            for (int i = 0; i < splitedPath.Length; i++)
            {
                string title = splitedPath[i];
                if (last == null)
                {
                    last = root.Rows.Where(x => x.Title == title).SingleOrDefault();
                }
                else
                {
                    last = last.Rows.Where(x => x.Title == title).SingleOrDefault();
                }
            }
            return(last);
        }
Beispiel #8
0
        public List <PckEntry> GetDirectory(string DirPath, bool isFileNameOnly = false, string fileName = "")
        {
            if (root == null)
            {
                return(new List <PckEntry>());
            }
            string[]        splitedPath = DirPath.ToLower().Split(Path.DirectorySeparatorChar);
            FolderTreeModel directory   = null;
            List <PckEntry> files       = null;
            Action <IEnumerable <string>, FolderTreeModel> getDirectory = null;

            getDirectory = (path, pckentry) =>
            {
                if (path.Any())
                {
                    var title = path.First().ToLower();
                    var child = pckentry.Rows.Where(x => x.Title.ToLower() == title).FirstOrDefault();
                    if (child != null && child.Title.ToLower() == path.Last().ToLower())
                    {
                        directory = child;
                    }
                    if (child != null)
                    {
                        getDirectory(path.Skip(1), child);
                    }
                }
            };
            getDirectory(splitedPath, root);
            if (directory != null)
            {
                if (!isFileNameOnly)
                {
                    files = new List <PckEntry>();
                    Action <FolderTreeModel> ensureExists = null;
                    ensureExists = (root) =>
                    {
                        if (root.File != null)
                        {
                            files.Add(root.File);
                        }

                        foreach (FolderTreeModel ftm in root.Rows)
                        {
                            if (ftm.File != null)
                            {
                                files.Add(ftm.File);
                            }

                            if (ftm.Rows != null && ftm.Rows.Count > 0)
                            {
                                ensureExists(ftm);
                            }
                        }
                    };
                    ensureExists(directory);
                }
                else
                {
                    files = new List <PckEntry>();
                    Action <FolderTreeModel> ensureExists = null;
                    ensureExists = (root) =>
                    {
                        if (root.File != null && root.Title.ToLower().Equals(fileName.ToLower()))
                        {
                            files.Add(root.File);
                        }

                        foreach (FolderTreeModel ftm in root.Rows)
                        {
                            if (ftm.File != null && ftm.Title.ToLower().Equals(fileName.ToLower()))
                            {
                                files.Add(ftm.File);
                            }

                            if (ftm.Rows != null && ftm.Rows.Count > 0)
                            {
                                ensureExists(ftm);
                            }
                        }
                    };
                    ensureExists(directory);
                }
            }
            if (files == null)
            {
                return(new List <PckEntry>());
            }

            return(files);
        }
Beispiel #9
0
        private void UnpackDirectoryOrFiles(object sender, EventArgs e)
        {
            if (lockedItemDrop || selectedPck == null || selectedtree == null)
            {
                return;
            }
            using (var fbd = new FolderBrowserDialog())
            {
                progress_bar("Extracting...", 0, 0);
                DialogResult result = fbd.ShowDialog();
                if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(fbd.SelectedPath))
                {
                    string pckName  = selectedPck.fiullFilePath;
                    string savePath = fbd.SelectedPath;
                    if (openedPckFies != null)
                    {
                        List <PckEntry> filesToSave = new List <PckEntry>();
                        // this.Cursor = Cursors.WaitCursor;
                        foreach (ListViewItem item in FileList.SelectedItems)
                        {
                            int index = item.Index;
                            if (FileList.Items[index].Tag is PckEntry)
                            {
                                PckEntry file = (PckEntry)FileList.Items[index].Tag;
                                if (Path.HasExtension(file.filePath))
                                {
                                    filesToSave.AddRange(openedPckFies.getDirectory(file.filePath, true, Path.GetFileName(file.filePath)));
                                }
                                else
                                {
                                    filesToSave.AddRange(openedPckFies.getDirectory(file.filePath));
                                }
                            }
                            else
                            {
                                if (FileList.Items[index].Tag is FolderTreeModel)
                                {
                                    FolderTreeModel file = (FolderTreeModel)FileList.Items[index].Tag;

                                    filesToSave.AddRange(openedPckFies.getDirectory(textBox1.Text + Path.DirectorySeparatorChar + file.Title));
                                }
                            }
                        }
                        if (filesToSave.Count > 0)
                        {
                            foreach (PckEntry item in filesToSave)
                            {
                                string dirpath = Path.GetDirectoryName(Path.Combine(savePath, item.fullP));
                                string subpath = Path.Combine(savePath, item.fullP);
                                string fileEx  = Path.GetExtension(subpath).Replace(".", "").ToLower();
                                if (!Directory.Exists(dirpath))
                                {
                                    Directory.CreateDirectory(dirpath);
                                }

                                File.WriteAllBytes(subpath, item.bytes);
                            }
                        }
                        // this.Cursor = Cursors.Default;
                    }
                }
            }
            progress_bar("Ready", 0, 0);
        }
Beispiel #10
0
        private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lockedItemDrop || selectedPck == null || selectedtree == null)
            {
                return;
            }
            string pckName = selectedPck.fiullFilePath;

            if (openedPckFies != null)
            {
                this.FileList.SuspendLayout();
                this.FileList.BeginUpdate();
                // this.Cursor = Cursors.WaitCursor;
                List <int> ids = new List <int>();
                foreach (ListViewItem item in FileList.SelectedItems)
                {
                    int index = item.Index;
                    if (FileList.Items[index].Tag is PckEntry)
                    {
                        PckEntry file = (PckEntry)FileList.Items[index].Tag;
                        ids.Add(file.id);
                        foreach (FolderTreeModel row in selectedtree.Rows)
                        {
                            if (row.Title == Path.GetFileName(file.filePath))
                            {
                                selectedtree.Rows.Remove(row);
                                break;
                            }
                        }
                        FileList.Items.RemoveAt(index);
                    }
                    else if (FileList.Items[index].Tag is FolderTreeModel)
                    {
                        FolderTreeModel file  = (FolderTreeModel)FileList.Items[index].Tag;
                        List <PckEntry> files = openedPckFies.directoryStructure.getAllFIles(file);
                        foreach (PckEntry row in files)
                        {
                            ids.Add(row.id);
                        }
                        FileList.Items.RemoveAt(index);
                        selectedtree.Rows.Remove(file);
                    }
                }
                openedPckFies.deleteFile(ids.ToArray());
                if (selectedtree.Rows == null || selectedtree.Rows != null && selectedtree.Rows.Count == 0)
                {
                    selectedtree = selectedPck.root;
                }


                FileList.Items.Clear();
                ListViewItem lvi = new ListViewItem();
                lvi.Text       = "..";
                lvi.ImageIndex = _iconListManager.AddFileId("d", "d", true);
                FileList.Items.Add(lvi);
                //folderDeeplist[folderDeep - 1] = selectedtree;
                foreach (FolderTreeModel row in selectedtree.Rows.OrderBy(o => o.File != null).ToList())
                {
                    lvi      = new ListViewItem();
                    lvi.Text = row.Title;
                    if (row.File != null)
                    {
                        lvi.ImageIndex = _iconListManager.AddFileId(Path.GetExtension(row.Title), row.Title, false);
                        double compresRatio = ConvertSize(row.File.decompressedSize, "MB") - ConvertSize(row.File.compressedSize, "MB") / ConvertSize(row.File.decompressedSize, "MB");
                        lvi.SubItems.Add(SizeSuffix(row.File.compressedSize));
                        lvi.SubItems.Add(SizeSuffix(row.File.decompressedSize));
                        lvi.SubItems.Add((compresRatio * 100).ToString("F").Substring(1) + " %");
                        lvi.Tag = row.File;
                    }
                    else
                    {
                        lvi.ImageIndex = _iconListManager.AddFileId(row.Title, row.Title, true);
                        lvi.SubItems.Add("-");
                        lvi.SubItems.Add("-");
                        lvi.SubItems.Add("-");
                        lvi.Tag = row;
                    }

                    FileList.Items.Add(lvi);
                }
                this.FileList.ResumeLayout();
                this.FileList.EndUpdate();
                textBox1.Text = "";
                foreach (FolderTreeModel list in folderDeeplist.Values)
                {
                    textBox1.AppendText(list.Title + Path.DirectorySeparatorChar);
                }
                string ddd = textBox1.Text;
                textBox1.Text = ddd.TrimEnd(Path.DirectorySeparatorChar);
            }
        }
Beispiel #11
0
        private void listView1_DragDrop_1(object sender, DragEventArgs e)
        {
            lockedItemSelect = true;
            string[] paths = (string[])e.Data.GetData(DataFormats.FileDrop);
            if (selectedPck != null && paths != null && paths.Length >= 0)
            {
                string packFullPath = selectedPck.Title;
                if (openedPckFies != null)
                {
                    Dictionary <string, PckEntry> path_datafile = new Dictionary <string, PckEntry>();

                    for (int i = 0; i < paths.Length; i++)
                    {
                        string FilePath = paths[i];
                        progress_bar("Adding files...", i, paths.Length);
                        Application.DoEvents();
                        if (Path.GetExtension(FilePath) == ".pck" || Path.GetExtension(FilePath) == ".rar" || Path.GetExtension(FilePath) == ".zip")
                        {
                        }
                        else
                        {
                            string DirectoryPath = textBox1.Text + FilePath.Replace(Path.GetDirectoryName(FilePath), "").Replace("/", "\\");
                            if (Path.HasExtension(FilePath))
                            {
                                openedPckFies.addFilesToTable(DirectoryPath, FilePath);
                            }
                            else
                            {
                                string[] files = Directory.GetFiles(FilePath, "*", SearchOption.AllDirectories);
                                for (int x = 0; x < files.Length; x++)
                                {
                                    string sFilePath = files[x];
                                    progress_bar("Adding sub-files...", x, files.Length);
                                    Application.DoEvents();
                                    DirectoryPath = textBox1.Text + Path.DirectorySeparatorChar + sFilePath.Replace(Path.GetDirectoryName(FilePath), "").Replace("/", "\\").Remove(0, 1);
                                    if (Path.HasExtension(sFilePath))
                                    {
                                        openedPckFies.addFilesToTable(DirectoryPath, sFilePath);
                                    }
                                }
                            }
                        }
                    }



                    progress_bar("Drawing grid", 0, 0);
                    this.FileList.SuspendLayout();
                    this.FileList.BeginUpdate();
                    if (selectedtree.Rows == null || selectedtree.Rows != null && selectedtree.Rows.Count == 0)
                    {
                        selectedtree = selectedPck.root;
                    }


                    FileList.Items.Clear();
                    ListViewItem lvi = new ListViewItem();
                    lvi.Text       = "..";
                    lvi.ImageIndex = _iconListManager.AddFileId("d", "d", true);
                    FileList.Items.Add(lvi);

                    foreach (FolderTreeModel row in selectedtree.Rows.OrderBy(o => o.File != null).ToList())
                    {
                        lvi      = new ListViewItem();
                        lvi.Text = row.Title;
                        if (row.File != null)
                        {
                            lvi.ImageIndex = _iconListManager.AddFileId(Path.GetExtension(row.Title), row.Title, false);
                            double compresRatio = ConvertSize(row.File.decompressedSize, "MB") - ConvertSize(row.File.compressedSize, "MB") / ConvertSize(row.File.decompressedSize, "MB");
                            lvi.SubItems.Add(SizeSuffix(row.File.compressedSize));
                            lvi.SubItems.Add(SizeSuffix(row.File.decompressedSize));
                            lvi.SubItems.Add((compresRatio * 100).ToString("F").Substring(1) + " %");
                            lvi.Tag = row.File;
                        }
                        else
                        {
                            lvi.ImageIndex = _iconListManager.AddFileId(row.Title, row.Title, true);
                            lvi.SubItems.Add("-");
                            lvi.SubItems.Add("-");
                            lvi.SubItems.Add("-");
                            lvi.Tag = row;
                        }

                        FileList.Items.Add(lvi);
                    }
                    // folderDeep++;
                }
                this.FileList.ResumeLayout();
                this.FileList.EndUpdate();
                textBox1.Text = "";
                foreach (FolderTreeModel list in folderDeeplist.Values)
                {
                    textBox1.AppendText(list.Title + Path.DirectorySeparatorChar);
                }
                string ddd = textBox1.Text;
                textBox1.Text = ddd.TrimEnd(Path.DirectorySeparatorChar);
            }
            else
            {
                JMessageBox.Show(this, "Please enter pck directory.");
            }
            lockedItemSelect = false;
            progress_bar("Ready", 0, 0);
        }
Beispiel #12
0
        private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (lockedItemSelect)
            {
                return;
            }
            int index = -1;

            if (FileList.SelectedIndices.Count > 0)
            {
                index = FileList.SelectedIndices[0];
            }

            if (index >= 0)
            {
                string       filepathxy = FileList.Items[index].Text;
                ListViewItem lvi        = null;
                this.FileList.SuspendLayout();
                this.FileList.BeginUpdate();
                if (filepathxy.Equals(".."))
                {
                    folderDeep--;
                    if (folderDeep <= 0)
                    {
                        this.FileList.EndUpdate();
                        folderDeeplist = new Dictionary <int, FolderTreeModel>();
                        drawListViewInitial();
                        return;
                    }
                    else
                    {
                        if (folderDeeplist != null)
                        {
                            Console.WriteLine("Back");
                            FileList.Items.Clear();
                            lvi            = new ListViewItem();
                            lvi.Text       = "..";
                            lvi.ImageIndex = _iconListManager.AddFileId("d", "d", true);
                            FileList.Items.Add(lvi);
                            selectedtree = folderDeeplist[folderDeep - 1];
                            foreach (FolderTreeModel row in folderDeeplist[folderDeep - 1].Rows.OrderBy(o => o.File != null).ToList())
                            {
                                lvi      = new ListViewItem();
                                lvi.Text = row.Title;
                                if (row.File != null)
                                {
                                    lvi.ImageIndex = _iconListManager.AddFileId(Path.GetExtension(row.Title), row.Title, false);
                                    double compresRatio = ConvertSize(row.File.decompressedSize, "MB") - ConvertSize(row.File.compressedSize, "MB") / ConvertSize(row.File.decompressedSize, "MB");
                                    lvi.SubItems.Add(SizeSuffix(row.File.compressedSize));
                                    lvi.SubItems.Add(SizeSuffix(row.File.decompressedSize));
                                    lvi.SubItems.Add((compresRatio * 100).ToString("F").Substring(1) + " %");
                                    lvi.Tag = row.File;
                                }
                                else
                                {
                                    lvi.ImageIndex = _iconListManager.AddFileId(row.Title, row.Title, true);
                                    lvi.SubItems.Add("-");
                                    lvi.SubItems.Add("-");
                                    lvi.SubItems.Add("-");
                                    lvi.Tag = row;
                                }
                                FileList.Items.Add(lvi);
                            }
                            folderDeeplist.Remove(folderDeep);
                        }
                    }
                }
                else if (FileList.Items[index].Tag != null && FileList.Items[index].Tag is PackStructureManager)
                {
                    Console.WriteLine("In pck");
                    selectedPck = (PackStructureManager)FileList.Items[index].Tag;
                    FileList.Items.Clear();
                    lvi            = new ListViewItem();
                    lvi.Text       = "..";
                    lvi.ImageIndex = _iconListManager.AddFileId("d", "d", true);
                    FileList.Items.Add(lvi);
                    if (selectedPck.root.Rows.Count > 0)
                    {
                        selectedtree = selectedPck.root.Rows[0];
                        folderDeeplist[folderDeep] = selectedtree;
                        foreach (FolderTreeModel row in selectedtree.Rows.OrderBy(o => o.File != null).ToList())
                        {
                            lvi      = new ListViewItem();
                            lvi.Text = row.Title;
                            if (row.File != null)
                            {
                                lvi.ImageIndex = _iconListManager.AddFileId(Path.GetExtension(row.Title), row.Title, false);
                                double compresRatio = ConvertSize(row.File.decompressedSize, "MB") - ConvertSize(row.File.compressedSize, "MB") / ConvertSize(row.File.decompressedSize, "MB");
                                lvi.SubItems.Add(SizeSuffix(row.File.compressedSize));
                                lvi.SubItems.Add(SizeSuffix(row.File.decompressedSize));
                                lvi.SubItems.Add((compresRatio * 100).ToString("F").Substring(1) + " %");
                                lvi.Tag = row.File;
                            }
                            else
                            {
                                lvi.ImageIndex = _iconListManager.AddFileId(row.Title, row.Title, true);
                                lvi.SubItems.Add("-");
                                lvi.SubItems.Add("-");
                                lvi.SubItems.Add("-");
                                lvi.Tag = row;
                            }
                            FileList.Items.Add(lvi);
                        }
                        folderDeep++;
                    }
                    else
                    {
                        selectedtree = selectedPck.root;
                        folderDeeplist[folderDeep] = selectedtree;
                    }
                }
                else if (FileList.Items[index].Tag != null && FileList.Items[index].Tag is FolderTreeModel)
                {
                    Console.WriteLine("In Directory");

                    selectedtree = (FolderTreeModel)FileList.Items[index].Tag;
                    FileList.Items.Clear();
                    lvi            = new ListViewItem();
                    lvi.Text       = "..";
                    lvi.ImageIndex = _iconListManager.AddFileId("d", "d", true);
                    FileList.Items.Add(lvi);
                    folderDeeplist[folderDeep] = selectedtree;
                    foreach (FolderTreeModel row in selectedtree.Rows.OrderBy(o => o.File != null).ToList())
                    {
                        lvi      = new ListViewItem();
                        lvi.Text = row.Title;
                        if (row.File != null)
                        {
                            lvi.ImageIndex = _iconListManager.AddFileId(Path.GetExtension(row.Title), row.Title, false);
                            double compresRatio = ConvertSize(row.File.decompressedSize, "MB") - ConvertSize(row.File.compressedSize, "MB") / ConvertSize(row.File.decompressedSize, "MB");
                            lvi.SubItems.Add(SizeSuffix(row.File.compressedSize));
                            lvi.SubItems.Add(SizeSuffix(row.File.decompressedSize));
                            lvi.SubItems.Add((compresRatio * 100).ToString("F").Substring(1) + " %");
                            lvi.Tag = row.File;
                        }
                        else
                        {
                            lvi.ImageIndex = _iconListManager.AddFileId(row.Title, row.Title, true);
                            lvi.SubItems.Add("-");
                            lvi.SubItems.Add("-");
                            lvi.SubItems.Add("-");
                            lvi.Tag = row;
                        }

                        FileList.Items.Add(lvi);
                    }
                    folderDeep++;
                }
                this.FileList.ResumeLayout();
                this.FileList.EndUpdate();
                textBox1.Text = "";
                foreach (FolderTreeModel list in folderDeeplist.Values)
                {
                    textBox1.AppendText(list.Title + Path.DirectorySeparatorChar);
                }
                string ddd = textBox1.Text;
                textBox1.Text = ddd.TrimEnd(Path.DirectorySeparatorChar);
            }
        }