コード例 #1
0
        private void uxFileChange_Click(object sender, RoutedEventArgs e)
        {
            var window = new PartWindow();

            window.Part = selectedPart;

            if (window.ShowDialog() == true)
            {
                App.PartRepository.Update(window.Part.ToRepositoryModel());
                LoadParts();
            }
        }
コード例 #2
0
        // ==== Click Handlers - Start ====
        // ====
        private void uxFileNew_Click(object sender, RoutedEventArgs e)
        {
            var window = new PartWindow();

            if (window.ShowDialog() == true)
            {
                var uiPartModel = window.Part;

                var repositoryPartModel = uiPartModel.ToRepositoryModel();

                App.PartRepository.Add(repositoryPartModel);

                LoadParts();
            }
        }