Exemple #1
0
        private void WindowMainMENU_FileModify_Click(object sender, RoutedEventArgs e)
        {
            var window = new ComponentWindow();

//            window.Component = _selectedComponent;    // original code
            window.Component = ((ComponentModel)_selectedComponent.Clone());   // GET A CLONE OF ITSELF TO THE WINDOW
            if (window.ShowDialog() == true)
            {
                App.ComponentRepository.Update(window.Component.ToRepositoryModel());
                LoadContacts();
            }
        }