private void ImportFilesWithFolders(string[] list, string rootFolder)
        {
            OpenDat dat        = ControlDat.GetDat(currentDat);
            string  treeFolder = GetCurrentTreeFolder();

            foreach (var file in list)
            {
                if (rootFolder != null)
                {
                    string folder = file.Substring(rootFolder.Length);
                    int    i      = folder.LastIndexOf('\\') + 1;
                    folder = folder.Remove(i);

                    if (folder.Length > 0)
                    {
                        if (treeFolder.Length > 0)
                        {
                            //if (folder[0] != '\\')
                            //    folder = folder.Insert(0, "\\"); // добавить в начало
                        }
                        else
                        {
                            if (folder[0] == '\\')
                            {
                                folder = folder.Substring(1);                    // удалить '\' в начале
                            }
                        }
                    }
                    dat.AddVirtualFile(file, treeFolder + folder);
                }
                else
                {
                    if (treeFolder.Length > 0)
                    {
                        dat.AddVirtualFile(file, treeFolder + '\\');
                    }
                    else
                    {
                        dat.AddVirtualFile(file, treeFolder);
                    }
                }
            }
            dat.OverwriteAll = false;

            // обновление списка
            if (rootFolder != null)
            {
                ReBuildTreeNode(dat);
            }
            if (treeFolder.Length > 0)
            {
                treeFolder += '\\';
            }
            FindFiles(currentDat, treeFolder);

            SaveToolStripButton.Enabled = true;
        }
        private void ImportFiles(string[] list)
        {
            OpenDat dat = ControlDat.GetDat(currentDat);

            string treeFolder = GetCurrentTreeFolder();

            if (treeFolder.Length > 0)
            {
                treeFolder += '\\';
            }

            foreach (var file in list)
            {
                dat.AddVirtualFile(file, treeFolder);
            }
            dat.OverwriteAll = false;

            // обновление списка
            FindFiles(currentDat, treeFolder);

            SaveToolStripButton.Enabled = true;
        }