Exemple #1
0
 private void b_new_Click(object sender, RoutedEventArgs e)
 {
     b_new.IsEnabled            = false;
     b_editselected.IsEnabled   = false;
     b_deleteselected.IsEnabled = false;
     changeTraveller            = new ChangeTravellerWindow(this);
     changeTraveller.ShowDialog();
 }
Exemple #2
0
 private void b_editselected_Click(object sender, RoutedEventArgs e)
 {
     if (lv_lista.SelectedItem != null)
     {
         b_new.IsEnabled            = false;
         b_editselected.IsEnabled   = false;
         b_deleteselected.IsEnabled = false;
         changeTraveller            = new ChangeTravellerWindow(this, (TravellerObject)lv_lista.SelectedItem);
         changeTraveller.ShowDialog();
     }
     else
     {
         MessageBox.Show("Nothing selected.", "Error!", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }