示例#1
0
        private void EditCar_Click(object sender, RoutedEventArgs e)
        {
            carToSend = (Car)lstCars.SelectedItem;
            AddEditDialog aeDialog1 = new AddEditDialog(carToSend);

            aeDialog1.Owner = this;

            aeDialog1.AssignResult += AddEditDlg_AssignResult;
            //show dialog
            bool?result = aeDialog1.ShowDialog();
        }
示例#2
0
        private void AddButtonClicked(object sender, RoutedEventArgs e)
        {
            carToSend = null;
            AddEditDialog aeDialog = new AddEditDialog(carToSend);

            aeDialog.Owner         = this;
            aeDialog.AssignResult += AddEditDlg_AssignResult;

            //show dialog
            bool?result = aeDialog.ShowDialog();
        }