public string[] GetPaths(Window ownerWindow) { var win = new OpenFromGACDlg(); const bool syntaxHighlight = true; var vm = new OpenFromGACVM(syntaxHighlight, classificationFormatMap, textElementProvider); win.DataContext = vm; win.Owner = ownerWindow ?? appWindow.MainWindow; if (win.ShowDialog() != true) return Array.Empty<string>(); return win.SelectedItems.Select(a => a.Path).ToArray(); }
public string[] GetPaths(Window?ownerWindow) { var win = new OpenFromGACDlg(); const bool syntaxHighlight = true; var vm = new OpenFromGACVM(syntaxHighlight, classificationFormatMap, textElementProvider); win.DataContext = vm; win.Owner = ownerWindow ?? appWindow.MainWindow; if (win.ShowDialog() != true) { return(Array.Empty <string>()); } return(win.SelectedItems.Select(a => a.Path).ToArray()); }