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