private void clientNew_Click(object sender, RoutedEventArgs e) { switch (mainTab.SelectedIndex) { case 0: addTripWd = new newTripWindow(); addTripWd.AcceptEvent += AddTripWd_AcceptEvent; addTripWd.Show(); break; case 1: addClientWd = new newClientWindow(); addClientWd.AcceptEvent += AddClientWd_AcceptEvent; addClientWd.Show(); break; case 2: addCadetWd = new newCadetWindow(); addCadetWd.AcceptEvent += AddCadetWd_AcceptEvent; addCadetWd.Show(); break; default: break; } }
private void ribbNewTrip_Click(object sender, RoutedEventArgs e) { addTripWd = new newTripWindow(); addTripWd.AcceptEvent += AddTripWd_AcceptEvent; addTripWd.Show(); }