private void buttonCopy_Click(object sender, EventArgs e) { string targetDir = ((ComboBoxItem)comboBoxDrive.SelectedItem).DriveInfo.DriveLetter.ToString() + "\\"; formProgress = new FormCopyProgress(filesToCopy, targetDir); formProgress.ShowDialog(this); FillFileList(); }
private void buttonCopySelected_Click(object sender, EventArgs e) { string targetDir = ((ComboBoxItem)comboBoxDrive.SelectedItem).DriveInfo.DriveLetter.ToString() + "\\"; List <string> selectedFiles = new List <string>(); foreach (ListViewItem item in listViewFiles.Items) { if (item.Selected) { selectedFiles.Add((string)item.Tag); } } formProgress = new FormCopyProgress(selectedFiles.ToArray(), targetDir); formProgress.ShowDialog(this); FillFileList(); }