From 0274d9cbef26124634c663d6148d06c8656e53b5 Mon Sep 17 00:00:00 2001 From: kozhilya Date: Tue, 20 May 2025 17:20:37 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=87=D1=82=D0=B8=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=87=D0=B8=D0=BB=20=D1=81=20WPF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pf2eDataScrapper/ImportApplication.cs | 7 +- .../WPF/Components/EntityViewControl.xaml | 99 -------- .../Component/EntityListControl.xaml} | 6 +- .../Component/EntityListControl.xaml.cs} | 12 +- .../EntityViewer/Component/ViewControl.xaml | 123 ++++++++++ .../Component/ViewControl.xaml.cs} | 85 +++---- .../EntityViewer/Component/ViewLadder.xaml | 13 ++ .../EntityViewer/Component/ViewLadder.xaml.cs | 140 +++++++++++ .../{Views => EntityViewer}/EntityForm.xaml | 15 +- .../EntityForm.xaml.cs | 16 +- .../EntityViewStructure/LadderType.cs | 4 +- .../EntityViewStructure/StructureBuilder.cs | 2 +- .../EntityViewStructure/StructureField.cs | 218 ++++++++++++++++++ .../StructureFieldComplex.cs | 8 +- .../EntityViewStructure/StructureFieldType.cs | 4 +- .../StructureProcessedObject.cs | 2 +- .../EntityViewStructure/StructureRow.cs | 149 ++++++++++++ .../Stores/SelectedEntityStore.cs | 2 +- .../Stores/SelectedEntityTypeStore.cs | 2 +- .../ViewModel}/EntityFormViewModel.cs | 56 +++-- .../ViewModel/EntityListViewModel.cs} | 10 +- .../ViewModel/ViewViewModel.cs} | 24 +- .../EntityViewStructure/StructureField.cs | 63 ----- .../EntityViewStructure/StructureFieldEnum.cs | 33 --- .../EntityViewStructure/StructureFieldNull.cs | 20 -- .../StructureFieldPrimitive.cs | 55 ----- .../StructureFieldReference.cs | 30 --- .../EntityViewStructure/StructureRow.cs | 175 -------------- ...ProgressFormWpf.xaml => ProgressForm.xaml} | 2 +- ...ssFormWpf.xaml.cs => ProgressForm.xaml.cs} | 4 +- .../WPF/WpfServiceProviderExtension.cs | 8 +- 31 files changed, 786 insertions(+), 601 deletions(-) delete mode 100644 Pf2eDataScrapper/WPF/Components/EntityViewControl.xaml rename Pf2eDataScrapper/WPF/{Components/DbEntityListControl.xaml => EntityViewer/Component/EntityListControl.xaml} (94%) rename Pf2eDataScrapper/WPF/{Components/DbEntityListControl.xaml.cs => EntityViewer/Component/EntityListControl.xaml.cs} (77%) create mode 100644 Pf2eDataScrapper/WPF/EntityViewer/Component/ViewControl.xaml rename Pf2eDataScrapper/WPF/{Components/EntityViewControl.xaml.cs => EntityViewer/Component/ViewControl.xaml.cs} (50%) create mode 100644 Pf2eDataScrapper/WPF/EntityViewer/Component/ViewLadder.xaml create mode 100644 Pf2eDataScrapper/WPF/EntityViewer/Component/ViewLadder.xaml.cs rename Pf2eDataScrapper/WPF/{Views => EntityViewer}/EntityForm.xaml (83%) rename Pf2eDataScrapper/WPF/{Views => EntityViewer}/EntityForm.xaml.cs (57%) rename Pf2eDataScrapper/WPF/{ViewModels => EntityViewer}/EntityViewStructure/LadderType.cs (85%) rename Pf2eDataScrapper/WPF/{ViewModels => EntityViewer}/EntityViewStructure/StructureBuilder.cs (98%) create mode 100644 Pf2eDataScrapper/WPF/EntityViewer/EntityViewStructure/StructureField.cs rename Pf2eDataScrapper/WPF/{ViewModels => EntityViewer}/EntityViewStructure/StructureFieldComplex.cs (97%) rename Pf2eDataScrapper/WPF/{ViewModels => EntityViewer}/EntityViewStructure/StructureFieldType.cs (88%) rename Pf2eDataScrapper/WPF/{ViewModels => EntityViewer}/EntityViewStructure/StructureProcessedObject.cs (93%) create mode 100644 Pf2eDataScrapper/WPF/EntityViewer/EntityViewStructure/StructureRow.cs rename Pf2eDataScrapper/WPF/{ => EntityViewer}/Stores/SelectedEntityStore.cs (88%) rename Pf2eDataScrapper/WPF/{ => EntityViewer}/Stores/SelectedEntityTypeStore.cs (89%) rename Pf2eDataScrapper/WPF/{ViewModels => EntityViewer/ViewModel}/EntityFormViewModel.cs (73%) rename Pf2eDataScrapper/WPF/{ViewModels/DbEntityListViewModel.cs => EntityViewer/ViewModel/EntityListViewModel.cs} (95%) rename Pf2eDataScrapper/WPF/{ViewModels/EntityViewViewModel.cs => EntityViewer/ViewModel/ViewViewModel.cs} (86%) delete mode 100644 Pf2eDataScrapper/WPF/ViewModels/EntityViewStructure/StructureField.cs delete mode 100644 Pf2eDataScrapper/WPF/ViewModels/EntityViewStructure/StructureFieldEnum.cs delete mode 100644 Pf2eDataScrapper/WPF/ViewModels/EntityViewStructure/StructureFieldNull.cs delete mode 100644 Pf2eDataScrapper/WPF/ViewModels/EntityViewStructure/StructureFieldPrimitive.cs delete mode 100644 Pf2eDataScrapper/WPF/ViewModels/EntityViewStructure/StructureFieldReference.cs delete mode 100644 Pf2eDataScrapper/WPF/ViewModels/EntityViewStructure/StructureRow.cs rename Pf2eDataScrapper/WPF/Views/{ProgressFormWpf.xaml => ProgressForm.xaml} (98%) rename Pf2eDataScrapper/WPF/Views/{ProgressFormWpf.xaml.cs => ProgressForm.xaml.cs} (95%) diff --git a/Pf2eDataScrapper/ImportApplication.cs b/Pf2eDataScrapper/ImportApplication.cs index 43425af..61d9763 100644 --- a/Pf2eDataScrapper/ImportApplication.cs +++ b/Pf2eDataScrapper/ImportApplication.cs @@ -6,6 +6,7 @@ using Pf2eDataScrapper.App; using Pf2eDataScrapper.Helpers; using Pf2eDataScrapper.Processors; using Pf2eDataScrapper.WPF; +using Pf2eDataScrapper.WPF.EntityViewer; using Pf2eDataScrapper.WPF.Views; using Pf2eModel; using Slugify; @@ -53,7 +54,7 @@ internal sealed class ImportApplication : Application private StartForm? _startFormWpf; - private ProgressFormWpf? _progressFormWpf; + private ProgressForm? _progressFormWpf; private EntityForm? _entityForm; @@ -89,9 +90,7 @@ internal sealed class ImportApplication : Application ServiceProvider ); - _progressFormWpf = ActivatorUtilities.CreateInstance( - ServiceProvider - ); + _progressFormWpf = ActivatorUtilities.CreateInstance(ServiceProvider); _progressFormWpf.WindowStartupLocation = WindowStartupLocation.CenterScreen; _progressFormWpf.Closing += Wpf_HandleFormClosing; _progressFormWpf.ApplicationStateChange += ApplicationStateChange; diff --git a/Pf2eDataScrapper/WPF/Components/EntityViewControl.xaml b/Pf2eDataScrapper/WPF/Components/EntityViewControl.xaml deleted file mode 100644 index 702e2ce..0000000 --- a/Pf2eDataScrapper/WPF/Components/EntityViewControl.xaml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Pf2eDataScrapper/WPF/Components/DbEntityListControl.xaml b/Pf2eDataScrapper/WPF/EntityViewer/Component/EntityListControl.xaml similarity index 94% rename from Pf2eDataScrapper/WPF/Components/DbEntityListControl.xaml rename to Pf2eDataScrapper/WPF/EntityViewer/Component/EntityListControl.xaml index cb9c466..69b7ad6 100644 --- a/Pf2eDataScrapper/WPF/Components/DbEntityListControl.xaml +++ b/Pf2eDataScrapper/WPF/EntityViewer/Component/EntityListControl.xaml @@ -1,13 +1,13 @@  /// Логика взаимодействия для DbEntityListControl.xaml /// -internal partial class DbEntityListControl : System.Windows.Controls.UserControl +internal partial class EntityListControl : System.Windows.Controls.UserControl { - public DbEntityListViewModel? ViewModel + public EntityListViewModel? ViewModel { get => _viewModel; set @@ -18,9 +18,9 @@ internal partial class DbEntityListControl : System.Windows.Controls.UserControl } } - private DbEntityListViewModel? _viewModel; + private EntityListViewModel? _viewModel; - public DbEntityListControl() + public EntityListControl() { InitializeComponent(); } diff --git a/Pf2eDataScrapper/WPF/EntityViewer/Component/ViewControl.xaml b/Pf2eDataScrapper/WPF/EntityViewer/Component/ViewControl.xaml new file mode 100644 index 0000000..89257ff --- /dev/null +++ b/Pf2eDataScrapper/WPF/EntityViewer/Component/ViewControl.xaml @@ -0,0 +1,123 @@ + + + + /FontAwesome.Sharp;component/fonts/#Font Awesome 6 Free Solid + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +