public static OpenFilenames ( IEnumerable |
||
filenames | IEnumerable |
|
mainWindow | ||
return | IEnumerator |
private void MainWindow_DragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop)) { var filenames = (string[])e.Data.GetData(DataFormats.FileDrop); Scheduler.Start( Program.OpenFilenames(filenames, this), TaskExecutionPolicy.RunAsBackgroundTask ); } }
private void OpenFilesMenu_Click(object sender, EventArgs e) { using (var dialog = new OpenFileDialog()) { dialog.Filter = "Heap Files|*.heaprecording;*.heapdiff|Heap Recordings|*.heaprecording|Heap Diffs|*.heapdiff"; dialog.CheckFileExists = true; dialog.CheckPathExists = true; dialog.Multiselect = true; dialog.ShowReadOnly = false; dialog.Title = "Open"; if (dialog.ShowDialog(this) != System.Windows.Forms.DialogResult.OK) { return; } Scheduler.Start( Program.OpenFilenames(dialog.FileNames, this), TaskExecutionPolicy.RunAsBackgroundTask ); } }