Example #1
0
        private AttachToWacProcessDialogModel ShowWacProcessesList()
        {
            var model  = new AttachToWacProcessDialogModel(this);
            var window = new AttachToWacProcessDialog(model);
            var result = ShowDialog(window);

            return(result.GetValueOrDefault() ? model : null);
        }
Example #2
0
        private AttachToWacProcessDialogModel ShowWacProcessesList()
        {
            var connectionTypes = new List <string>();

            foreach (Transport transport in ((Debugger2)_dte.Debugger).Transports)
            {
                connectionTypes.Add(transport.Name);
            }

            var model  = new AttachToWacProcessDialogModel(this, connectionTypes);
            var window = new AttachToWacProcessDialog(model);
            var result = ShowDialog(window);

            return(result.GetValueOrDefault() ? model : null);
        }
Example #3
0
        public AttachToWacProcessDialog(AttachToWacProcessDialogModel model)
        {
            this.model = model ?? throw new ArgumentNullException(nameof(model));

            selectedProcesses       = new HashSet <int>();
            model.SelectedProcesses = selectedProcesses;

            this.DataContext = this.model;

            assistant        = new TypingAssistant();
            assistant.Idled += assistant_Idled;

            InitializeComponent();
            NoRecordsError.Visibility  = model.Processes.Count == 0 ? Visibility.Visible : Visibility.Hidden;
            ConnectionType.ItemsSource = model.ConnectionTypes;
        }