private void OnMoveClick(object sender, EventArgs e)
            {
                DestinationDirectoryDialog dialog = new DestinationDirectoryDialog();

                dialog.ShowDialog();
                if (dialog.DialogResult.Equals(DialogResult.OK))
                {
                    DirectoryInfo dir = (DirectoryInfo)dialog.SelectedFileOrDir;
                    Console.Beep();
                }
            }
            private void OnCopyClick(object sender, EventArgs e)
            {
                var    selectedFiles = SelectedFilesAndDirs.OfType <FileSystemInfo>().ToList();
                string sourceDir     = CurrentDirectory.FullName;
                DestinationDirectoryDialog dialog = new DestinationDirectoryDialog();

                dialog.ShowDialog();
                if (dialog.DialogResult.Equals(DialogResult.OK))
                {
                    DirectoryInfo targetDir = dialog.CurrentDirectory;
                    Copyer.CopyFiles(selectedFiles, sourceDir, targetDir.FullName);
                }
            }
Ejemplo n.º 3
0
 private void OnExtractClick(object sender, EventArgs e)
 {
     if (!(SelectedFileOrDir is FileInfo))
     {
         MessageBox.Show("The source you specified is not a file!", "Source Is No File");
     }
     else
     {
         FileInfo sourceFile = (FileInfo)SelectedFileOrDir;
         DestinationDirectoryDialog destinationDialog = new DestinationDirectoryDialog();
         destinationDialog.ShowDialog();
         if (destinationDialog.DialogResult.Equals(DialogResult.OK))
         {
             Compressor.DecompressArchive(sourceFile, destinationDialog.CurrentDirectory);
         }
     }
 }