private void AddPilotButton_OnClick(object sender, RoutedEventArgs e) { var newPilot = new CPilot(PilotNameBox.Text, int.Parse(AssignRoundNoBox.Text)); Pilots.Add(newPilot); PilotsDataGrid.ItemsSource = null; PilotsDataGrid.ItemsSource = Pilots; }
public CPilot Clone() { var r = new CPilot(Name, AssignedRound); return(r); }