private void AddButtonClicked(object sender, RoutedEventArgs e) { AddEditDialog dlg = new AddEditDialog(null); dlg.Owner = this; bool?result = dlg.ShowDialog(); if (result == true) { refreshFlights(); } }
private void lstFlights_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (lstFlights.Items.Count != 0 && lstFlights.SelectedIndex != -1) { Flight flight = (Flight)lstFlights.SelectedItem; AddEditDialog dlg = new AddEditDialog(flight); dlg.Owner = this; bool?result = dlg.ShowDialog(); if (result == true) { refreshFlights(); } } }