Пример #1
0
        private void AddButtonClicked(object sender, RoutedEventArgs e)
        {
            AddEditDialog dlg = new AddEditDialog(null);

            dlg.Owner = this;
            bool?result = dlg.ShowDialog();

            if (result == true)
            {
                refreshFlights();
            }
        }
Пример #2
0
 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();
         }
     }
 }