private void SelectProcess_Click(object sender, RoutedEventArgs e) { if (!_ready || ProcessList.SelectedItems.Count != 1) { return; } var selectedProcess = ((ProcessListItem)ProcessList.SelectedItem).Process; MemoryReader.Attach(selectedProcess); DialogResult = true; Close(); }