Exemple #1
0
        public override AttachToProgramOptions[] Show(ShowAttachToProcessDialogOptions options)
        {
            AttachToProcessVM vm = null;

            try {
                var dlg = new AttachToProcessDlg();
                vm = new AttachToProcessVM(options, uiDispatcher.Value, dbgManager.Value, debuggerSettings.Value, programFormatterProvider.Value, classificationFormatMapService, textElementProvider, attachProgramOptionsAggregatorFactory.Value, () => SearchHelp(vm, dlg));
                dlg.DataContext = vm;
                dlg.Owner       = appWindow.MainWindow;
                var res = dlg.ShowDialog();
                if (res != true)
                {
                    return(Array.Empty <AttachToProgramOptions>());
                }
                return(vm.SelectedItems.Select(a => a.AttachProgramOptions.GetOptions()).ToArray());
            }
            finally {
                vm?.Dispose();
            }
        }
Exemple #2
0
 void SearchHelp(AttachToProcessVM vm, DependencyObject control) => messageBoxService.Show(vm.GetSearchHelpText(), ownerWindow: Window.GetWindow(control));