Exemplo n.º 1
0
        private void ZipToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var archivePath = Path.Combine(curDir.ToString(), "archive");
            var collection  = ExplorerWnds.SelectedIndices;

            CreateUniqueDirectory(ref archivePath);
            for (int i = 0; i < collection.Count; i++)
            {
                var file = FileList[collection[i]];
                file.Path = Path.Combine(curDir.ToString(), file.Name);
                if (file.IsFolder)
                {
                    var newPath = Path.Combine(archivePath, file.Name);
                    CreateUniqueDirectory(ref newPath);
                    CopyDirectory(file.Path, newPath);
                }
                else
                {
                    File.Copy(file.Path, Path.Combine(archivePath, file.Name), true);
                }
            }
            string folderPath = archivePath;

            CreateUniqueZip(ref archivePath);
            Directory.Delete(folderPath, true);

            var newNameForm = new RenameForm(archivePath);

            newNameForm.Show();

            Refresh_Button_Click(sender, e);
        }
Exemplo n.º 2
0
        private void RenameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form rename = new RenameForm(Path.Combine(curDir.ToString(), FileList[ExplorerWnds.SelectedIndices[0]].Name));

            rename.Show();
            Refresh_Button_Click(sender, e);
        }