예제 #1
0
        private void addButton_Click(object sender, RoutedEventArgs e)
        {
            var addCar = new AddEditCarWindow();

            this.IsEnabled  = false;
            addCar.Closing += AddCar_Closing;
        }
예제 #2
0
        private void editButton_Click(object sender, RoutedEventArgs e)
        {
            if (carsGrid.SelectedItems.Count > 0)
            {
                Car car     = carsGrid.SelectedItem as Car;
                var editCar = new AddEditCarWindow(car);

                this.IsEnabled   = false;
                editCar.Closing += AddCar_Closing;
            }
        }