Esempio n. 1
0
        private void uxFileChange_Click(object sender, RoutedEventArgs e)
        {
            var window = new ObstacleWindow();

            window.Obstacle = selectedObstacle;

            if (window.ShowDialog() == true)
            {
                App.ObstacleRepository.Update(window.Obstacle.ToRepositoryModel());
                LoadObstacles();
            }
        }
Esempio n. 2
0
        private void uxNew_Click(object sender, RoutedEventArgs e)
        {
            var window = new ObstacleWindow();

            if (window.ShowDialog() == true)
            {
                var UiObstacleModel = window.Obstacle;

                var repositoryObstacleModel = UiObstacleModel.ToRepositoryModel();
                App.ContactRepository.Add(repositoryObstacleModel);

                // OR
                //App.ContactRepository.Add(window.Contact.ToRepositoryModel());
            }
        }