From 7ca6e4e12735be4e232bdf37d2e8822af5839547 Mon Sep 17 00:00:00 2001 From: "David P.G" Date: Fri, 18 Jul 2025 22:21:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E9=A1=B9=E7=9B=AE=EF=BC=8C?= =?UTF-8?q?=E5=B0=86=E9=A1=B9=E7=9B=AE=E6=8B=86=E5=88=86=EF=BC=88=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E6=8F=90=E4=BA=A4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DMS.Application/Class1.cs | 7 + DMS.Application/DMS.Application.csproj | 16 + .../Configurations}/nlog.config | 0 DMS.Core/DMS.Core.csproj | 34 + {DMS => DMS.Core}/Enums/Brand.cs | 2 +- {DMS => DMS.Core}/Enums/DeviceType.cs | 2 +- {DMS => DMS.Core}/Enums/LoadTypes.cs | 2 +- {DMS => DMS.Core}/Enums/MenuType.cs | 2 +- {DMS => DMS.Core}/Enums/MqttPlatform.cs | 2 +- {DMS => DMS.Core}/Enums/NotificationType.cs | 2 +- {DMS => DMS.Core}/Enums/OpcUaUpdateType.cs | 2 +- {DMS => DMS.Core}/Enums/PollLevelType.cs | 2 +- {DMS => DMS.Core}/Enums/ProtocolType.cs | 2 +- {DMS => DMS.Core}/Enums/SignalType.cs | 2 +- {DMS => DMS.Core}/Helper/NlogHelper.cs | 0 DMS.Core/Models/Device.cs | 88 +++ DMS.Core/Models/MenuBean.cs | 55 ++ DMS.Core/Models/Mqtt.cs | 96 +++ {DMS => DMS.Core}/Models/Notification.cs | 2 +- DMS.Core/Models/OpcUaNode.cs | 68 ++ {DMS => DMS.Core}/Models/User.cs | 0 DMS.Core/Models/Variable.cs | 168 +++++ {DMS => DMS.Core}/Models/VariableContext.cs | 0 DMS.Core/Models/VariableMqtt.cs | 76 ++ DMS.Core/Models/VariableTable.cs | 51 ++ DMS.Infrastructure/Class1.cs | 7 + .../Configurations}/ConnectionSettings.cs | 0 DMS.Infrastructure/DMS.Infrastructure.csproj | 27 + {DMS => DMS.Infrastructure}/Data/DbContext.cs | 2 +- .../Entities/DbDevice.cs | 6 +- .../Entities/DbMenu.cs | 4 +- .../Entities/DbMqtt.cs | 4 +- .../Entities/DbNlog.cs | 2 +- .../Entities/DbUser.cs | 2 +- .../Entities/DbVariable.cs | 4 +- .../Entities/DbVariableHistory.cs | 2 +- .../Entities/DbVariableMqtt.cs | 2 +- .../Entities/DbVariableTable.cs | 4 +- .../Profiles/MappingProfile.cs | 2 +- .../Repositories/DeviceRepository.cs | 6 +- .../Repositories/MenuRepository.cs | 6 +- .../Repositories/MqttRepository.cs | 6 +- .../Repositories/UserRepository.cs | 4 +- .../Repositories/VarDataRepository.cs | 4 +- .../Repositories/VarTableRepository.cs | 6 +- .../VariableMqttAliasRepository.cs | 4 +- DMS.WPF/App.xaml | 9 + DMS.WPF/App.xaml.cs | 14 + DMS.WPF/AssemblyInfo.cs | 10 + {DMS => DMS.WPF}/Assets/AppIcon.png | Bin DMS.WPF/DMS.WPF.csproj | 152 ++++ {DMS => DMS.WPF}/Extensions/BindingProxy.cs | 0 .../Extensions/EnumBindingSourceExtension.cs | 0 .../Extensions/ObjectExtensions.cs | 0 {DMS => DMS.WPF}/Extensions/TaskExtensions.cs | 0 {DMS => DMS.WPF}/Helper/DataServicesHelper.cs | 2 +- {DMS => DMS.WPF}/Helper/ExcelHelper.cs | 2 +- {DMS => DMS.WPF}/Helper/MenuHelper.cs | 0 {DMS => DMS.WPF}/Helper/MessageHelper.cs | 2 +- {DMS => DMS.WPF}/Helper/NotificationHelper.cs | 2 +- {DMS => DMS.WPF}/Helper/ServiceHelper.cs | 2 +- {DMS => DMS.WPF}/Helper/SiemensHelper.cs | 0 {DMS => DMS.WPF}/Helper/ThemeHelper.cs | 0 DMS.WPF/MainWindow.xaml | 12 + DMS.WPF/MainWindow.xaml.cs | 24 + {DMS => DMS.WPF}/Message/LoadMessage.cs | 2 +- {DMS => DMS.WPF}/Message/MyMessage.cs | 0 {DMS => DMS.WPF}/Message/NavgatorMessage.cs | 0 .../Message/NotificationMessage.cs | 2 +- {DMS => DMS.WPF}/Message/ReqMessage.cs | 0 {DMS => DMS.WPF}/Message/UpdateMenuMessage.cs | 0 {DMS => DMS.WPF}/Models/Device.cs | 2 +- {DMS => DMS.WPF}/Models/MenuBean.cs | 2 +- {DMS => DMS.WPF}/Models/Mqtt.cs | 2 +- DMS.WPF/Models/Notification.cs | 24 + {DMS => DMS.WPF}/Models/OpcUaNode.cs | 0 DMS.WPF/Models/User.cs | 14 + {DMS => DMS.WPF}/Models/Variable.cs | 2 +- DMS.WPF/Models/VariableContext.cs | 16 + {DMS => DMS.WPF}/Models/VariableMqtt.cs | 2 +- {DMS => DMS.WPF}/Models/VariableTable.cs | 2 +- .../DevicesItemTemplateDictionary.xaml | 0 .../Services/DataProcessingService.cs | 0 {DMS => DMS.WPF}/Services/DataServices.cs | 2 +- {DMS => DMS.WPF}/Services/DialogService.cs | 2 +- .../Services/GrowlNotificationService.cs | 2 +- .../Services/IDataProcessingService.cs | 0 {DMS => DMS.WPF}/Services/IDialogService.cs | 2 +- .../Services/INotificationService.cs | 2 +- .../Services/IVariableProcessor.cs | 0 {DMS => DMS.WPF}/Services/LogService.cs | 0 .../Services/MqttBackgroundService.cs | 0 {DMS => DMS.WPF}/Services/NavgatorServices.cs | 2 +- .../Services/OpcUaBackgroundService.cs | 2 +- .../Processors/CheckValueChangedProcessor.cs | 0 .../Services/Processors/HistoryProcessor.cs | 0 .../Services/Processors/LoggingProcessor.cs | 0 .../Processors/MqttPublishProcessor.cs | 0 .../Processors/UpdateDbVariableProcessor.cs | 0 .../Services/S7BackgroundService.cs | 2 +- .../ValueConverts/EnumDescriptionConverter.cs | 0 .../ValueConverts/NullableBooleanConverter.cs | 0 .../ViewModels/DataTransformViewModel.cs | 0 .../ViewModels/DeviceDetailViewModel.cs | 2 +- .../ViewModels/DevicesViewModel.cs | 2 +- .../Dialogs/ConfrimDialogViewModel.cs | 0 .../Dialogs/DeviceDialogViewModel.cs | 0 .../Dialogs/ImportExcelDialogViewModel.cs | 0 .../Dialogs/ImportResultDialogViewModel.cs | 0 .../Dialogs/IsActiveDialogViewModel.cs | 2 +- .../MqttAliasBatchEditDialogViewModel.cs | 0 .../Dialogs/MqttAliasDialogViewModel.cs | 0 .../ViewModels/Dialogs/MqttDialogViewModel.cs | 0 .../Dialogs/MqttSelectionDialogViewModel.cs | 0 .../Dialogs/OpcUaImportDialogViewModel.cs | 2 +- .../Dialogs/OpcUaUpdateTypeDialogViewModel.cs | 2 +- .../Dialogs/PollLevelDialogViewModel.cs | 2 +- .../Dialogs/ProcessingDialogViewModel.cs | 0 .../Dialogs/VarDataDialogViewModel.cs | 0 .../Dialogs/VarTableDialogViewModel.cs | 0 {DMS => DMS.WPF}/ViewModels/HomeViewModel.cs | 0 {DMS => DMS.WPF}/ViewModels/MainViewModel.cs | 2 +- .../ViewModels/MqttServerDetailViewModel.cs | 2 +- {DMS => DMS.WPF}/ViewModels/MqttsViewModel.cs | 2 +- .../ViewModels/SettingViewModel.cs | 0 .../ViewModels/VariableTableViewModel.cs | 2 +- {DMS => DMS.WPF}/ViewModels/ViewModelBase.cs | 0 {DMS => DMS.WPF}/Views/DataTransformView.xaml | 0 .../Views/DataTransformView.xaml.cs | 0 {DMS => DMS.WPF}/Views/DeviceDetailView.xaml | 0 .../Views/DeviceDetailView.xaml.cs | 0 {DMS => DMS.WPF}/Views/DevicesView.xaml | 0 {DMS => DMS.WPF}/Views/DevicesView.xaml.cs | 0 .../Views/Dialogs/ConfirmDialog.xaml | 2 +- .../Views/Dialogs/ConfirmDialog.xaml.cs | 0 .../Views/Dialogs/DeviceDialog.xaml | 2 +- .../Views/Dialogs/DeviceDialog.xaml.cs | 0 .../Views/Dialogs/ImportExcelDialog.xaml | 0 .../Views/Dialogs/ImportExcelDialog.xaml.cs | 0 .../Views/Dialogs/ImportResultDialog.xaml | 0 .../Views/Dialogs/ImportResultDialog.xaml.cs | 0 .../Views/Dialogs/IsActiveDialog.xaml | 0 .../Views/Dialogs/IsActiveDialog.xaml.cs | 0 .../Dialogs/MqttAliasBatchEditDialog.xaml | 0 .../Dialogs/MqttAliasBatchEditDialog.xaml.cs | 0 .../Views/Dialogs/MqttAliasDialog.xaml | 0 .../Views/Dialogs/MqttAliasDialog.xaml.cs | 0 .../Views/Dialogs/MqttDialog.xaml | 2 +- .../Views/Dialogs/MqttDialog.xaml.cs | 0 .../Views/Dialogs/MqttSelectionDialog.xaml | 0 .../Views/Dialogs/MqttSelectionDialog.xaml.cs | 0 .../Views/Dialogs/OpcUaImportDialog.xaml | 0 .../Views/Dialogs/OpcUaImportDialog.xaml.cs | 0 .../Views/Dialogs/OpcUaUpdateTypeDialog.xaml | 2 +- .../Dialogs/OpcUaUpdateTypeDialog.xaml.cs | 0 .../Views/Dialogs/PollLevelDialog.xaml | 2 +- .../Views/Dialogs/PollLevelDialog.xaml.cs | 0 .../Views/Dialogs/ProcessingDialog.xaml | 0 .../Views/Dialogs/ProcessingDialog.xaml.cs | 0 .../Views/Dialogs/VarDataDialog.xaml | 2 +- .../Views/Dialogs/VarDataDialog.xaml.cs | 0 .../Views/Dialogs/VarTableDialog.xaml | 2 +- .../Views/Dialogs/VarTableDialog.xaml.cs | 0 {DMS => DMS.WPF}/Views/HomeView.xaml | 0 {DMS => DMS.WPF}/Views/HomeView.xaml.cs | 0 {DMS => DMS.WPF}/Views/MainView.xaml | 0 {DMS => DMS.WPF}/Views/MainView.xaml.cs | 2 +- .../Views/MqttServerDetailView.xaml | 2 +- .../Views/MqttServerDetailView.xaml.cs | 0 {DMS => DMS.WPF}/Views/MqttsView.xaml | 0 {DMS => DMS.WPF}/Views/MqttsView.xaml.cs | 0 {DMS => DMS.WPF}/Views/SettingView.xaml | 0 {DMS => DMS.WPF}/Views/SettingView.xaml.cs | 0 {DMS => DMS.WPF}/Views/VariableTableView.xaml | 2 +- .../Views/VariableTableView.xaml.cs | 2 +- DMS.sln | 40 +- DMS/App.xaml | 21 - DMS/App.xaml.cs | 260 ------- DMS/AppIcon2.ico | Bin 67646 -> 0 bytes DMS/DMS.csproj | 70 -- DMS/Data/Repositories/BaseRepositories.cs | 49 -- DMS/Exceptions/DbExistException.cs | 16 - DMS/LICENSE.txt | 661 ------------------ DMS/NetIcon256X256.ico | Bin 270398 -> 0 bytes DMS/PMSWPF.OpcUaClient.Config.xml | 58 -- PMSWPF.Tests/ExcelHelperTests.cs | 150 ---- PMSWPF.Tests/MqttRepositoryTests.cs | 152 ---- PMSWPF.Tests/NotificationHelperTests.cs | 99 --- PMSWPF.Tests/PMSWPF.Tests.csproj | 37 - 189 files changed, 1090 insertions(+), 1667 deletions(-) create mode 100644 DMS.Application/Class1.cs create mode 100644 DMS.Application/DMS.Application.csproj rename {DMS/Config => DMS.Core/Configurations}/nlog.config (100%) create mode 100644 DMS.Core/DMS.Core.csproj rename {DMS => DMS.Core}/Enums/Brand.cs (88%) rename {DMS => DMS.Core}/Enums/DeviceType.cs (84%) rename {DMS => DMS.Core}/Enums/LoadTypes.cs (70%) rename {DMS => DMS.Core}/Enums/MenuType.cs (80%) rename {DMS => DMS.Core}/Enums/MqttPlatform.cs (84%) rename {DMS => DMS.Core}/Enums/NotificationType.cs (79%) rename {DMS => DMS.Core}/Enums/OpcUaUpdateType.cs (86%) rename {DMS => DMS.Core}/Enums/PollLevelType.cs (97%) rename {DMS => DMS.Core}/Enums/ProtocolType.cs (89%) rename {DMS => DMS.Core}/Enums/SignalType.cs (95%) rename {DMS => DMS.Core}/Helper/NlogHelper.cs (100%) create mode 100644 DMS.Core/Models/Device.cs create mode 100644 DMS.Core/Models/MenuBean.cs create mode 100644 DMS.Core/Models/Mqtt.cs rename {DMS => DMS.Core}/Models/Notification.cs (94%) create mode 100644 DMS.Core/Models/OpcUaNode.cs rename {DMS => DMS.Core}/Models/User.cs (100%) create mode 100644 DMS.Core/Models/Variable.cs rename {DMS => DMS.Core}/Models/VariableContext.cs (100%) create mode 100644 DMS.Core/Models/VariableMqtt.cs create mode 100644 DMS.Core/Models/VariableTable.cs create mode 100644 DMS.Infrastructure/Class1.cs rename {DMS/Config => DMS.Infrastructure/Configurations}/ConnectionSettings.cs (100%) create mode 100644 DMS.Infrastructure/DMS.Infrastructure.csproj rename {DMS => DMS.Infrastructure}/Data/DbContext.cs (95%) rename {DMS/Data => DMS.Infrastructure}/Entities/DbDevice.cs (93%) rename {DMS/Data => DMS.Infrastructure}/Entities/DbMenu.cs (95%) rename {DMS/Data => DMS.Infrastructure}/Entities/DbMqtt.cs (97%) rename {DMS/Data => DMS.Infrastructure}/Entities/DbNlog.cs (97%) rename {DMS/Data => DMS.Infrastructure}/Entities/DbUser.cs (93%) rename {DMS/Data => DMS.Infrastructure}/Entities/DbVariable.cs (98%) rename {DMS/Data => DMS.Infrastructure}/Entities/DbVariableHistory.cs (96%) rename {DMS/Data => DMS.Infrastructure}/Entities/DbVariableMqtt.cs (97%) rename {DMS/Data => DMS.Infrastructure}/Entities/DbVariableTable.cs (95%) rename {DMS => DMS.Infrastructure}/Profiles/MappingProfile.cs (96%) rename {DMS/Data => DMS.Infrastructure}/Repositories/DeviceRepository.cs (98%) rename {DMS/Data => DMS.Infrastructure}/Repositories/MenuRepository.cs (98%) rename {DMS/Data => DMS.Infrastructure}/Repositories/MqttRepository.cs (98%) rename {DMS/Data => DMS.Infrastructure}/Repositories/UserRepository.cs (97%) rename {DMS/Data => DMS.Infrastructure}/Repositories/VarDataRepository.cs (99%) rename {DMS/Data => DMS.Infrastructure}/Repositories/VarTableRepository.cs (97%) rename {DMS/Data => DMS.Infrastructure}/Repositories/VariableMqttAliasRepository.cs (98%) create mode 100644 DMS.WPF/App.xaml create mode 100644 DMS.WPF/App.xaml.cs create mode 100644 DMS.WPF/AssemblyInfo.cs rename {DMS => DMS.WPF}/Assets/AppIcon.png (100%) create mode 100644 DMS.WPF/DMS.WPF.csproj rename {DMS => DMS.WPF}/Extensions/BindingProxy.cs (100%) rename {DMS => DMS.WPF}/Extensions/EnumBindingSourceExtension.cs (100%) rename {DMS => DMS.WPF}/Extensions/ObjectExtensions.cs (100%) rename {DMS => DMS.WPF}/Extensions/TaskExtensions.cs (100%) rename {DMS => DMS.WPF}/Helper/DataServicesHelper.cs (99%) rename {DMS => DMS.WPF}/Helper/ExcelHelper.cs (99%) rename {DMS => DMS.WPF}/Helper/MenuHelper.cs (100%) rename {DMS => DMS.WPF}/Helper/MessageHelper.cs (97%) rename {DMS => DMS.WPF}/Helper/NotificationHelper.cs (99%) rename {DMS => DMS.WPF}/Helper/ServiceHelper.cs (99%) rename {DMS => DMS.WPF}/Helper/SiemensHelper.cs (100%) rename {DMS => DMS.WPF}/Helper/ThemeHelper.cs (100%) create mode 100644 DMS.WPF/MainWindow.xaml create mode 100644 DMS.WPF/MainWindow.xaml.cs rename {DMS => DMS.WPF}/Message/LoadMessage.cs (92%) rename {DMS => DMS.WPF}/Message/MyMessage.cs (100%) rename {DMS => DMS.WPF}/Message/NavgatorMessage.cs (100%) rename {DMS => DMS.WPF}/Message/NotificationMessage.cs (95%) rename {DMS => DMS.WPF}/Message/ReqMessage.cs (100%) rename {DMS => DMS.WPF}/Message/UpdateMenuMessage.cs (100%) rename {DMS => DMS.WPF}/Models/Device.cs (99%) rename {DMS => DMS.WPF}/Models/MenuBean.cs (98%) rename {DMS => DMS.WPF}/Models/Mqtt.cs (99%) create mode 100644 DMS.WPF/Models/Notification.cs rename {DMS => DMS.WPF}/Models/OpcUaNode.cs (100%) create mode 100644 DMS.WPF/Models/User.cs rename {DMS => DMS.WPF}/Models/Variable.cs (99%) create mode 100644 DMS.WPF/Models/VariableContext.cs rename {DMS => DMS.WPF}/Models/VariableMqtt.cs (98%) rename {DMS => DMS.WPF}/Models/VariableTable.cs (98%) rename {DMS => DMS.WPF}/Resources/DevicesItemTemplateDictionary.xaml (100%) rename {DMS => DMS.WPF}/Services/DataProcessingService.cs (100%) rename {DMS => DMS.WPF}/Services/DataServices.cs (99%) rename {DMS => DMS.WPF}/Services/DialogService.cs (99%) rename {DMS => DMS.WPF}/Services/GrowlNotificationService.cs (99%) rename {DMS => DMS.WPF}/Services/IDataProcessingService.cs (100%) rename {DMS => DMS.WPF}/Services/IDialogService.cs (98%) rename {DMS => DMS.WPF}/Services/INotificationService.cs (90%) rename {DMS => DMS.WPF}/Services/IVariableProcessor.cs (100%) rename {DMS => DMS.WPF}/Services/LogService.cs (100%) rename {DMS => DMS.WPF}/Services/MqttBackgroundService.cs (100%) rename {DMS => DMS.WPF}/Services/NavgatorServices.cs (98%) rename {DMS => DMS.WPF}/Services/OpcUaBackgroundService.cs (99%) rename {DMS => DMS.WPF}/Services/Processors/CheckValueChangedProcessor.cs (100%) rename {DMS => DMS.WPF}/Services/Processors/HistoryProcessor.cs (100%) rename {DMS => DMS.WPF}/Services/Processors/LoggingProcessor.cs (100%) rename {DMS => DMS.WPF}/Services/Processors/MqttPublishProcessor.cs (100%) rename {DMS => DMS.WPF}/Services/Processors/UpdateDbVariableProcessor.cs (100%) rename {DMS => DMS.WPF}/Services/S7BackgroundService.cs (99%) rename {DMS => DMS.WPF}/ValueConverts/EnumDescriptionConverter.cs (100%) rename {DMS => DMS.WPF}/ValueConverts/NullableBooleanConverter.cs (100%) rename {DMS => DMS.WPF}/ViewModels/DataTransformViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/DeviceDetailViewModel.cs (99%) rename {DMS => DMS.WPF}/ViewModels/DevicesViewModel.cs (99%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/ConfrimDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/DeviceDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/ImportExcelDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/ImportResultDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/IsActiveDialogViewModel.cs (96%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/MqttAliasDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/MqttDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/MqttSelectionDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs (99%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs (95%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/PollLevelDialogViewModel.cs (96%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/ProcessingDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/VarDataDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/Dialogs/VarTableDialogViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/HomeViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/MainViewModel.cs (99%) rename {DMS => DMS.WPF}/ViewModels/MqttServerDetailViewModel.cs (99%) rename {DMS => DMS.WPF}/ViewModels/MqttsViewModel.cs (99%) rename {DMS => DMS.WPF}/ViewModels/SettingViewModel.cs (100%) rename {DMS => DMS.WPF}/ViewModels/VariableTableViewModel.cs (99%) rename {DMS => DMS.WPF}/ViewModels/ViewModelBase.cs (100%) rename {DMS => DMS.WPF}/Views/DataTransformView.xaml (100%) rename {DMS => DMS.WPF}/Views/DataTransformView.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/DeviceDetailView.xaml (100%) rename {DMS => DMS.WPF}/Views/DeviceDetailView.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/DevicesView.xaml (100%) rename {DMS => DMS.WPF}/Views/DevicesView.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/ConfirmDialog.xaml (96%) rename {DMS => DMS.WPF}/Views/Dialogs/ConfirmDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/DeviceDialog.xaml (99%) rename {DMS => DMS.WPF}/Views/Dialogs/DeviceDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/ImportExcelDialog.xaml (100%) rename {DMS => DMS.WPF}/Views/Dialogs/ImportExcelDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/ImportResultDialog.xaml (100%) rename {DMS => DMS.WPF}/Views/Dialogs/ImportResultDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/IsActiveDialog.xaml (100%) rename {DMS => DMS.WPF}/Views/Dialogs/IsActiveDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/MqttAliasBatchEditDialog.xaml (100%) rename {DMS => DMS.WPF}/Views/Dialogs/MqttAliasBatchEditDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/MqttAliasDialog.xaml (100%) rename {DMS => DMS.WPF}/Views/Dialogs/MqttAliasDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/MqttDialog.xaml (98%) rename {DMS => DMS.WPF}/Views/Dialogs/MqttDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/MqttSelectionDialog.xaml (100%) rename {DMS => DMS.WPF}/Views/Dialogs/MqttSelectionDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/OpcUaImportDialog.xaml (100%) rename {DMS => DMS.WPF}/Views/Dialogs/OpcUaImportDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/OpcUaUpdateTypeDialog.xaml (95%) rename {DMS => DMS.WPF}/Views/Dialogs/OpcUaUpdateTypeDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/PollLevelDialog.xaml (96%) rename {DMS => DMS.WPF}/Views/Dialogs/PollLevelDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/ProcessingDialog.xaml (100%) rename {DMS => DMS.WPF}/Views/Dialogs/ProcessingDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/VarDataDialog.xaml (99%) rename {DMS => DMS.WPF}/Views/Dialogs/VarDataDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/Dialogs/VarTableDialog.xaml (97%) rename {DMS => DMS.WPF}/Views/Dialogs/VarTableDialog.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/HomeView.xaml (100%) rename {DMS => DMS.WPF}/Views/HomeView.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/MainView.xaml (100%) rename {DMS => DMS.WPF}/Views/MainView.xaml.cs (98%) rename {DMS => DMS.WPF}/Views/MqttServerDetailView.xaml (99%) rename {DMS => DMS.WPF}/Views/MqttServerDetailView.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/MqttsView.xaml (100%) rename {DMS => DMS.WPF}/Views/MqttsView.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/SettingView.xaml (100%) rename {DMS => DMS.WPF}/Views/SettingView.xaml.cs (100%) rename {DMS => DMS.WPF}/Views/VariableTableView.xaml (99%) rename {DMS => DMS.WPF}/Views/VariableTableView.xaml.cs (99%) delete mode 100644 DMS/App.xaml delete mode 100644 DMS/App.xaml.cs delete mode 100644 DMS/AppIcon2.ico delete mode 100644 DMS/DMS.csproj delete mode 100644 DMS/Data/Repositories/BaseRepositories.cs delete mode 100644 DMS/Exceptions/DbExistException.cs delete mode 100644 DMS/LICENSE.txt delete mode 100644 DMS/NetIcon256X256.ico delete mode 100644 DMS/PMSWPF.OpcUaClient.Config.xml delete mode 100644 PMSWPF.Tests/ExcelHelperTests.cs delete mode 100644 PMSWPF.Tests/MqttRepositoryTests.cs delete mode 100644 PMSWPF.Tests/NotificationHelperTests.cs delete mode 100644 PMSWPF.Tests/PMSWPF.Tests.csproj diff --git a/DMS.Application/Class1.cs b/DMS.Application/Class1.cs new file mode 100644 index 0000000..72e9e8c --- /dev/null +++ b/DMS.Application/Class1.cs @@ -0,0 +1,7 @@ +namespace DMS.Application +{ + public class Class1 + { + + } +} diff --git a/DMS.Application/DMS.Application.csproj b/DMS.Application/DMS.Application.csproj new file mode 100644 index 0000000..f3717bb --- /dev/null +++ b/DMS.Application/DMS.Application.csproj @@ -0,0 +1,16 @@ + + + + net8.0 + enable + enable + + + + + + + + + + diff --git a/DMS/Config/nlog.config b/DMS.Core/Configurations/nlog.config similarity index 100% rename from DMS/Config/nlog.config rename to DMS.Core/Configurations/nlog.config diff --git a/DMS.Core/DMS.Core.csproj b/DMS.Core/DMS.Core.csproj new file mode 100644 index 0000000..f3eb51a --- /dev/null +++ b/DMS.Core/DMS.Core.csproj @@ -0,0 +1,34 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + + Always + + + + + + + + + + + + + diff --git a/DMS/Enums/Brand.cs b/DMS.Core/Enums/Brand.cs similarity index 88% rename from DMS/Enums/Brand.cs rename to DMS.Core/Enums/Brand.cs index 3cba679..fbee5e5 100644 --- a/DMS/Enums/Brand.cs +++ b/DMS.Core/Enums/Brand.cs @@ -1,4 +1,4 @@ -namespace DMS.Enums; +namespace DMS.Core.Enums; /// /// PLC品牌 diff --git a/DMS/Enums/DeviceType.cs b/DMS.Core/Enums/DeviceType.cs similarity index 84% rename from DMS/Enums/DeviceType.cs rename to DMS.Core/Enums/DeviceType.cs index 587fc9d..90d4c15 100644 --- a/DMS/Enums/DeviceType.cs +++ b/DMS.Core/Enums/DeviceType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace DMS.Enums; +namespace DMS.Core.Enums; public enum DeviceType { diff --git a/DMS/Enums/LoadTypes.cs b/DMS.Core/Enums/LoadTypes.cs similarity index 70% rename from DMS/Enums/LoadTypes.cs rename to DMS.Core/Enums/LoadTypes.cs index d363c7d..45a3d85 100644 --- a/DMS/Enums/LoadTypes.cs +++ b/DMS.Core/Enums/LoadTypes.cs @@ -1,4 +1,4 @@ -namespace DMS.Enums; +namespace DMS.Core.Enums; public enum LoadTypes { diff --git a/DMS/Enums/MenuType.cs b/DMS.Core/Enums/MenuType.cs similarity index 80% rename from DMS/Enums/MenuType.cs rename to DMS.Core/Enums/MenuType.cs index 3185e4e..39da8c6 100644 --- a/DMS/Enums/MenuType.cs +++ b/DMS.Core/Enums/MenuType.cs @@ -1,4 +1,4 @@ -namespace DMS.Enums; +namespace DMS.Core.Enums; public enum MenuType { diff --git a/DMS/Enums/MqttPlatform.cs b/DMS.Core/Enums/MqttPlatform.cs similarity index 84% rename from DMS/Enums/MqttPlatform.cs rename to DMS.Core/Enums/MqttPlatform.cs index 664001d..258687b 100644 --- a/DMS/Enums/MqttPlatform.cs +++ b/DMS.Core/Enums/MqttPlatform.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace DMS.Enums; +namespace DMS.Core.Enums; public enum MqttPlatform { diff --git a/DMS/Enums/NotificationType.cs b/DMS.Core/Enums/NotificationType.cs similarity index 79% rename from DMS/Enums/NotificationType.cs rename to DMS.Core/Enums/NotificationType.cs index 5b46ff8..f8f0f77 100644 --- a/DMS/Enums/NotificationType.cs +++ b/DMS.Core/Enums/NotificationType.cs @@ -1,4 +1,4 @@ -namespace DMS.Enums; +namespace DMS.Core.Enums; public enum NotificationType { diff --git a/DMS/Enums/OpcUaUpdateType.cs b/DMS.Core/Enums/OpcUaUpdateType.cs similarity index 86% rename from DMS/Enums/OpcUaUpdateType.cs rename to DMS.Core/Enums/OpcUaUpdateType.cs index 0340ec7..6f3bb03 100644 --- a/DMS/Enums/OpcUaUpdateType.cs +++ b/DMS.Core/Enums/OpcUaUpdateType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace DMS.Enums; +namespace DMS.Core.Enums; public enum OpcUaUpdateType { diff --git a/DMS/Enums/PollLevelType.cs b/DMS.Core/Enums/PollLevelType.cs similarity index 97% rename from DMS/Enums/PollLevelType.cs rename to DMS.Core/Enums/PollLevelType.cs index 79afbd2..bfdd639 100644 --- a/DMS/Enums/PollLevelType.cs +++ b/DMS.Core/Enums/PollLevelType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace DMS.Enums +namespace DMS.Core.Enums { public enum PollLevelType { diff --git a/DMS/Enums/ProtocolType.cs b/DMS.Core/Enums/ProtocolType.cs similarity index 89% rename from DMS/Enums/ProtocolType.cs rename to DMS.Core/Enums/ProtocolType.cs index 5d322a8..6cdac1d 100644 --- a/DMS/Enums/ProtocolType.cs +++ b/DMS.Core/Enums/ProtocolType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace DMS.Enums; +namespace DMS.Core.Enums; public enum ProtocolType { diff --git a/DMS/Enums/SignalType.cs b/DMS.Core/Enums/SignalType.cs similarity index 95% rename from DMS/Enums/SignalType.cs rename to DMS.Core/Enums/SignalType.cs index 7761507..30b81b5 100644 --- a/DMS/Enums/SignalType.cs +++ b/DMS.Core/Enums/SignalType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace DMS.Enums; +namespace DMS.Core.Enums; public enum SignalType { diff --git a/DMS/Helper/NlogHelper.cs b/DMS.Core/Helper/NlogHelper.cs similarity index 100% rename from DMS/Helper/NlogHelper.cs rename to DMS.Core/Helper/NlogHelper.cs diff --git a/DMS.Core/Models/Device.cs b/DMS.Core/Models/Device.cs new file mode 100644 index 0000000..f223c1e --- /dev/null +++ b/DMS.Core/Models/Device.cs @@ -0,0 +1,88 @@ +using System.Collections.ObjectModel; + +using DMS.Core.Enums; + + +namespace DMS.Models; + +/// +/// 表示设备信息。 +/// +public partial class Device +{ + /// + /// 设备的描述信息。 + /// + private string description; + + /// + /// 设备的类型。 + /// + public DeviceType DeviceType { get; set; } + + /// + /// 设备的唯一标识符。 + /// + private int id; + + /// + /// 设备的IP地址。 + /// + private string ip; + + /// + /// 表示设备是否处于活动状态。 + /// + private bool isActive = true; + + + /// + /// 表示是否添加默认变量表。 + /// + private bool isAddDefVarTable = true; + + /// + /// 表示设备是否正在运行。 + /// + private bool isRuning; + + /// + /// 设备的名称。 + /// + private string name; + + /// + /// 设备的端口号。 + /// + private int prot; + + /// + /// PLC的CPU类型。 + /// + //private CpuType cpuType; + + /// + /// PLC的机架号。 + /// + private short rack; + + /// + /// PLC的槽号。 + /// + private short slot; + + /// + /// 设备的通信协议类型。 + /// + public ProtocolType ProtocolType { get; set; } + + /// + /// OPC UA Endpoint URL。 + /// + private string? opcUaEndpointUrl; + + /// + /// 设备关联的变量表列表。 + /// + public ObservableCollection? VariableTables { get; set; } +} \ No newline at end of file diff --git a/DMS.Core/Models/MenuBean.cs b/DMS.Core/Models/MenuBean.cs new file mode 100644 index 0000000..71f4171 --- /dev/null +++ b/DMS.Core/Models/MenuBean.cs @@ -0,0 +1,55 @@ +using DMS.Core.Enums; + +namespace DMS.Models; + +/// +/// 表示菜单项。 +/// +public class MenuBean +{ + /// + /// 菜单项关联的数据。 + /// + public object? Data { get; set; } + + /// + /// 菜单项关联的数据ID。 + /// + public int DataId { get; set; } + + /// + /// 菜单项的图标。 + /// + public string Icon { get; set; } + + /// + /// 菜单项的唯一标识符。 + /// + public int Id { get; set; } + + /// + /// 子菜单项列表。 + /// + public List Items { get; set; } + + /// + /// 菜单项的名称。 + /// + public string Name { get; set; } + + /// + /// 父菜单项。 + /// + public MenuBean Parent { get; set; } + + /// + /// 父菜单项的ID。 + /// + public int ParentId { get; set; } + + /// + /// 菜单项的类型。 + /// + public MenuType Type { get; set; } + +} \ No newline at end of file diff --git a/DMS.Core/Models/Mqtt.cs b/DMS.Core/Models/Mqtt.cs new file mode 100644 index 0000000..57e8de7 --- /dev/null +++ b/DMS.Core/Models/Mqtt.cs @@ -0,0 +1,96 @@ +using DMS.Core.Enums; + +namespace DMS.Models; + +/// +/// 表示MQTT配置信息。 +/// +public partial class Mqtt +{ + + /// + /// MQTT客户端ID。 + /// + public string ClientID { get; set; } + + /// + /// 连接时间。 + /// + public DateTime ConnTime { get; set; } + + /// + /// MQTT主机。 + /// + public string Host { get; set; } + + /// + /// MQTT配置的唯一标识符。 + /// + public int Id { get; set; } + + /// + /// 是否启用此MQTT配置。 + /// + private bool IsActive { get; set; } + + + /// + /// 显示连接的消息: + /// + private string ConnectMessage { get; set; } + + /// + /// 是否设置为默认MQTT客户端。 + /// + public int IsDefault { get; set; } + + /// + /// MQTT客户端名字。 + /// + public string Name { get; set; } + + /// + /// MQTT客户端登录密码。 + /// + public string PassWord { get; set; } + + /// + /// Mqtt平台类型。 + /// + public MqttPlatform Platform { get; set; } + + /// + /// MQTT主机端口。 + /// + public int Port { get; set; } + + /// + /// MQTT发布主题。 + /// + public string PublishTopic { get; set; } + + /// + /// MQTT备注。 + /// + public string Remark { get; set; } = String.Empty; + + /// + /// MQTT订阅主题。 + /// + public string SubTopic { get; set; } + + /// + /// MQTT客户端登录用户名。 + /// + public string UserName { get; set; } + + /// + /// 关联的变量数据列表。 + /// + public List? VariableMqtts { get; set; } + + /// + /// 是否连接。 + /// + private bool IsConnected { get; set; } +} \ No newline at end of file diff --git a/DMS/Models/Notification.cs b/DMS.Core/Models/Notification.cs similarity index 94% rename from DMS/Models/Notification.cs rename to DMS.Core/Models/Notification.cs index 6fa6435..4c8b7e3 100644 --- a/DMS/Models/Notification.cs +++ b/DMS.Core/Models/Notification.cs @@ -1,4 +1,4 @@ -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.Models; diff --git a/DMS.Core/Models/OpcUaNode.cs b/DMS.Core/Models/OpcUaNode.cs new file mode 100644 index 0000000..d3c604c --- /dev/null +++ b/DMS.Core/Models/OpcUaNode.cs @@ -0,0 +1,68 @@ +using System.Collections.ObjectModel; + +namespace DMS.Models; + +/// +/// 表示OPC UA节点,用于构建节点树。 +/// +public partial class OpcUaNode +{ + /// + /// 节点的显示名称。 + /// + public string DisplayName { get; set; } + + /// + /// 节点的唯一标识符。 + /// + public string NodeId { get; set; } + + /// + /// 节点的类型(例如,文件夹、变量)。 + /// + public NodeType NodeType { get; set; } + + /// + /// 子节点集合。 + /// + private ObservableCollection _children; + + /// + /// 指示节点是否已加载子节点。 + /// + private bool _isLoaded; + + /// + /// 指示节点是否正在加载子节点。 + /// + private bool _isLoading; + + /// + /// 节点的完整路径(可选,用于调试或显示)。 + /// + public string Path { get; set; } + + /// + /// 构造函数。 + /// + /// 显示名称。 + /// 节点ID。 + /// 节点类型。 + //public OpcUaNode(string displayName, NodeId nodeId, NodeType nodeType) + //{ + // DisplayName = displayName; + // NodeId = nodeId; + // NodeType = nodeType; + // Children = new ObservableCollection(); + //} +} + +/// +/// OPC UA节点类型枚举。 +/// +public enum NodeType +{ + Folder, + Object, + Variable +} diff --git a/DMS/Models/User.cs b/DMS.Core/Models/User.cs similarity index 100% rename from DMS/Models/User.cs rename to DMS.Core/Models/User.cs diff --git a/DMS.Core/Models/Variable.cs b/DMS.Core/Models/Variable.cs new file mode 100644 index 0000000..41b87a2 --- /dev/null +++ b/DMS.Core/Models/Variable.cs @@ -0,0 +1,168 @@ +using DMS.Core.Enums; + +namespace DMS.Models; + +/// +/// 表示变量数据信息。 +/// +public partial class Variable +{ + /// + /// 变量唯一标识符。 + /// + public int Id { get; set; } + + /// + /// 变量名称。 + /// + private string name; + + /// + /// 节点ID,用于标识变量在设备或系统中的唯一路径。 + /// + public string NodeId { get; set; } + + /// + /// 节点ID,用于标识变量在设备或系统中的唯一路径。 + /// + public string S7Address { get; set; } + + /// + /// OPC UA Endpoint URL。 + /// + public string? OpcUaEndpointUrl { get; set; } + + /// + /// OPC UA Node ID。 + /// + public string? OpcUaNodeId { get; set; } + + + /// + /// 变量描述。 + /// + private string description = String.Empty; + + /// + /// 协议类型,例如Modbus、OPC UA等。 + /// + public ProtocolType ProtocolType { get; set; } + + /// + /// 信号类型,例如模拟量、数字量等。 + /// + public SignalType SignalType { get; set; } + + /// + /// 数据类型,例如Int、Float、String等。 + /// + public string DataType { get; set; } + + /// + /// 变量当前原始数据值。 + /// + private string dataValue = String.Empty; + + /// + /// 变量经过转换或格式化后的显示值。 + /// + private string displayValue = String.Empty; + + /// + /// 指示变量是否处于激活状态。 + /// + public bool isActive; + + /// + /// 指示变量是否被选中 + /// + public bool isSelect; + + /// + /// 指示是否需要保存变量数据。 + /// + public bool IsSave { get; set; } + + /// + /// 指示是否需要对变量进行报警监测。 + /// + public bool IsAlarm { get; set; } + + /// + /// 轮询级别,例如1秒、5秒等。 + /// + private PollLevelType pollLevelType = PollLevelType.ThirtySeconds; + + /// + /// OPC UA更新类型,例如轮询或订阅。 + /// + private OpcUaUpdateType opcUaUpdateType = OpcUaUpdateType.OpcUaPoll; + + /// + /// 最后一次轮询时间。 + /// + public DateTime LastPollTime { get; set; } = DateTime.MinValue; + + /// + /// 指示变量是否已被逻辑删除。 + /// + public bool IsDeleted { get; set; } + + /// + /// 指示变量是否已被修改了。 + /// + private bool isModified; + + /// + /// 报警的最大值阈值。 + /// + public double AlarmMax { get; set; } + + /// + /// 报警的最小值阈值。 + /// + public double AlarmMin { get; set; } + + /// + /// 数据转换规则或表达式。 + /// + private string converstion = String.Empty; + + /// + /// 数据保存的范围或阈值。 + /// + public double SaveRange { get; set; } + + /// + /// 变量数据创建时间。 + /// + private DateTime createTime; + + + /// + /// 变量数据最后更新时间。 + /// + private DateTime updateTime = DateTime.Now; + + /// + /// 最后更新变量数据的用户。 + /// + public User UpdateUser { get; set; } + + /// + /// 关联的变量表ID。 + /// + public int VariableTableId { get; set; } + + /// + /// 关联的变量表实体。 + /// + public VariableTable? VariableTable { get; set; } + + /// + /// 关联的MQTT配置列表。 + /// + public List? VariableMqtts { get; set; } + + +} \ No newline at end of file diff --git a/DMS/Models/VariableContext.cs b/DMS.Core/Models/VariableContext.cs similarity index 100% rename from DMS/Models/VariableContext.cs rename to DMS.Core/Models/VariableContext.cs diff --git a/DMS.Core/Models/VariableMqtt.cs b/DMS.Core/Models/VariableMqtt.cs new file mode 100644 index 0000000..c2604c2 --- /dev/null +++ b/DMS.Core/Models/VariableMqtt.cs @@ -0,0 +1,76 @@ +using System; +using DMS.Core.Enums; + +namespace DMS.Models; + +/// +/// 表示变量数据与MQTT服务器之间的关联模型,包含MQTT别名。 +/// +public partial class VariableMqtt +{ + + + /// + /// 关联的唯一标识符。 + /// + public int Id { get; set; } + + /// + /// 关联的变量数据ID。 + /// + public int VariableId { get; set; } + + /// + /// 关联的MQTT服务器ID。 + /// + public int MqttId { get; set; } + + /// + /// 变量在该MQTT服务器上的别名。 + /// + private string _mqttAlias = string.Empty; + + /// + /// 变量的唯一标识符(S7地址或OPC UA NodeId)。 + /// + public string Identifier + { + get + { + if (Variable!=null) + { + + + if (Variable.ProtocolType == ProtocolType.S7) + { + return Variable.S7Address; + } + else if (Variable.ProtocolType == ProtocolType.OpcUA) + { + return Variable.OpcUaNodeId; + } + } + return string.Empty; + } + } + + /// + /// 创建时间。 + /// + public DateTime CreateTime { get; set; } = DateTime.Now; + + /// + /// 更新时间。 + /// + public DateTime UpdateTime { get; set; } = DateTime.Now; + + /// + /// 导航属性:关联的变量数据。 + /// + public Variable Variable { get; set; } + + /// + /// 导航属性:关联的MQTT服务器。 + /// + public Mqtt Mqtt { get; set; } +} \ No newline at end of file diff --git a/DMS.Core/Models/VariableTable.cs b/DMS.Core/Models/VariableTable.cs new file mode 100644 index 0000000..dbcc3c5 --- /dev/null +++ b/DMS.Core/Models/VariableTable.cs @@ -0,0 +1,51 @@ +using System.Collections.ObjectModel; +using System.ComponentModel; +using DMS.Core.Enums; + +namespace DMS.Models; + +/// +/// 表示变量表信息。 +/// +public partial class VariableTable +{ + /// + /// 变量表关联的设备。 + /// + public Device? Device { get; set; } + + /// + /// 变量表关联的设备ID。 + /// + public int? DeviceId { get; set; } + + /// + /// 变量表描述。 + /// + private string description; + + /// + /// 变量表中包含的数据变量列表。 + /// + public ObservableCollection variables; + + /// + /// 变量表的唯一标识符。 + /// + public int Id { get; set; } + + /// + /// 表示变量表是否处于活动状态。 + /// + private bool isActive; + + /// + /// 变量表名称。 + /// + private string name; + + /// + /// 变量表使用的协议类型。 + /// + public ProtocolType ProtocolType { get; set; } +} \ No newline at end of file diff --git a/DMS.Infrastructure/Class1.cs b/DMS.Infrastructure/Class1.cs new file mode 100644 index 0000000..f43bb86 --- /dev/null +++ b/DMS.Infrastructure/Class1.cs @@ -0,0 +1,7 @@ +namespace DMS.Infrastructure +{ + public class Class1 + { + + } +} diff --git a/DMS/Config/ConnectionSettings.cs b/DMS.Infrastructure/Configurations/ConnectionSettings.cs similarity index 100% rename from DMS/Config/ConnectionSettings.cs rename to DMS.Infrastructure/Configurations/ConnectionSettings.cs diff --git a/DMS.Infrastructure/DMS.Infrastructure.csproj b/DMS.Infrastructure/DMS.Infrastructure.csproj new file mode 100644 index 0000000..2de6fef --- /dev/null +++ b/DMS.Infrastructure/DMS.Infrastructure.csproj @@ -0,0 +1,27 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + + + + + + + + diff --git a/DMS/Data/DbContext.cs b/DMS.Infrastructure/Data/DbContext.cs similarity index 95% rename from DMS/Data/DbContext.cs rename to DMS.Infrastructure/Data/DbContext.cs index 9037e02..c8ad1b7 100644 --- a/DMS/Data/DbContext.cs +++ b/DMS.Infrastructure/Data/DbContext.cs @@ -1,7 +1,7 @@ using DMS.Config; using SqlSugar; -namespace DMS.Data; +namespace DMS.Infrastructure; public class DbContext { diff --git a/DMS/Data/Entities/DbDevice.cs b/DMS.Infrastructure/Entities/DbDevice.cs similarity index 93% rename from DMS/Data/Entities/DbDevice.cs rename to DMS.Infrastructure/Entities/DbDevice.cs index f732c42..c1893b4 100644 --- a/DMS/Data/Entities/DbDevice.cs +++ b/DMS.Infrastructure/Entities/DbDevice.cs @@ -1,11 +1,9 @@ -using DMS.Enums; using SqlSugar; using SqlSugar.DbConvert; -using ProtocolType = DMS.Enums.ProtocolType; using S7.Net; -using Enums_ProtocolType = DMS.Enums.ProtocolType; // AddAsync this using directive +using DMS.Core.Enums; -namespace DMS.Data.Entities; +namespace DMS.Infrastructure.Entities; /// /// 表示数据库中的设备实体。 diff --git a/DMS/Data/Entities/DbMenu.cs b/DMS.Infrastructure/Entities/DbMenu.cs similarity index 95% rename from DMS/Data/Entities/DbMenu.cs rename to DMS.Infrastructure/Entities/DbMenu.cs index a1fb965..6bd14d0 100644 --- a/DMS/Data/Entities/DbMenu.cs +++ b/DMS.Infrastructure/Entities/DbMenu.cs @@ -1,8 +1,8 @@ -using DMS.Enums; +using DMS.Core.Enums; using SqlSugar; using SqlSugar.DbConvert; -namespace DMS.Data.Entities; +namespace DMS.Infrastructure.Entities; /// /// 表示数据库中的菜单实体。 diff --git a/DMS/Data/Entities/DbMqtt.cs b/DMS.Infrastructure/Entities/DbMqtt.cs similarity index 97% rename from DMS/Data/Entities/DbMqtt.cs rename to DMS.Infrastructure/Entities/DbMqtt.cs index 84c9d09..952a3a4 100644 --- a/DMS/Data/Entities/DbMqtt.cs +++ b/DMS.Infrastructure/Entities/DbMqtt.cs @@ -1,8 +1,8 @@ -using DMS.Enums; +using DMS.Core.Enums; using SqlSugar; using SqlSugar.DbConvert; -namespace DMS.Data.Entities; +namespace DMS.Infrastructure.Entities; /// /// 表示数据库中的MQTT配置实体。 diff --git a/DMS/Data/Entities/DbNlog.cs b/DMS.Infrastructure/Entities/DbNlog.cs similarity index 97% rename from DMS/Data/Entities/DbNlog.cs rename to DMS.Infrastructure/Entities/DbNlog.cs index 5354595..a822a82 100644 --- a/DMS/Data/Entities/DbNlog.cs +++ b/DMS.Infrastructure/Entities/DbNlog.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace DMS.Data.Entities; +namespace DMS.Infrastructure.Entities; /// /// 表示数据库中的NLog日志实体。 diff --git a/DMS/Data/Entities/DbUser.cs b/DMS.Infrastructure/Entities/DbUser.cs similarity index 93% rename from DMS/Data/Entities/DbUser.cs rename to DMS.Infrastructure/Entities/DbUser.cs index e9cdbd4..4fa1ce4 100644 --- a/DMS/Data/Entities/DbUser.cs +++ b/DMS.Infrastructure/Entities/DbUser.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace DMS.Data.Entities; +namespace DMS.Infrastructure.Entities; /// /// 表示数据库中的用户实体。 diff --git a/DMS/Data/Entities/DbVariable.cs b/DMS.Infrastructure/Entities/DbVariable.cs similarity index 98% rename from DMS/Data/Entities/DbVariable.cs rename to DMS.Infrastructure/Entities/DbVariable.cs index d8fac42..f5cc221 100644 --- a/DMS/Data/Entities/DbVariable.cs +++ b/DMS.Infrastructure/Entities/DbVariable.cs @@ -1,8 +1,8 @@ -using DMS.Enums; +using DMS.Core.Enums; using SqlSugar; using SqlSugar.DbConvert; -namespace DMS.Data.Entities; +namespace DMS.Infrastructure.Entities; /// /// 表示数据库中的变量数据实体。 diff --git a/DMS/Data/Entities/DbVariableHistory.cs b/DMS.Infrastructure/Entities/DbVariableHistory.cs similarity index 96% rename from DMS/Data/Entities/DbVariableHistory.cs rename to DMS.Infrastructure/Entities/DbVariableHistory.cs index b0cea18..29649ba 100644 --- a/DMS/Data/Entities/DbVariableHistory.cs +++ b/DMS.Infrastructure/Entities/DbVariableHistory.cs @@ -1,7 +1,7 @@ using System; using SqlSugar; -namespace DMS.Data.Entities; +namespace DMS.Infrastructure.Entities; /// /// 表示数据库中的变量数据历史实体。 diff --git a/DMS/Data/Entities/DbVariableMqtt.cs b/DMS.Infrastructure/Entities/DbVariableMqtt.cs similarity index 97% rename from DMS/Data/Entities/DbVariableMqtt.cs rename to DMS.Infrastructure/Entities/DbVariableMqtt.cs index f862751..e71dfa9 100644 --- a/DMS/Data/Entities/DbVariableMqtt.cs +++ b/DMS.Infrastructure/Entities/DbVariableMqtt.cs @@ -1,7 +1,7 @@ using System; using SqlSugar; -namespace DMS.Data.Entities; +namespace DMS.Infrastructure.Entities; /// /// 表示变量数据与MQTT服务器之间的关联实体,包含MQTT别名。 diff --git a/DMS/Data/Entities/DbVariableTable.cs b/DMS.Infrastructure/Entities/DbVariableTable.cs similarity index 95% rename from DMS/Data/Entities/DbVariableTable.cs rename to DMS.Infrastructure/Entities/DbVariableTable.cs index 91ff197..1017124 100644 --- a/DMS/Data/Entities/DbVariableTable.cs +++ b/DMS.Infrastructure/Entities/DbVariableTable.cs @@ -1,8 +1,8 @@ -using DMS.Enums; +using DMS.Core.Enums; using SqlSugar; using SqlSugar.DbConvert; -namespace DMS.Data.Entities; +namespace DMS.Infrastructure.Entities; /// /// 表示数据库中的变量表实体。 diff --git a/DMS/Profiles/MappingProfile.cs b/DMS.Infrastructure/Profiles/MappingProfile.cs similarity index 96% rename from DMS/Profiles/MappingProfile.cs rename to DMS.Infrastructure/Profiles/MappingProfile.cs index 96cf4d0..4affa9d 100644 --- a/DMS/Profiles/MappingProfile.cs +++ b/DMS.Infrastructure/Profiles/MappingProfile.cs @@ -1,6 +1,6 @@ using System; using AutoMapper; -using DMS.Data.Entities; +using DMS.Infrastructure.Entities; using DMS.Models; namespace DMS.Profiles; diff --git a/DMS/Data/Repositories/DeviceRepository.cs b/DMS.Infrastructure/Repositories/DeviceRepository.cs similarity index 98% rename from DMS/Data/Repositories/DeviceRepository.cs rename to DMS.Infrastructure/Repositories/DeviceRepository.cs index 64d73e1..532f4c0 100644 --- a/DMS/Data/Repositories/DeviceRepository.cs +++ b/DMS.Infrastructure/Repositories/DeviceRepository.cs @@ -1,14 +1,14 @@ using System.Diagnostics; using AutoMapper; -using DMS.Data.Entities; -using DMS.Enums; +using DMS.Infrastructure.Entities; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; using iNKORE.UI.WPF.Modern.Common.IconKeys; using DMS.Extensions; using SqlSugar; -namespace DMS.Data.Repositories; +namespace DMS.Infrastructure.Repositories; public class DeviceRepository { diff --git a/DMS/Data/Repositories/MenuRepository.cs b/DMS.Infrastructure/Repositories/MenuRepository.cs similarity index 98% rename from DMS/Data/Repositories/MenuRepository.cs rename to DMS.Infrastructure/Repositories/MenuRepository.cs index 5da3020..1488dc6 100644 --- a/DMS/Data/Repositories/MenuRepository.cs +++ b/DMS.Infrastructure/Repositories/MenuRepository.cs @@ -3,12 +3,12 @@ using iNKORE.UI.WPF.Modern.Common.IconKeys; using DMS.Extensions; using SqlSugar; using AutoMapper; -using DMS.Data.Entities; -using DMS.Enums; +using DMS.Infrastructure.Entities; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; -namespace DMS.Data.Repositories; +namespace DMS.Infrastructure.Repositories; public class MenuRepository { diff --git a/DMS/Data/Repositories/MqttRepository.cs b/DMS.Infrastructure/Repositories/MqttRepository.cs similarity index 98% rename from DMS/Data/Repositories/MqttRepository.cs rename to DMS.Infrastructure/Repositories/MqttRepository.cs index 84a1d51..3d8543a 100644 --- a/DMS/Data/Repositories/MqttRepository.cs +++ b/DMS.Infrastructure/Repositories/MqttRepository.cs @@ -1,12 +1,12 @@ using System.Diagnostics; using AutoMapper; -using DMS.Data.Entities; -using DMS.Enums; +using DMS.Infrastructure.Entities; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; using iNKORE.UI.WPF.Modern.Common.IconKeys; -namespace DMS.Data.Repositories; +namespace DMS.Infrastructure.Repositories; /// /// Mqtt仓储类,用于操作DbMqtt实体 diff --git a/DMS/Data/Repositories/UserRepository.cs b/DMS.Infrastructure/Repositories/UserRepository.cs similarity index 97% rename from DMS/Data/Repositories/UserRepository.cs rename to DMS.Infrastructure/Repositories/UserRepository.cs index 7c7748d..830448f 100644 --- a/DMS/Data/Repositories/UserRepository.cs +++ b/DMS.Infrastructure/Repositories/UserRepository.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; -using DMS.Data.Entities; +using DMS.Infrastructure.Entities; using DMS.Helper; -namespace DMS.Data.Repositories; +namespace DMS.Infrastructure.Repositories; /// /// 用户仓储类,用于操作DbUser实体 diff --git a/DMS/Data/Repositories/VarDataRepository.cs b/DMS.Infrastructure/Repositories/VarDataRepository.cs similarity index 99% rename from DMS/Data/Repositories/VarDataRepository.cs rename to DMS.Infrastructure/Repositories/VarDataRepository.cs index 470af20..7d007e7 100644 --- a/DMS/Data/Repositories/VarDataRepository.cs +++ b/DMS.Infrastructure/Repositories/VarDataRepository.cs @@ -5,11 +5,11 @@ using DMS.Extensions; using SqlSugar; using AutoMapper; using Dm.util; -using DMS.Data.Entities; +using DMS.Infrastructure.Entities; using DMS.Helper; using DMS.Models; -namespace DMS.Data.Repositories; +namespace DMS.Infrastructure.Repositories; /// /// VariableData仓储类,用于操作DbVariableData实体 diff --git a/DMS/Data/Repositories/VarTableRepository.cs b/DMS.Infrastructure/Repositories/VarTableRepository.cs similarity index 97% rename from DMS/Data/Repositories/VarTableRepository.cs rename to DMS.Infrastructure/Repositories/VarTableRepository.cs index e9b404a..46e2b71 100644 --- a/DMS/Data/Repositories/VarTableRepository.cs +++ b/DMS.Infrastructure/Repositories/VarTableRepository.cs @@ -1,14 +1,14 @@ using iNKORE.UI.WPF.Modern.Common.IconKeys; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Extensions; using SqlSugar; using System.Diagnostics; using AutoMapper; -using DMS.Data.Entities; +using DMS.Infrastructure.Entities; using DMS.Helper; using DMS.Models; -namespace DMS.Data.Repositories; +namespace DMS.Infrastructure.Repositories; public class VarTableRepository { diff --git a/DMS/Data/Repositories/VariableMqttAliasRepository.cs b/DMS.Infrastructure/Repositories/VariableMqttAliasRepository.cs similarity index 98% rename from DMS/Data/Repositories/VariableMqttAliasRepository.cs rename to DMS.Infrastructure/Repositories/VariableMqttAliasRepository.cs index 3070de6..04edb51 100644 --- a/DMS/Data/Repositories/VariableMqttAliasRepository.cs +++ b/DMS.Infrastructure/Repositories/VariableMqttAliasRepository.cs @@ -1,9 +1,9 @@ using SqlSugar; using System.Collections.Generic; using System.Threading.Tasks; -using DMS.Data.Entities; +using DMS.Infrastructure.Entities; -namespace DMS.Data.Repositories; +namespace DMS.Infrastructure.Repositories; /// /// 变量与MQTT服务器别名关联的数据仓库。 diff --git a/DMS.WPF/App.xaml b/DMS.WPF/App.xaml new file mode 100644 index 0000000..ee0bcda --- /dev/null +++ b/DMS.WPF/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/DMS.WPF/App.xaml.cs b/DMS.WPF/App.xaml.cs new file mode 100644 index 0000000..0f78989 --- /dev/null +++ b/DMS.WPF/App.xaml.cs @@ -0,0 +1,14 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace DMS.WPF +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + +} diff --git a/DMS.WPF/AssemblyInfo.cs b/DMS.WPF/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/DMS.WPF/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/DMS/Assets/AppIcon.png b/DMS.WPF/Assets/AppIcon.png similarity index 100% rename from DMS/Assets/AppIcon.png rename to DMS.WPF/Assets/AppIcon.png diff --git a/DMS.WPF/DMS.WPF.csproj b/DMS.WPF/DMS.WPF.csproj new file mode 100644 index 0000000..a6925d7 --- /dev/null +++ b/DMS.WPF/DMS.WPF.csproj @@ -0,0 +1,152 @@ + + + + WinExe + net8.0-windows + enable + enable + true + + + + + + + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + + + + + + + + + + + diff --git a/DMS/Extensions/BindingProxy.cs b/DMS.WPF/Extensions/BindingProxy.cs similarity index 100% rename from DMS/Extensions/BindingProxy.cs rename to DMS.WPF/Extensions/BindingProxy.cs diff --git a/DMS/Extensions/EnumBindingSourceExtension.cs b/DMS.WPF/Extensions/EnumBindingSourceExtension.cs similarity index 100% rename from DMS/Extensions/EnumBindingSourceExtension.cs rename to DMS.WPF/Extensions/EnumBindingSourceExtension.cs diff --git a/DMS/Extensions/ObjectExtensions.cs b/DMS.WPF/Extensions/ObjectExtensions.cs similarity index 100% rename from DMS/Extensions/ObjectExtensions.cs rename to DMS.WPF/Extensions/ObjectExtensions.cs diff --git a/DMS/Extensions/TaskExtensions.cs b/DMS.WPF/Extensions/TaskExtensions.cs similarity index 100% rename from DMS/Extensions/TaskExtensions.cs rename to DMS.WPF/Extensions/TaskExtensions.cs diff --git a/DMS/Helper/DataServicesHelper.cs b/DMS.WPF/Helper/DataServicesHelper.cs similarity index 99% rename from DMS/Helper/DataServicesHelper.cs rename to DMS.WPF/Helper/DataServicesHelper.cs index eb8f7d8..80966da 100644 --- a/DMS/Helper/DataServicesHelper.cs +++ b/DMS.WPF/Helper/DataServicesHelper.cs @@ -1,4 +1,4 @@ -using DMS.Enums; +using DMS.Core.Enums; using DMS.Models; using DMS.ViewModels; using Microsoft.Extensions.DependencyInjection; diff --git a/DMS/Helper/ExcelHelper.cs b/DMS.WPF/Helper/ExcelHelper.cs similarity index 99% rename from DMS/Helper/ExcelHelper.cs rename to DMS.WPF/Helper/ExcelHelper.cs index 9ab164e..a6d0bd7 100644 --- a/DMS/Helper/ExcelHelper.cs +++ b/DMS.WPF/Helper/ExcelHelper.cs @@ -5,7 +5,7 @@ using System.Data; using System.IO; using System.Linq; using System.Reflection; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Models; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; diff --git a/DMS/Helper/MenuHelper.cs b/DMS.WPF/Helper/MenuHelper.cs similarity index 100% rename from DMS/Helper/MenuHelper.cs rename to DMS.WPF/Helper/MenuHelper.cs diff --git a/DMS/Helper/MessageHelper.cs b/DMS.WPF/Helper/MessageHelper.cs similarity index 97% rename from DMS/Helper/MessageHelper.cs rename to DMS.WPF/Helper/MessageHelper.cs index eaa2e60..f2a4a6b 100644 --- a/DMS/Helper/MessageHelper.cs +++ b/DMS.WPF/Helper/MessageHelper.cs @@ -1,5 +1,5 @@ using CommunityToolkit.Mvvm.Messaging; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Message; using DMS.ViewModels; diff --git a/DMS/Helper/NotificationHelper.cs b/DMS.WPF/Helper/NotificationHelper.cs similarity index 99% rename from DMS/Helper/NotificationHelper.cs rename to DMS.WPF/Helper/NotificationHelper.cs index 05608c2..6a28cf9 100644 --- a/DMS/Helper/NotificationHelper.cs +++ b/DMS.WPF/Helper/NotificationHelper.cs @@ -4,7 +4,7 @@ using System.Collections.Concurrent; using System.Runtime.CompilerServices; using System.Threading; using CommunityToolkit.Mvvm.Messaging; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Message; namespace DMS.Helper; diff --git a/DMS/Helper/ServiceHelper.cs b/DMS.WPF/Helper/ServiceHelper.cs similarity index 99% rename from DMS/Helper/ServiceHelper.cs rename to DMS.WPF/Helper/ServiceHelper.cs index fc2aedb..7ee58ce 100644 --- a/DMS/Helper/ServiceHelper.cs +++ b/DMS.WPF/Helper/ServiceHelper.cs @@ -1,4 +1,4 @@ -using DMS.Enums; +using DMS.Core.Enums; using Opc.Ua; using Opc.Ua.Client; using Opc.Ua.Configuration; diff --git a/DMS/Helper/SiemensHelper.cs b/DMS.WPF/Helper/SiemensHelper.cs similarity index 100% rename from DMS/Helper/SiemensHelper.cs rename to DMS.WPF/Helper/SiemensHelper.cs diff --git a/DMS/Helper/ThemeHelper.cs b/DMS.WPF/Helper/ThemeHelper.cs similarity index 100% rename from DMS/Helper/ThemeHelper.cs rename to DMS.WPF/Helper/ThemeHelper.cs diff --git a/DMS.WPF/MainWindow.xaml b/DMS.WPF/MainWindow.xaml new file mode 100644 index 0000000..be9bd37 --- /dev/null +++ b/DMS.WPF/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/DMS.WPF/MainWindow.xaml.cs b/DMS.WPF/MainWindow.xaml.cs new file mode 100644 index 0000000..0138b1a --- /dev/null +++ b/DMS.WPF/MainWindow.xaml.cs @@ -0,0 +1,24 @@ +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace DMS.WPF +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/DMS/Message/LoadMessage.cs b/DMS.WPF/Message/LoadMessage.cs similarity index 92% rename from DMS/Message/LoadMessage.cs rename to DMS.WPF/Message/LoadMessage.cs index 75c1ef5..cda7baa 100644 --- a/DMS/Message/LoadMessage.cs +++ b/DMS.WPF/Message/LoadMessage.cs @@ -1,5 +1,5 @@ using CommunityToolkit.Mvvm.Messaging.Messages; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.Message; diff --git a/DMS/Message/MyMessage.cs b/DMS.WPF/Message/MyMessage.cs similarity index 100% rename from DMS/Message/MyMessage.cs rename to DMS.WPF/Message/MyMessage.cs diff --git a/DMS/Message/NavgatorMessage.cs b/DMS.WPF/Message/NavgatorMessage.cs similarity index 100% rename from DMS/Message/NavgatorMessage.cs rename to DMS.WPF/Message/NavgatorMessage.cs diff --git a/DMS/Message/NotificationMessage.cs b/DMS.WPF/Message/NotificationMessage.cs similarity index 95% rename from DMS/Message/NotificationMessage.cs rename to DMS.WPF/Message/NotificationMessage.cs index 184898f..d18e825 100644 --- a/DMS/Message/NotificationMessage.cs +++ b/DMS.WPF/Message/NotificationMessage.cs @@ -1,5 +1,5 @@ using CommunityToolkit.Mvvm.Messaging.Messages; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.Message; diff --git a/DMS/Message/ReqMessage.cs b/DMS.WPF/Message/ReqMessage.cs similarity index 100% rename from DMS/Message/ReqMessage.cs rename to DMS.WPF/Message/ReqMessage.cs diff --git a/DMS/Message/UpdateMenuMessage.cs b/DMS.WPF/Message/UpdateMenuMessage.cs similarity index 100% rename from DMS/Message/UpdateMenuMessage.cs rename to DMS.WPF/Message/UpdateMenuMessage.cs diff --git a/DMS/Models/Device.cs b/DMS.WPF/Models/Device.cs similarity index 99% rename from DMS/Models/Device.cs rename to DMS.WPF/Models/Device.cs index 1faf6bc..b70c156 100644 --- a/DMS/Models/Device.cs +++ b/DMS.WPF/Models/Device.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; -using DMS.Enums; +using DMS.Core.Enums; using SqlSugar; using SqlSugar.DbConvert; using S7.Net; // AddAsync this using directive diff --git a/DMS/Models/MenuBean.cs b/DMS.WPF/Models/MenuBean.cs similarity index 98% rename from DMS/Models/MenuBean.cs rename to DMS.WPF/Models/MenuBean.cs index 638722c..10c5596 100644 --- a/DMS/Models/MenuBean.cs +++ b/DMS.WPF/Models/MenuBean.cs @@ -1,5 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; -using DMS.Enums; +using DMS.Core.Enums; using DMS.ViewModels; namespace DMS.Models; diff --git a/DMS/Models/Mqtt.cs b/DMS.WPF/Models/Mqtt.cs similarity index 99% rename from DMS/Models/Mqtt.cs rename to DMS.WPF/Models/Mqtt.cs index b575434..762c451 100644 --- a/DMS/Models/Mqtt.cs +++ b/DMS.WPF/Models/Mqtt.cs @@ -1,5 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.Models; diff --git a/DMS.WPF/Models/Notification.cs b/DMS.WPF/Models/Notification.cs new file mode 100644 index 0000000..4c8b7e3 --- /dev/null +++ b/DMS.WPF/Models/Notification.cs @@ -0,0 +1,24 @@ +using DMS.Core.Enums; + +namespace DMS.Models; + +/// +/// 表示通知信息。 +/// +public class Notification +{ + /// + /// 通知是否为全局通知。 + /// + public bool IsGlobal { get; set; } + + /// + /// 通知消息内容。 + /// + public string Message { get; set; } + + /// + /// 通知类型。 + /// + public NotificationType Type { get; set; } +} \ No newline at end of file diff --git a/DMS/Models/OpcUaNode.cs b/DMS.WPF/Models/OpcUaNode.cs similarity index 100% rename from DMS/Models/OpcUaNode.cs rename to DMS.WPF/Models/OpcUaNode.cs diff --git a/DMS.WPF/Models/User.cs b/DMS.WPF/Models/User.cs new file mode 100644 index 0000000..2b26fe4 --- /dev/null +++ b/DMS.WPF/Models/User.cs @@ -0,0 +1,14 @@ +namespace DMS.Models; + +public class User +{ + + public int Id { get; set; } + + public string Name { get; set; } + + public string Password { get; set; } + public string Email { get; set; } + public string PhoneNumber { get; set; } + public string Address { get; set; } +} \ No newline at end of file diff --git a/DMS/Models/Variable.cs b/DMS.WPF/Models/Variable.cs similarity index 99% rename from DMS/Models/Variable.cs rename to DMS.WPF/Models/Variable.cs index 500cd66..fb097d5 100644 --- a/DMS/Models/Variable.cs +++ b/DMS.WPF/Models/Variable.cs @@ -1,5 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.Models; diff --git a/DMS.WPF/Models/VariableContext.cs b/DMS.WPF/Models/VariableContext.cs new file mode 100644 index 0000000..f023cc5 --- /dev/null +++ b/DMS.WPF/Models/VariableContext.cs @@ -0,0 +1,16 @@ +using DMS.Models; + +namespace DMS.Models +{ + public class VariableContext + { + public Variable Data { get; set; } + public bool IsHandled { get; set; } + + public VariableContext(Variable data) + { + Data = data; + IsHandled = false; // 默认未处理 + } + } +} \ No newline at end of file diff --git a/DMS/Models/VariableMqtt.cs b/DMS.WPF/Models/VariableMqtt.cs similarity index 98% rename from DMS/Models/VariableMqtt.cs rename to DMS.WPF/Models/VariableMqtt.cs index f52840f..226bc99 100644 --- a/DMS/Models/VariableMqtt.cs +++ b/DMS.WPF/Models/VariableMqtt.cs @@ -1,6 +1,6 @@ using System; using CommunityToolkit.Mvvm.ComponentModel; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Data.Entities; namespace DMS.Models; diff --git a/DMS/Models/VariableTable.cs b/DMS.WPF/Models/VariableTable.cs similarity index 98% rename from DMS/Models/VariableTable.cs rename to DMS.WPF/Models/VariableTable.cs index 2461bf1..6fe1c08 100644 --- a/DMS/Models/VariableTable.cs +++ b/DMS.WPF/Models/VariableTable.cs @@ -1,7 +1,7 @@ using System.Collections.ObjectModel; using System.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.Models; diff --git a/DMS/Resources/DevicesItemTemplateDictionary.xaml b/DMS.WPF/Resources/DevicesItemTemplateDictionary.xaml similarity index 100% rename from DMS/Resources/DevicesItemTemplateDictionary.xaml rename to DMS.WPF/Resources/DevicesItemTemplateDictionary.xaml diff --git a/DMS/Services/DataProcessingService.cs b/DMS.WPF/Services/DataProcessingService.cs similarity index 100% rename from DMS/Services/DataProcessingService.cs rename to DMS.WPF/Services/DataProcessingService.cs diff --git a/DMS/Services/DataServices.cs b/DMS.WPF/Services/DataServices.cs similarity index 99% rename from DMS/Services/DataServices.cs rename to DMS.WPF/Services/DataServices.cs index 9a0a90a..7d3d1e6 100644 --- a/DMS/Services/DataServices.cs +++ b/DMS.WPF/Services/DataServices.cs @@ -3,7 +3,7 @@ using AutoMapper; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; using DMS.Data.Repositories; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Helper; using DMS.Message; using DMS.Models; diff --git a/DMS/Services/DialogService.cs b/DMS.WPF/Services/DialogService.cs similarity index 99% rename from DMS/Services/DialogService.cs rename to DMS.WPF/Services/DialogService.cs index f65d11a..a3facfb 100644 --- a/DMS/Services/DialogService.cs +++ b/DMS.WPF/Services/DialogService.cs @@ -1,4 +1,4 @@ -using DMS.Enums; +using DMS.Core.Enums; using DMS.Models; using DMS.ViewModels.Dialogs; using DMS.Views.Dialogs; diff --git a/DMS/Services/GrowlNotificationService.cs b/DMS.WPF/Services/GrowlNotificationService.cs similarity index 99% rename from DMS/Services/GrowlNotificationService.cs rename to DMS.WPF/Services/GrowlNotificationService.cs index 51831f7..0803c57 100644 --- a/DMS/Services/GrowlNotificationService.cs +++ b/DMS.WPF/Services/GrowlNotificationService.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Message; using HandyControl.Controls; using Models_Notification = DMS.Models.Notification; diff --git a/DMS/Services/IDataProcessingService.cs b/DMS.WPF/Services/IDataProcessingService.cs similarity index 100% rename from DMS/Services/IDataProcessingService.cs rename to DMS.WPF/Services/IDataProcessingService.cs diff --git a/DMS/Services/IDialogService.cs b/DMS.WPF/Services/IDialogService.cs similarity index 98% rename from DMS/Services/IDialogService.cs rename to DMS.WPF/Services/IDialogService.cs index f2ebe55..3938406 100644 --- a/DMS/Services/IDialogService.cs +++ b/DMS.WPF/Services/IDialogService.cs @@ -1,4 +1,4 @@ -using DMS.Enums; +using DMS.Core.Enums; using DMS.Models; using iNKORE.UI.WPF.Modern.Controls; diff --git a/DMS/Services/INotificationService.cs b/DMS.WPF/Services/INotificationService.cs similarity index 90% rename from DMS/Services/INotificationService.cs rename to DMS.WPF/Services/INotificationService.cs index c0b1baf..7933909 100644 --- a/DMS/Services/INotificationService.cs +++ b/DMS.WPF/Services/INotificationService.cs @@ -1,4 +1,4 @@ -using DMS.Enums; +using DMS.Core.Enums; using DMS.Models; namespace DMS.Services; diff --git a/DMS/Services/IVariableProcessor.cs b/DMS.WPF/Services/IVariableProcessor.cs similarity index 100% rename from DMS/Services/IVariableProcessor.cs rename to DMS.WPF/Services/IVariableProcessor.cs diff --git a/DMS/Services/LogService.cs b/DMS.WPF/Services/LogService.cs similarity index 100% rename from DMS/Services/LogService.cs rename to DMS.WPF/Services/LogService.cs diff --git a/DMS/Services/MqttBackgroundService.cs b/DMS.WPF/Services/MqttBackgroundService.cs similarity index 100% rename from DMS/Services/MqttBackgroundService.cs rename to DMS.WPF/Services/MqttBackgroundService.cs diff --git a/DMS/Services/NavgatorServices.cs b/DMS.WPF/Services/NavgatorServices.cs similarity index 98% rename from DMS/Services/NavgatorServices.cs rename to DMS.WPF/Services/NavgatorServices.cs index 82c9f07..2665bc4 100644 --- a/DMS/Services/NavgatorServices.cs +++ b/DMS.WPF/Services/NavgatorServices.cs @@ -5,7 +5,7 @@ using DMS.Message; using DMS.ViewModels; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.Services; diff --git a/DMS/Services/OpcUaBackgroundService.cs b/DMS.WPF/Services/OpcUaBackgroundService.cs similarity index 99% rename from DMS/Services/OpcUaBackgroundService.cs rename to DMS.WPF/Services/OpcUaBackgroundService.cs index a34dd1a..d6d172a 100644 --- a/DMS/Services/OpcUaBackgroundService.cs +++ b/DMS.WPF/Services/OpcUaBackgroundService.cs @@ -1,5 +1,5 @@ using System.Collections.Concurrent; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; using Microsoft.Extensions.Hosting; diff --git a/DMS/Services/Processors/CheckValueChangedProcessor.cs b/DMS.WPF/Services/Processors/CheckValueChangedProcessor.cs similarity index 100% rename from DMS/Services/Processors/CheckValueChangedProcessor.cs rename to DMS.WPF/Services/Processors/CheckValueChangedProcessor.cs diff --git a/DMS/Services/Processors/HistoryProcessor.cs b/DMS.WPF/Services/Processors/HistoryProcessor.cs similarity index 100% rename from DMS/Services/Processors/HistoryProcessor.cs rename to DMS.WPF/Services/Processors/HistoryProcessor.cs diff --git a/DMS/Services/Processors/LoggingProcessor.cs b/DMS.WPF/Services/Processors/LoggingProcessor.cs similarity index 100% rename from DMS/Services/Processors/LoggingProcessor.cs rename to DMS.WPF/Services/Processors/LoggingProcessor.cs diff --git a/DMS/Services/Processors/MqttPublishProcessor.cs b/DMS.WPF/Services/Processors/MqttPublishProcessor.cs similarity index 100% rename from DMS/Services/Processors/MqttPublishProcessor.cs rename to DMS.WPF/Services/Processors/MqttPublishProcessor.cs diff --git a/DMS/Services/Processors/UpdateDbVariableProcessor.cs b/DMS.WPF/Services/Processors/UpdateDbVariableProcessor.cs similarity index 100% rename from DMS/Services/Processors/UpdateDbVariableProcessor.cs rename to DMS.WPF/Services/Processors/UpdateDbVariableProcessor.cs diff --git a/DMS/Services/S7BackgroundService.cs b/DMS.WPF/Services/S7BackgroundService.cs similarity index 99% rename from DMS/Services/S7BackgroundService.cs rename to DMS.WPF/Services/S7BackgroundService.cs index 31adeb3..14232aa 100644 --- a/DMS/Services/S7BackgroundService.cs +++ b/DMS.WPF/Services/S7BackgroundService.cs @@ -1,5 +1,5 @@ using System.Collections.Concurrent; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; using Microsoft.Extensions.Hosting; diff --git a/DMS/ValueConverts/EnumDescriptionConverter.cs b/DMS.WPF/ValueConverts/EnumDescriptionConverter.cs similarity index 100% rename from DMS/ValueConverts/EnumDescriptionConverter.cs rename to DMS.WPF/ValueConverts/EnumDescriptionConverter.cs diff --git a/DMS/ValueConverts/NullableBooleanConverter.cs b/DMS.WPF/ValueConverts/NullableBooleanConverter.cs similarity index 100% rename from DMS/ValueConverts/NullableBooleanConverter.cs rename to DMS.WPF/ValueConverts/NullableBooleanConverter.cs diff --git a/DMS/ViewModels/DataTransformViewModel.cs b/DMS.WPF/ViewModels/DataTransformViewModel.cs similarity index 100% rename from DMS/ViewModels/DataTransformViewModel.cs rename to DMS.WPF/ViewModels/DataTransformViewModel.cs diff --git a/DMS/ViewModels/DeviceDetailViewModel.cs b/DMS.WPF/ViewModels/DeviceDetailViewModel.cs similarity index 99% rename from DMS/ViewModels/DeviceDetailViewModel.cs rename to DMS.WPF/ViewModels/DeviceDetailViewModel.cs index fcd74ed..e075d3e 100644 --- a/DMS/ViewModels/DeviceDetailViewModel.cs +++ b/DMS.WPF/ViewModels/DeviceDetailViewModel.cs @@ -3,7 +3,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using DMS.Data; using DMS.Data.Repositories; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; using DMS.Services; diff --git a/DMS/ViewModels/DevicesViewModel.cs b/DMS.WPF/ViewModels/DevicesViewModel.cs similarity index 99% rename from DMS/ViewModels/DevicesViewModel.cs rename to DMS.WPF/ViewModels/DevicesViewModel.cs index f06e249..90dcf1c 100644 --- a/DMS/ViewModels/DevicesViewModel.cs +++ b/DMS.WPF/ViewModels/DevicesViewModel.cs @@ -2,7 +2,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using DMS.Data.Repositories; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; using DMS.Services; diff --git a/DMS/ViewModels/Dialogs/ConfrimDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/ConfrimDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/ConfrimDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/ConfrimDialogViewModel.cs diff --git a/DMS/ViewModels/Dialogs/DeviceDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/DeviceDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/DeviceDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/DeviceDialogViewModel.cs diff --git a/DMS/ViewModels/Dialogs/ImportExcelDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/ImportExcelDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/ImportExcelDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/ImportExcelDialogViewModel.cs diff --git a/DMS/ViewModels/Dialogs/ImportResultDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/ImportResultDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/ImportResultDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/ImportResultDialogViewModel.cs diff --git a/DMS/ViewModels/Dialogs/IsActiveDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/IsActiveDialogViewModel.cs similarity index 96% rename from DMS/ViewModels/Dialogs/IsActiveDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/IsActiveDialogViewModel.cs index 6425a91..a3a2401 100644 --- a/DMS/ViewModels/Dialogs/IsActiveDialogViewModel.cs +++ b/DMS.WPF/ViewModels/Dialogs/IsActiveDialogViewModel.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.ViewModels.Dialogs; diff --git a/DMS/ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs diff --git a/DMS/ViewModels/Dialogs/MqttAliasDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/MqttAliasDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/MqttAliasDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/MqttAliasDialogViewModel.cs diff --git a/DMS/ViewModels/Dialogs/MqttDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/MqttDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/MqttDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/MqttDialogViewModel.cs diff --git a/DMS/ViewModels/Dialogs/MqttSelectionDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/MqttSelectionDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/MqttSelectionDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/MqttSelectionDialogViewModel.cs diff --git a/DMS/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs similarity index 99% rename from DMS/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs index 7d204c1..b3a857b 100644 --- a/DMS/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs +++ b/DMS.WPF/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; using Opc.Ua; diff --git a/DMS/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs similarity index 95% rename from DMS/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs index 104c7d5..2d23daf 100644 --- a/DMS/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs +++ b/DMS.WPF/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs @@ -1,5 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.ViewModels.Dialogs { diff --git a/DMS/ViewModels/Dialogs/PollLevelDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/PollLevelDialogViewModel.cs similarity index 96% rename from DMS/ViewModels/Dialogs/PollLevelDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/PollLevelDialogViewModel.cs index 57532f6..bd1825a 100644 --- a/DMS/ViewModels/Dialogs/PollLevelDialogViewModel.cs +++ b/DMS.WPF/ViewModels/Dialogs/PollLevelDialogViewModel.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; using CommunityToolkit.Mvvm.ComponentModel; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.ViewModels.Dialogs { diff --git a/DMS/ViewModels/Dialogs/ProcessingDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/ProcessingDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/ProcessingDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/ProcessingDialogViewModel.cs diff --git a/DMS/ViewModels/Dialogs/VarDataDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/VarDataDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/VarDataDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/VarDataDialogViewModel.cs diff --git a/DMS/ViewModels/Dialogs/VarTableDialogViewModel.cs b/DMS.WPF/ViewModels/Dialogs/VarTableDialogViewModel.cs similarity index 100% rename from DMS/ViewModels/Dialogs/VarTableDialogViewModel.cs rename to DMS.WPF/ViewModels/Dialogs/VarTableDialogViewModel.cs diff --git a/DMS/ViewModels/HomeViewModel.cs b/DMS.WPF/ViewModels/HomeViewModel.cs similarity index 100% rename from DMS/ViewModels/HomeViewModel.cs rename to DMS.WPF/ViewModels/HomeViewModel.cs diff --git a/DMS/ViewModels/MainViewModel.cs b/DMS.WPF/ViewModels/MainViewModel.cs similarity index 99% rename from DMS/ViewModels/MainViewModel.cs rename to DMS.WPF/ViewModels/MainViewModel.cs index e7a977e..7ec56d0 100644 --- a/DMS/ViewModels/MainViewModel.cs +++ b/DMS.WPF/ViewModels/MainViewModel.cs @@ -4,7 +4,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using DMS.Data; using DMS.Data.Repositories; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; using DMS.Services; diff --git a/DMS/ViewModels/MqttServerDetailViewModel.cs b/DMS.WPF/ViewModels/MqttServerDetailViewModel.cs similarity index 99% rename from DMS/ViewModels/MqttServerDetailViewModel.cs rename to DMS.WPF/ViewModels/MqttServerDetailViewModel.cs index a03de4f..78ee2af 100644 --- a/DMS/ViewModels/MqttServerDetailViewModel.cs +++ b/DMS.WPF/ViewModels/MqttServerDetailViewModel.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Microsoft.Extensions.Logging; -using DMS.Enums; +using DMS.Core.Enums; using System.Collections.ObjectModel; using System.Linq; using System.Threading.Tasks; diff --git a/DMS/ViewModels/MqttsViewModel.cs b/DMS.WPF/ViewModels/MqttsViewModel.cs similarity index 99% rename from DMS/ViewModels/MqttsViewModel.cs rename to DMS.WPF/ViewModels/MqttsViewModel.cs index a8c7774..b5203c0 100644 --- a/DMS/ViewModels/MqttsViewModel.cs +++ b/DMS.WPF/ViewModels/MqttsViewModel.cs @@ -2,7 +2,7 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using DMS.Data.Repositories; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; using DMS.Services; diff --git a/DMS/ViewModels/SettingViewModel.cs b/DMS.WPF/ViewModels/SettingViewModel.cs similarity index 100% rename from DMS/ViewModels/SettingViewModel.cs rename to DMS.WPF/ViewModels/SettingViewModel.cs diff --git a/DMS/ViewModels/VariableTableViewModel.cs b/DMS.WPF/ViewModels/VariableTableViewModel.cs similarity index 99% rename from DMS/ViewModels/VariableTableViewModel.cs rename to DMS.WPF/ViewModels/VariableTableViewModel.cs index 0d08b36..b566637 100644 --- a/DMS/ViewModels/VariableTableViewModel.cs +++ b/DMS.WPF/ViewModels/VariableTableViewModel.cs @@ -6,7 +6,7 @@ using AutoMapper; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using DMS.Data.Repositories; -using DMS.Enums; +using DMS.Core.Enums; using DMS.Helper; using DMS.Models; using DMS.Services; diff --git a/DMS/ViewModels/ViewModelBase.cs b/DMS.WPF/ViewModels/ViewModelBase.cs similarity index 100% rename from DMS/ViewModels/ViewModelBase.cs rename to DMS.WPF/ViewModels/ViewModelBase.cs diff --git a/DMS/Views/DataTransformView.xaml b/DMS.WPF/Views/DataTransformView.xaml similarity index 100% rename from DMS/Views/DataTransformView.xaml rename to DMS.WPF/Views/DataTransformView.xaml diff --git a/DMS/Views/DataTransformView.xaml.cs b/DMS.WPF/Views/DataTransformView.xaml.cs similarity index 100% rename from DMS/Views/DataTransformView.xaml.cs rename to DMS.WPF/Views/DataTransformView.xaml.cs diff --git a/DMS/Views/DeviceDetailView.xaml b/DMS.WPF/Views/DeviceDetailView.xaml similarity index 100% rename from DMS/Views/DeviceDetailView.xaml rename to DMS.WPF/Views/DeviceDetailView.xaml diff --git a/DMS/Views/DeviceDetailView.xaml.cs b/DMS.WPF/Views/DeviceDetailView.xaml.cs similarity index 100% rename from DMS/Views/DeviceDetailView.xaml.cs rename to DMS.WPF/Views/DeviceDetailView.xaml.cs diff --git a/DMS/Views/DevicesView.xaml b/DMS.WPF/Views/DevicesView.xaml similarity index 100% rename from DMS/Views/DevicesView.xaml rename to DMS.WPF/Views/DevicesView.xaml diff --git a/DMS/Views/DevicesView.xaml.cs b/DMS.WPF/Views/DevicesView.xaml.cs similarity index 100% rename from DMS/Views/DevicesView.xaml.cs rename to DMS.WPF/Views/DevicesView.xaml.cs diff --git a/DMS/Views/Dialogs/ConfirmDialog.xaml b/DMS.WPF/Views/Dialogs/ConfirmDialog.xaml similarity index 96% rename from DMS/Views/Dialogs/ConfirmDialog.xaml rename to DMS.WPF/Views/Dialogs/ConfirmDialog.xaml index f82de9f..1bd2758 100644 --- a/DMS/Views/Dialogs/ConfirmDialog.xaml +++ b/DMS.WPF/Views/Dialogs/ConfirmDialog.xaml @@ -8,7 +8,7 @@ xmlns:vmd="clr-namespace:DMS.ViewModels.Dialogs" xmlns:vc="clr-namespace:DMS.ValueConverts" xmlns:ex="clr-namespace:DMS.Extensions" - xmlns:en="clr-namespace:DMS.Enums" + xmlns:en="clr-namespace:DMS.Core.Enums" Title="{Binding Title}" CloseButtonText="取消" DefaultButton="Primary" diff --git a/DMS/Views/Dialogs/ConfirmDialog.xaml.cs b/DMS.WPF/Views/Dialogs/ConfirmDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/ConfirmDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/ConfirmDialog.xaml.cs diff --git a/DMS/Views/Dialogs/DeviceDialog.xaml b/DMS.WPF/Views/Dialogs/DeviceDialog.xaml similarity index 99% rename from DMS/Views/Dialogs/DeviceDialog.xaml rename to DMS.WPF/Views/Dialogs/DeviceDialog.xaml index 62d6e47..52f3bab 100644 --- a/DMS/Views/Dialogs/DeviceDialog.xaml +++ b/DMS.WPF/Views/Dialogs/DeviceDialog.xaml @@ -8,7 +8,7 @@ xmlns:vmd="clr-namespace:DMS.ViewModels.Dialogs" xmlns:vc="clr-namespace:DMS.ValueConverts" xmlns:ex="clr-namespace:DMS.Extensions" - xmlns:en="clr-namespace:DMS.Enums" + xmlns:en="clr-namespace:DMS.Core.Enums" Title="{Binding Title}" CloseButtonText="取消" DefaultButton="Primary" diff --git a/DMS/Views/Dialogs/DeviceDialog.xaml.cs b/DMS.WPF/Views/Dialogs/DeviceDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/DeviceDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/DeviceDialog.xaml.cs diff --git a/DMS/Views/Dialogs/ImportExcelDialog.xaml b/DMS.WPF/Views/Dialogs/ImportExcelDialog.xaml similarity index 100% rename from DMS/Views/Dialogs/ImportExcelDialog.xaml rename to DMS.WPF/Views/Dialogs/ImportExcelDialog.xaml diff --git a/DMS/Views/Dialogs/ImportExcelDialog.xaml.cs b/DMS.WPF/Views/Dialogs/ImportExcelDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/ImportExcelDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/ImportExcelDialog.xaml.cs diff --git a/DMS/Views/Dialogs/ImportResultDialog.xaml b/DMS.WPF/Views/Dialogs/ImportResultDialog.xaml similarity index 100% rename from DMS/Views/Dialogs/ImportResultDialog.xaml rename to DMS.WPF/Views/Dialogs/ImportResultDialog.xaml diff --git a/DMS/Views/Dialogs/ImportResultDialog.xaml.cs b/DMS.WPF/Views/Dialogs/ImportResultDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/ImportResultDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/ImportResultDialog.xaml.cs diff --git a/DMS/Views/Dialogs/IsActiveDialog.xaml b/DMS.WPF/Views/Dialogs/IsActiveDialog.xaml similarity index 100% rename from DMS/Views/Dialogs/IsActiveDialog.xaml rename to DMS.WPF/Views/Dialogs/IsActiveDialog.xaml diff --git a/DMS/Views/Dialogs/IsActiveDialog.xaml.cs b/DMS.WPF/Views/Dialogs/IsActiveDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/IsActiveDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/IsActiveDialog.xaml.cs diff --git a/DMS/Views/Dialogs/MqttAliasBatchEditDialog.xaml b/DMS.WPF/Views/Dialogs/MqttAliasBatchEditDialog.xaml similarity index 100% rename from DMS/Views/Dialogs/MqttAliasBatchEditDialog.xaml rename to DMS.WPF/Views/Dialogs/MqttAliasBatchEditDialog.xaml diff --git a/DMS/Views/Dialogs/MqttAliasBatchEditDialog.xaml.cs b/DMS.WPF/Views/Dialogs/MqttAliasBatchEditDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/MqttAliasBatchEditDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/MqttAliasBatchEditDialog.xaml.cs diff --git a/DMS/Views/Dialogs/MqttAliasDialog.xaml b/DMS.WPF/Views/Dialogs/MqttAliasDialog.xaml similarity index 100% rename from DMS/Views/Dialogs/MqttAliasDialog.xaml rename to DMS.WPF/Views/Dialogs/MqttAliasDialog.xaml diff --git a/DMS/Views/Dialogs/MqttAliasDialog.xaml.cs b/DMS.WPF/Views/Dialogs/MqttAliasDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/MqttAliasDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/MqttAliasDialog.xaml.cs diff --git a/DMS/Views/Dialogs/MqttDialog.xaml b/DMS.WPF/Views/Dialogs/MqttDialog.xaml similarity index 98% rename from DMS/Views/Dialogs/MqttDialog.xaml rename to DMS.WPF/Views/Dialogs/MqttDialog.xaml index 519b685..6b5f7e8 100644 --- a/DMS/Views/Dialogs/MqttDialog.xaml +++ b/DMS.WPF/Views/Dialogs/MqttDialog.xaml @@ -8,7 +8,7 @@ xmlns:vmd="clr-namespace:DMS.ViewModels.Dialogs" xmlns:vc="clr-namespace:DMS.ValueConverts" xmlns:ex="clr-namespace:DMS.Extensions" - xmlns:en="clr-namespace:DMS.Enums" + xmlns:en="clr-namespace:DMS.Core.Enums" Title="{Binding Title}" CloseButtonText="取消" DefaultButton="Primary" diff --git a/DMS/Views/Dialogs/MqttDialog.xaml.cs b/DMS.WPF/Views/Dialogs/MqttDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/MqttDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/MqttDialog.xaml.cs diff --git a/DMS/Views/Dialogs/MqttSelectionDialog.xaml b/DMS.WPF/Views/Dialogs/MqttSelectionDialog.xaml similarity index 100% rename from DMS/Views/Dialogs/MqttSelectionDialog.xaml rename to DMS.WPF/Views/Dialogs/MqttSelectionDialog.xaml diff --git a/DMS/Views/Dialogs/MqttSelectionDialog.xaml.cs b/DMS.WPF/Views/Dialogs/MqttSelectionDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/MqttSelectionDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/MqttSelectionDialog.xaml.cs diff --git a/DMS/Views/Dialogs/OpcUaImportDialog.xaml b/DMS.WPF/Views/Dialogs/OpcUaImportDialog.xaml similarity index 100% rename from DMS/Views/Dialogs/OpcUaImportDialog.xaml rename to DMS.WPF/Views/Dialogs/OpcUaImportDialog.xaml diff --git a/DMS/Views/Dialogs/OpcUaImportDialog.xaml.cs b/DMS.WPF/Views/Dialogs/OpcUaImportDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/OpcUaImportDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/OpcUaImportDialog.xaml.cs diff --git a/DMS/Views/Dialogs/OpcUaUpdateTypeDialog.xaml b/DMS.WPF/Views/Dialogs/OpcUaUpdateTypeDialog.xaml similarity index 95% rename from DMS/Views/Dialogs/OpcUaUpdateTypeDialog.xaml rename to DMS.WPF/Views/Dialogs/OpcUaUpdateTypeDialog.xaml index 37bc5f5..9ef4a91 100644 --- a/DMS/Views/Dialogs/OpcUaUpdateTypeDialog.xaml +++ b/DMS.WPF/Views/Dialogs/OpcUaUpdateTypeDialog.xaml @@ -4,7 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" - xmlns:enums="clr-namespace:DMS.Enums" + xmlns:enums="clr-namespace:DMS.Core.Enums" xmlns:extensions="clr-namespace:DMS.Extensions" xmlns:viewModels="clr-namespace:DMS.ViewModels.Dialogs" mc:Ignorable="d" diff --git a/DMS/Views/Dialogs/OpcUaUpdateTypeDialog.xaml.cs b/DMS.WPF/Views/Dialogs/OpcUaUpdateTypeDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/OpcUaUpdateTypeDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/OpcUaUpdateTypeDialog.xaml.cs diff --git a/DMS/Views/Dialogs/PollLevelDialog.xaml b/DMS.WPF/Views/Dialogs/PollLevelDialog.xaml similarity index 96% rename from DMS/Views/Dialogs/PollLevelDialog.xaml rename to DMS.WPF/Views/Dialogs/PollLevelDialog.xaml index 23eb4ff..151a7fa 100644 --- a/DMS/Views/Dialogs/PollLevelDialog.xaml +++ b/DMS.WPF/Views/Dialogs/PollLevelDialog.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:enums="clr-namespace:DMS.Enums" + xmlns:enums="clr-namespace:DMS.Core.Enums" xmlns:extensions="clr-namespace:DMS.Extensions" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" xmlns:vc="clr-namespace:DMS.ValueConverts" diff --git a/DMS/Views/Dialogs/PollLevelDialog.xaml.cs b/DMS.WPF/Views/Dialogs/PollLevelDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/PollLevelDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/PollLevelDialog.xaml.cs diff --git a/DMS/Views/Dialogs/ProcessingDialog.xaml b/DMS.WPF/Views/Dialogs/ProcessingDialog.xaml similarity index 100% rename from DMS/Views/Dialogs/ProcessingDialog.xaml rename to DMS.WPF/Views/Dialogs/ProcessingDialog.xaml diff --git a/DMS/Views/Dialogs/ProcessingDialog.xaml.cs b/DMS.WPF/Views/Dialogs/ProcessingDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/ProcessingDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/ProcessingDialog.xaml.cs diff --git a/DMS/Views/Dialogs/VarDataDialog.xaml b/DMS.WPF/Views/Dialogs/VarDataDialog.xaml similarity index 99% rename from DMS/Views/Dialogs/VarDataDialog.xaml rename to DMS.WPF/Views/Dialogs/VarDataDialog.xaml index 14ee74c..eb8bd3d 100644 --- a/DMS/Views/Dialogs/VarDataDialog.xaml +++ b/DMS.WPF/Views/Dialogs/VarDataDialog.xaml @@ -8,7 +8,7 @@ xmlns:vmd="clr-namespace:DMS.ViewModels.Dialogs" xmlns:vc="clr-namespace:DMS.ValueConverts" xmlns:ex="clr-namespace:DMS.Extensions" - xmlns:en="clr-namespace:DMS.Enums" + xmlns:en="clr-namespace:DMS.Core.Enums" Title="{Binding Title}" CloseButtonText="取消" DefaultButton="Primary" diff --git a/DMS/Views/Dialogs/VarDataDialog.xaml.cs b/DMS.WPF/Views/Dialogs/VarDataDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/VarDataDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/VarDataDialog.xaml.cs diff --git a/DMS/Views/Dialogs/VarTableDialog.xaml b/DMS.WPF/Views/Dialogs/VarTableDialog.xaml similarity index 97% rename from DMS/Views/Dialogs/VarTableDialog.xaml rename to DMS.WPF/Views/Dialogs/VarTableDialog.xaml index 7584ce9..b1b729c 100644 --- a/DMS/Views/Dialogs/VarTableDialog.xaml +++ b/DMS.WPF/Views/Dialogs/VarTableDialog.xaml @@ -8,7 +8,7 @@ xmlns:vmd="clr-namespace:DMS.ViewModels.Dialogs" xmlns:vc="clr-namespace:DMS.ValueConverts" xmlns:ex="clr-namespace:DMS.Extensions" - xmlns:en="clr-namespace:DMS.Enums" + xmlns:en="clr-namespace:DMS.Core.Enums" Title="{Binding Title}" CloseButtonText="取消" DefaultButton="Primary" diff --git a/DMS/Views/Dialogs/VarTableDialog.xaml.cs b/DMS.WPF/Views/Dialogs/VarTableDialog.xaml.cs similarity index 100% rename from DMS/Views/Dialogs/VarTableDialog.xaml.cs rename to DMS.WPF/Views/Dialogs/VarTableDialog.xaml.cs diff --git a/DMS/Views/HomeView.xaml b/DMS.WPF/Views/HomeView.xaml similarity index 100% rename from DMS/Views/HomeView.xaml rename to DMS.WPF/Views/HomeView.xaml diff --git a/DMS/Views/HomeView.xaml.cs b/DMS.WPF/Views/HomeView.xaml.cs similarity index 100% rename from DMS/Views/HomeView.xaml.cs rename to DMS.WPF/Views/HomeView.xaml.cs diff --git a/DMS/Views/MainView.xaml b/DMS.WPF/Views/MainView.xaml similarity index 100% rename from DMS/Views/MainView.xaml rename to DMS.WPF/Views/MainView.xaml diff --git a/DMS/Views/MainView.xaml.cs b/DMS.WPF/Views/MainView.xaml.cs similarity index 98% rename from DMS/Views/MainView.xaml.cs rename to DMS.WPF/Views/MainView.xaml.cs index 6e671d7..537f03d 100644 --- a/DMS/Views/MainView.xaml.cs +++ b/DMS.WPF/Views/MainView.xaml.cs @@ -5,7 +5,7 @@ using DMS.Services; using DMS.ViewModels; using iNKORE.UI.WPF.Modern.Controls; using Microsoft.Extensions.DependencyInjection; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.Views; diff --git a/DMS/Views/MqttServerDetailView.xaml b/DMS.WPF/Views/MqttServerDetailView.xaml similarity index 99% rename from DMS/Views/MqttServerDetailView.xaml rename to DMS.WPF/Views/MqttServerDetailView.xaml index 98d96e1..8c2b388 100644 --- a/DMS/Views/MqttServerDetailView.xaml +++ b/DMS.WPF/Views/MqttServerDetailView.xaml @@ -9,7 +9,7 @@ xmlns:iNKORE="clr-namespace:iNKORE.UI.WPF.Modern.Controls;assembly=iNKORE.UI.WPF.Modern" xmlns:converters="clr-namespace:DMS.ValueConverts" xmlns:extensions="clr-namespace:DMS.Extensions" - xmlns:enums="clr-namespace:DMS.Enums" + xmlns:enums="clr-namespace:DMS.Core.Enums" d:DataContext="{d:DesignInstance Type=viewmodels:MqttServerDetailViewModel}" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> diff --git a/DMS/Views/MqttServerDetailView.xaml.cs b/DMS.WPF/Views/MqttServerDetailView.xaml.cs similarity index 100% rename from DMS/Views/MqttServerDetailView.xaml.cs rename to DMS.WPF/Views/MqttServerDetailView.xaml.cs diff --git a/DMS/Views/MqttsView.xaml b/DMS.WPF/Views/MqttsView.xaml similarity index 100% rename from DMS/Views/MqttsView.xaml rename to DMS.WPF/Views/MqttsView.xaml diff --git a/DMS/Views/MqttsView.xaml.cs b/DMS.WPF/Views/MqttsView.xaml.cs similarity index 100% rename from DMS/Views/MqttsView.xaml.cs rename to DMS.WPF/Views/MqttsView.xaml.cs diff --git a/DMS/Views/SettingView.xaml b/DMS.WPF/Views/SettingView.xaml similarity index 100% rename from DMS/Views/SettingView.xaml rename to DMS.WPF/Views/SettingView.xaml diff --git a/DMS/Views/SettingView.xaml.cs b/DMS.WPF/Views/SettingView.xaml.cs similarity index 100% rename from DMS/Views/SettingView.xaml.cs rename to DMS.WPF/Views/SettingView.xaml.cs diff --git a/DMS/Views/VariableTableView.xaml b/DMS.WPF/Views/VariableTableView.xaml similarity index 99% rename from DMS/Views/VariableTableView.xaml rename to DMS.WPF/Views/VariableTableView.xaml index fa0a5c9..b343ec4 100644 --- a/DMS/Views/VariableTableView.xaml +++ b/DMS.WPF/Views/VariableTableView.xaml @@ -10,7 +10,7 @@ mc:Ignorable="d" xmlns:vc="clr-namespace:DMS.ValueConverts" xmlns:ex="clr-namespace:DMS.Extensions" - xmlns:en="clr-namespace:DMS.Enums" + xmlns:en="clr-namespace:DMS.Core.Enums" Loaded="VariableTableView_OnLoaded" d:DataContext="{d:DesignInstance vm:VariableTableViewModel}" d:DesignHeight="600" diff --git a/DMS/Views/VariableTableView.xaml.cs b/DMS.WPF/Views/VariableTableView.xaml.cs similarity index 99% rename from DMS/Views/VariableTableView.xaml.cs rename to DMS.WPF/Views/VariableTableView.xaml.cs index a217548..144f2b4 100644 --- a/DMS/Views/VariableTableView.xaml.cs +++ b/DMS.WPF/Views/VariableTableView.xaml.cs @@ -9,7 +9,7 @@ using iNKORE.UI.WPF.Modern.Controls; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NLog; -using DMS.Enums; +using DMS.Core.Enums; namespace DMS.Views; diff --git a/DMS.sln b/DMS.sln index fbc0702..7cfaeb6 100644 --- a/DMS.sln +++ b/DMS.sln @@ -3,7 +3,22 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.12.35728.132 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DMS", "DMS\DMS.csproj", "{CD3529C9-218C-41EE-B64B-A884DC56E21E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DMS.Core", "DMS.Core\DMS.Core.csproj", "{CD16527A-A5F9-482F-ABF7-755DDE1B0406}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DMS.Application", "DMS.Application\DMS.Application.csproj", "{46E180A5-38CB-4229-915F-C9BC44534E77}" + ProjectSection(ProjectDependencies) = postProject + {66FB5295-C6B7-4767-948C-5986480F6733} = {66FB5295-C6B7-4767-948C-5986480F6733} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DMS.Infrastructure", "DMS.Infrastructure\DMS.Infrastructure.csproj", "{66FB5295-C6B7-4767-948C-5986480F6733}" + ProjectSection(ProjectDependencies) = postProject + {CD16527A-A5F9-482F-ABF7-755DDE1B0406} = {CD16527A-A5F9-482F-ABF7-755DDE1B0406} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DMS.WPF", "DMS.WPF\DMS.WPF.csproj", "{6059F299-9EE8-4A3F-8CD2-D00E2BDB5D5F}" + ProjectSection(ProjectDependencies) = postProject + {46E180A5-38CB-4229-915F-C9BC44534E77} = {46E180A5-38CB-4229-915F-C9BC44534E77} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,12 +26,27 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CD3529C9-218C-41EE-B64B-A884DC56E21E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CD3529C9-218C-41EE-B64B-A884DC56E21E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CD3529C9-218C-41EE-B64B-A884DC56E21E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CD3529C9-218C-41EE-B64B-A884DC56E21E}.Release|Any CPU.Build.0 = Release|Any CPU + {CD16527A-A5F9-482F-ABF7-755DDE1B0406}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD16527A-A5F9-482F-ABF7-755DDE1B0406}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD16527A-A5F9-482F-ABF7-755DDE1B0406}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD16527A-A5F9-482F-ABF7-755DDE1B0406}.Release|Any CPU.Build.0 = Release|Any CPU + {46E180A5-38CB-4229-915F-C9BC44534E77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46E180A5-38CB-4229-915F-C9BC44534E77}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46E180A5-38CB-4229-915F-C9BC44534E77}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46E180A5-38CB-4229-915F-C9BC44534E77}.Release|Any CPU.Build.0 = Release|Any CPU + {66FB5295-C6B7-4767-948C-5986480F6733}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66FB5295-C6B7-4767-948C-5986480F6733}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66FB5295-C6B7-4767-948C-5986480F6733}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66FB5295-C6B7-4767-948C-5986480F6733}.Release|Any CPU.Build.0 = Release|Any CPU + {6059F299-9EE8-4A3F-8CD2-D00E2BDB5D5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6059F299-9EE8-4A3F-8CD2-D00E2BDB5D5F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6059F299-9EE8-4A3F-8CD2-D00E2BDB5D5F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6059F299-9EE8-4A3F-8CD2-D00E2BDB5D5F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7F3416E9-65CD-44B1-B98B-67CF3B6DCFF9} + EndGlobalSection EndGlobal diff --git a/DMS/App.xaml b/DMS/App.xaml deleted file mode 100644 index 5da72cb..0000000 --- a/DMS/App.xaml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/DMS/App.xaml.cs b/DMS/App.xaml.cs deleted file mode 100644 index 7c421a2..0000000 --- a/DMS/App.xaml.cs +++ /dev/null @@ -1,260 +0,0 @@ -using System.Windows; -using DMS.Data; -using DMS.Data.Entities; -using DMS.Data.Repositories; -using DMS.Enums; -using DMS.Helper; -using DMS.Services; -using DMS.Services.Processors; -using DMS.ViewModels; -using DMS.Views; -using iNKORE.UI.WPF.Modern.Common.IconKeys; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using NLog; -using NLog.Extensions.Logging; -using DMS.Extensions; -using Microsoft.Extensions.Hosting; -using DMS.Config; -using SqlSugar; -using LogLevel = Microsoft.Extensions.Logging.LogLevel; - -namespace DMS; - -/// -/// Interaction logic for App.xaml -/// -public partial class App : Application -{ - public IServiceProvider Services { get; } - - public App() - { - Host = Microsoft.Extensions.Hosting.Host.CreateDefaultBuilder() - .ConfigureServices((context, services) => - { - ConfigureServices(services); - }) - .ConfigureLogging(loggingBuilder => - { - ConfigureLogging(loggingBuilder); - }) - .Build(); - Services = Host.Services; - } - - public new static App Current => (App)Application.Current; - public IHost Host { get; } - - protected override async void OnStartup(StartupEventArgs e) - { - base.OnStartup(e); - ShutdownMode = ShutdownMode.OnExplicitShutdown; - ThemeHelper.InitializeTheme(); - await Host.StartAsync(); - - try - { - InitializeDataBase(); - InitializeMenu() - .Await((e) => { NotificationHelper.ShowError($"初始化主菜单失败:{e.Message}", e); }, - () => { MessageHelper.SendLoadMessage(LoadTypes.Menu); }); - Host.Services.GetRequiredService(); - - // 初始化数据处理链 - var dataProcessingService = Host.Services.GetRequiredService(); - dataProcessingService.AddProcessor(Host.Services.GetRequiredService()); - dataProcessingService.AddProcessor(Host.Services.GetRequiredService()); - dataProcessingService.AddProcessor(Host.Services.GetRequiredService()); - dataProcessingService.AddProcessor(Host.Services.GetRequiredService()); - dataProcessingService.AddProcessor(Host.Services.GetRequiredService()); - } - catch (Exception exception) - { - NotificationHelper.ShowError("加载数据时发生错误,如果是连接字符串不正确,可以在设置界面更改:{exception.Message}", exception); - } - - MainWindow = Host.Services.GetRequiredService(); - MainWindow.Show(); - - // 根据配置启动服务 - // var connectionSettings = DMS.Config.ConnectionSettings.Load(); - // if (connectionSettings.EnableMqttService) - // { - // Host.Services.GetRequiredService().StartService(); - // } - // if (connectionSettings.EnableOpcUaService) - // { - // Host.Services.GetRequiredService().StartService(); - // } - } - - protected override async void OnExit(ExitEventArgs e) - { - // 停止服务 - await Host.StopAsync(); - Host.Dispose(); - LogManager.Shutdown(); - base.OnExit(e); - } - - private void ConfigureServices(IServiceCollection services) - { - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddHostedService(); - services.AddHostedService(); - services.AddSingleton(); - services.AddHostedService(provider => provider.GetRequiredService()); - services.AddSingleton(); - - // 注册 AutoMapper - services.AddAutoMapper(typeof(App).Assembly); - - // 注册数据处理服务和处理器 - services.AddSingleton(); - services.AddHostedService(provider => (DataProcessingService)provider.GetRequiredService()); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - - // 注册数据仓库 - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - // 注册视图模型 - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddScoped(); - services.AddSingleton(); - services.AddScoped(); - //注册View视图 - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddScoped(); - services.AddScoped(); - } - - private void ConfigureLogging(ILoggingBuilder loggingBuilder) - { - LogManager.Setup().LoadConfigurationFromFile("Config/nlog.config"); - loggingBuilder.ClearProviders(); - loggingBuilder.SetMinimumLevel(LogLevel.Trace); - loggingBuilder.AddNLog(); - - // 捕获未处理的异常并记录 - AppDomain.CurrentDomain.UnhandledException += (sender, args) => - { - var ex = args.ExceptionObject as Exception; - if (ex != null) - { - // 可以使用一个专用的 Logger 来记录未处理异常 - LogManager.GetLogger("UnhandledExceptionLogger") - .Fatal($"应用程序发生未处理的异常:{ex}"); - } - }; - - // 捕获 Dispatcher 线程上的未处理异常 (UI 线程) - this.DispatcherUnhandledException += (sender, args) => - { - LogManager.GetLogger("DispatcherExceptionLogger") - .Fatal($"UI 线程发生未处理的异常:{args.Exception}"); - // 标记为已处理,防止应用程序崩溃 (生产环境慎用,可能掩盖问题) - // args.Handled = true; - }; - - // 如果您使用 Task (异步方法) 并且没有正确 await,可能会导致异常丢失, - // 可以通过以下方式捕获 Task 中的异常。 - TaskScheduler.UnobservedTaskException += (sender, args) => - { - LogManager.GetLogger("UnobservedTaskExceptionLogger") - .Fatal($"异步任务发生未观察到的异常:{args.Exception}"); - // args.SetObserved(); // 标记为已观察,防止进程终止 - }; - } - - /// - /// 初始化菜单 - /// - private async Task InitializeMenu() - { - using (var db = DbContext.GetInstance()) - { - var homeMenu = new DbMenu() - { Name = "主页", Type = MenuType.MainMenu, Icon = SegoeFluentIcons.Home.Glyph, ParentId = 0 }; - - var deviceMenu = new DbMenu() - { - Name = "设备", Type = MenuType.MainMenu, Icon = SegoeFluentIcons.Devices3.Glyph, - ParentId = 0 - }; - var dataTransfromMenu = new DbMenu() - { - Name = "数据转换", Type = MenuType.MainMenu, - Icon = SegoeFluentIcons.ChromeSwitch.Glyph, ParentId = 0 - }; - var mqttMenu = new DbMenu() - { - Name = "Mqtt服务器", Type = MenuType.MainMenu, Icon = SegoeFluentIcons.Cloud.Glyph, - ParentId = 0 - }; - - var settingMenu = new DbMenu() - { - Name = "设置", Type = MenuType.MainMenu, Icon = SegoeFluentIcons.Settings.Glyph, - ParentId = 0 - }; - var aboutMenu = new DbMenu() - { Name = "关于", Type = MenuType.MainMenu, Icon = SegoeFluentIcons.Info.Glyph, ParentId = 0 }; - await CheckMainMenuExist(db, homeMenu); - await CheckMainMenuExist(db, deviceMenu); - await CheckMainMenuExist(db, dataTransfromMenu); - await CheckMainMenuExist(db, mqttMenu); - await CheckMainMenuExist(db, settingMenu); - await CheckMainMenuExist(db, aboutMenu); - } - } - - private static async Task CheckMainMenuExist(SqlSugarClient db, DbMenu menu) - { - var homeMenuExist = await db.Queryable() - .FirstAsync(dm => dm.Name == menu.Name); - if (homeMenuExist == null) - { - await db.Insertable(menu) - .ExecuteCommandAsync(); - } - } - - private void InitializeDataBase() - { - var _db = DbContext.GetInstance(); - _db.DbMaintenance.CreateDatabase(); - _db.CodeFirst.InitTables(); - _db.CodeFirst.InitTables(); - _db.CodeFirst.InitTables(); - _db.CodeFirst.InitTables(); - _db.CodeFirst.InitTables(); - _db.CodeFirst.InitTables(); - _db.CodeFirst.InitTables(); - _db.CodeFirst.InitTables(); - _db.CodeFirst.InitTables(); - _db.CodeFirst.InitTables(); - } -} \ No newline at end of file diff --git a/DMS/AppIcon2.ico b/DMS/AppIcon2.ico deleted file mode 100644 index 6c7fb71e62bdc16cc8bdb55d3dfb38d08b841e45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 67646 zcmeI4e{2**6vr3Aw0|fNV+cX9hIo}|sVLAGOstryNCZTrSLCPQFN6eRv=%59#nc!A z4N?3VKthUEdWsbO0Fqu~ORG{!OjLRY3IP!nw5Tyqu|D72_1wMXW^VU(_jWt`w)x)8 z+u6OlozJ{CzqYF={qS$qDg|G!S4QUcQ-&ytG7^Qm*v{B~mW&zkgrV19F;oQa06Jl2J^ zwc-4Mrpk@@3*!X(zbpLF&kK?LcUtD!w2r;DE_}Bw94Itg2Z+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IJ&|C9d){E3a=wR)bJ)Ejvfm$5JZ3mZu8iA%;x9$rApU}TJSF#i7TbtF@fSDr zoLq|k6#uFJ*XQd%#_|7&2S=4ZIjs<6*1fmqfy^o?%6pCz-qY@;`5%AJ{}6xTk9B~1 zpQa3XlCS;J{U2%SFY)Jh11SDe{Ffodi>`tEpZs6)I*{@BpW;8oe^Km|Ay0DOr~W_n z|0(_p>Hzt_GyT7px2%Sl(eJr>^A-N{pZ2`_Ec|@9jjQ_CX4y6;_4w3LAh!x!@&6Td z>tRwCaJ8ZO5iY~>%=g@_&Js^RvkRJ>$bx`VX%7fAxFIVL|)nT)p-3bZ-BD_lCvr{g=DB`smd% z?zv{?Bp2cRZ8GbrX@#!vH_O4T<7xiKnfUJ(PqW`k{E5Hhb%5f(p#Lv9ds_b!uxD)r z@u&DNc^#nmFNgt>v#0nkU{CR%ANyGjmJdDui=O{w+gzL3v3WL*r})p00p$Pk-~S5? ze-2#8gX1g(y>?UoWP4S=WE+pv9{;bRRB7#h6s1^T_rIVhc})s#@$X})_?8_zC(ZB6 z(O-|=#!^bUe$bcC@toxRbA!BW4}#?1mzS{n#d#Db?EZ1PDq-iuZAjRIVm6-D`+0dW z8_(*si(@vP)oWM9Y&@&ihM0|K#cli`Rv(KKHhvJZs}eST5VP?$ems6q?}m2LCa)d$ go5X9ZJQ7B%Xfy`dF2x&_0r64Gf~BZDTrQ9Q08P{;{{R30 diff --git a/DMS/DMS.csproj b/DMS/DMS.csproj deleted file mode 100644 index ecafec8..0000000 --- a/DMS/DMS.csproj +++ /dev/null @@ -1,70 +0,0 @@ - - - - - WinExe - net8.0-windows - enable - enable - true - AppIcon2.ico - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - - - Always - - - - - - - - MSBuild:Compile - - - MqttsView.xaml - - - MSBuild:Compile - - - MqttDialog.xaml - - - - - - - - - diff --git a/DMS/Data/Repositories/BaseRepositories.cs b/DMS/Data/Repositories/BaseRepositories.cs deleted file mode 100644 index 90aa47c..0000000 --- a/DMS/Data/Repositories/BaseRepositories.cs +++ /dev/null @@ -1,49 +0,0 @@ -using PMSWPF.Data.Entities; -using SqlSugar; - -namespace PMSWPF.Data.Repositories; - -public class BaseRepositories -{ - protected readonly SqlSugarClient _db; - - public BaseRepositories() - { - try - { - _db = DbContext.GetInstance(); - // _db.DbMaintenance.CreateDatabase(); - // CheckDbTables(); - } - catch (Exception e) - { - Console.WriteLine(e); - throw; - } - } - - private void CheckDbTables() - { - Stopwatch stopwatch = new Stopwatch(); - stopwatch.Start(); - if (!_db.DbMaintenance.IsAnyTable()) - _db.CodeFirst.InitTables(); - if (!_db.DbMaintenance.IsAnyTable()) - _db.CodeFirst.InitTables(); - if (!_db.DbMaintenance.IsAnyTable()) - _db.CodeFirst.InitTables(); - if (!_db.DbMaintenance.IsAnyTable()) - _db.CodeFirst.InitTables(); - if (!_db.DbMaintenance.IsAnyTable()) - _db.CodeFirst.InitTables(); - if (!_db.DbMaintenance.IsAnyTable()) - _db.CodeFirst.InitTables(); - if (!_db.DbMaintenance.IsAnyTable()) - _db.CodeFirst.InitTables(); - stopwatch.Stop(); - // Assuming NLog is available and configured for BaseRepositories - // If not, you might need to add a Logger field similar to DeviceRepository - // For now, I'll assume it's available or will be added. - // LogManager.GetCurrentClassLogger().Info($"检查数据库表耗时:{stopwatch.ElapsedMilliseconds}ms"); - } -} \ No newline at end of file diff --git a/DMS/Exceptions/DbExistException.cs b/DMS/Exceptions/DbExistException.cs deleted file mode 100644 index 9296baf..0000000 --- a/DMS/Exceptions/DbExistException.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace DMS.Excptions; - -public class DbExistException : Exception -{ - public DbExistException() - { - } - - public DbExistException(string message) : base(message) - { - } - - public DbExistException(string message, Exception innerException) : base(message, innerException) - { - } -} \ No newline at end of file diff --git a/DMS/LICENSE.txt b/DMS/LICENSE.txt deleted file mode 100644 index 0ad25db..0000000 --- a/DMS/LICENSE.txt +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/DMS/NetIcon256X256.ico b/DMS/NetIcon256X256.ico deleted file mode 100644 index 2cc7523c136f835666a64c97d305de06930490e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 270398 zcmeI53rtjJ`u|6?%32kRfQkyJR4rQT6&0ya)K)FJuG!L8A#1|IXiPG~>jC{!bPl z3y=lK0%QTQ09k-6Ko%eikOjyBWC5}OS%54+79b0d1;_$q0kQyDfGj{3APbNM$O2>m zvH)3tEI<|@3y=lK0%QTQ09k-6Ko%eikOjyBWC5}OS%54+79b0d1$<}$)72g0yKihw z?7p@w7245#ecSHtYg_j~T3KBmZPj*tv;}%W((_2UHVf*!x=Gu4MWM@heR(64A?V?y z=d_~IkwO=_((JSW@1GU*VXF4w1+MjiI?k`xwx3V2ssgVo)Ov~(5VRiYde(lPD@D>e2KJ$~R-IeJz(15MsvK$gYDueD+u2nN>|1qa z1q1)ka#5$3Gw?6z83y*DrBVfqjLdm?58QnnIBb{7ZTQsieHA4E#e8g1|om|FX=rxswew z`zL=^vwu=qQH6-}-G*_st!9dv5Od7c>C=S#e+K>~P5icI|HQx4?x%LaPz$i0+dC6`Z|^+Tduyi& zV!fPw;-A|8mOg;r+y9>Mk8)rltI7FIe@#w!S@r(#c|+wO)IQ&L>-TXzw|{r0_xA4w zAaKvwC;r7T0P6o+#{dF~e_jS~4OD*+UhyDj{OnNU+THzj-~4@e@10$HdvEVD3EXq` ziGPgy(fFV7uqwy@hEo5_{38u#C<9E@A57R+l`|pS9T%aH-*;zMdf%Pj{|NrUJeR~i z@lX5U|Tct3Mc@9tw;*y2rlHULFtb^C2_Dh=0rj()^z|2WXl5{IzK>t-7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NN(`Bw8N4P^cP zq2yZ)Xg%I)UZsH@=gTcIrG2dC7wd8H7Olq*C0{nVv-3O3k7w3@lrKMER{OiNkMj3% zWWS;059j$%K7WpmSLQo}U-5FbrNqK%(yZl|^#`UT3+XixmMg?LZ5~$s1v*WdVv z7sy?{?vE2Rf5eAuju(F+;dtFI5juX84)TBH=jZwSCT;S?U(j9tFHVmae_pWm%u+W23_>K*0B zBb&o9;oby?`P{(bPe0*anuGIm1B#DM#Jvq;^f*(Rd;ngHeOtZoDqgpDEPrL2&u>5{ zBwy$7Na2q{i96E#d(O`8U4;P_R{#kx)`FbZ`AX$&!gTp(_<~j5)z%B6q0T^)Y>Hq)$ diff --git a/DMS/PMSWPF.OpcUaClient.Config.xml b/DMS/PMSWPF.OpcUaClient.Config.xml deleted file mode 100644 index 4c6679c..0000000 --- a/DMS/PMSWPF.OpcUaClient.Config.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - DMS OPC UA Client - urn:{System.Net.Dns.GetHostName()}:DMS.OpcUaClient - 0 - - - - Directory - %CommonApplicationData%/OPC Foundation/CertificateStores/MachineDefault - CN=DMS OPC UA Client, O=OPC Foundation, OU=UA Applications - - - Directory - %CommonApplicationData%/OPC Foundation/CertificateStores/UA Certificate Authorities - - - Directory - %CommonApplicationData%/OPC Foundation/CertificateStores/UA Applications - - - Directory - %CommonApplicationData%/OPC Foundation/CertificateStores/RejectedCertificates - - true - - - - 15000 - 4194304 - 65535 - 65535 - 4194304 - - - - 60000 - - - - - en-US - - 10000 - - - - ./Logs/OpcUaClient.log - true - 1023 - - - - \ No newline at end of file diff --git a/PMSWPF.Tests/ExcelHelperTests.cs b/PMSWPF.Tests/ExcelHelperTests.cs deleted file mode 100644 index e4e8669..0000000 --- a/PMSWPF.Tests/ExcelHelperTests.cs +++ /dev/null @@ -1,150 +0,0 @@ -using NUnit.Framework; -using PMSWPF.Helper; -using System.Collections.Generic; -using System.Data; -using System.IO; -using PMSWPF.Enums; -using PMSWPF.Models; - -namespace PMSWPF.Tests -{ - [TestFixture] - public class ExcelHelperTests - { - private string _testFilePath; - - [SetUp] - public void Setup() - { - // Create a temporary file for testing - // _testFilePath = Path.Combine(Path.GetTempPath(), "test.xlsx"); - _testFilePath = "e:/test.xlsx"; - } - - [TearDown] - public void TearDown() - { - // Clean up the temporary file - if (File.Exists(_testFilePath)) - { - File.Delete(_testFilePath); - } - } - - [Test] - public void ExportToExcel_WithListOfObjects_CreatesFile() - { - // Arrange - var data = new List - { - new TestData { Id = 1, Name = "Test1" }, - new TestData { Id = 2, Name = "Test2" } - }; - - // Act - ExcelHelper.ExportToExcel(data, _testFilePath); - - // Assert - Assert.IsTrue(File.Exists(_testFilePath)); - } - - [Test] - public void ExportToExcel_WithDataTable_CreatesFile() - { - // Arrange - var dataTable = new DataTable(); - dataTable.Columns.Add("Id", typeof(int)); - dataTable.Columns.Add("Name", typeof(string)); - dataTable.Rows.Add(1, "Test1"); - dataTable.Rows.Add(2, "Test2"); - - // Act - ExcelHelper.ExportToExcel(dataTable, _testFilePath); - - // Assert - Assert.IsTrue(File.Exists(_testFilePath)); - } - - [Test] - public void ImportFromExcel_ToDataTable_ReturnsCorrectData() - { - // Arrange - var dataTable = new DataTable(); - dataTable.Columns.Add("Id", typeof(int)); - dataTable.Columns.Add("Name", typeof(string)); - dataTable.Rows.Add(1, "Test1"); - dataTable.Rows.Add(2, "Test2"); - ExcelHelper.ExportToExcel(dataTable, _testFilePath); - - // Act - var result = ExcelHelper.ImportFromExcel(_testFilePath); - - // Assert - Assert.AreEqual(2, result.Rows.Count); - Assert.AreEqual("1", result.Rows[0]["Id"]); - Assert.AreEqual("Test1", result.Rows[0]["Name"]); - } - - [Test] - public void ImportVarDataFormExcel() - { - // Act - _testFilePath = "C:\\Users\\Administrator\\Desktop\\浓度变量.xlsx"; - var dataTable = ExcelHelper.ImportFromExcel(_testFilePath); - // 判断表头的名字 - if (dataTable.Columns[0].ColumnName != "Name" || dataTable.Columns[2].ColumnName != "Data Type" && - dataTable.Columns[3].ColumnName != "Logical Address") - throw new AggregateException( - "Excel表格式不正确:第一列的名字是:Name,第三列的名字是:Data Type,Data Type,第四列的名字是:Logical Address,请检查"); - - - List variables = new List(); - foreach (DataRow dataRow in dataTable.Rows) - { - Variable variable = new Variable(); - variable.Name=dataRow["Name"].ToString(); - variable.DataType=SiemensHelper.S7ToCSharpTypeString(dataRow["Data Type"].ToString()) ; - var exS7Addr=dataRow["Logical Address"].ToString(); - if (exS7Addr.StartsWith("%")) - { - variable.S7Address = exS7Addr.Substring(1); - } - - variable.ProtocolType = ProtocolType.S7; - variable.SignalType = SignalType.OtherASignal; - variables.Add(variable); - } - Assert.Greater(variables.Count, 0); - // Assert - // Assert.AreEqual(2, result.Rows.Count);FDFD - // Assert.AreEqual("1", result.Rows[0]["Id"]); - // Assert.AreEqual("Test1", result.Rows[0]["Name"]); - } - - [Test] - public void ImportFromExcel_ToListOfObjects_ReturnsCorrectData() - { - // Arrange - var data = new List - { - new TestData { Id = 1, Name = "Test1" }, - new TestData { Id = 2, Name = "Test2" } - }; - ExcelHelper.ExportToExcel(data, _testFilePath); - - // Act - var result = ExcelHelper.ImportFromExcel(_testFilePath); - - // Assert - Assert.AreEqual(2, result.Count); - Assert.AreEqual(1, result[0].Id); - Assert.AreEqual("Test1", result[0].Name); - } - - private class TestData - { - public int Id { get; set; } - public string Name { get; set; } - } - } -} \ No newline at end of file diff --git a/PMSWPF.Tests/MqttRepositoryTests.cs b/PMSWPF.Tests/MqttRepositoryTests.cs deleted file mode 100644 index 371621a..0000000 --- a/PMSWPF.Tests/MqttRepositoryTests.cs +++ /dev/null @@ -1,152 +0,0 @@ -using NUnit.Framework; -using PMSWPF.Data.Repositories; -using PMSWPF.Data.Entities; -using System.Threading.Tasks; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -using System; -using System.Data; -using DbType = SqlSugar.DbType; - -namespace PMSWPF.Tests -{ - [TestFixture] - public class MqttRepositoryTests - { - private MqttRepository _mqttRepository; - private SqlSugarClient _db; - - [SetUp] - public void Setup() - { - // Use an in-memory SQLite database for testing - _db = new SqlSugarClient(new ConnectionConfig() - { - DbType = DbType.MySql, - ConnectionString = "server=127.0.0.1;port=3306;user=root;password=Pgw15221236646; database=pmswpf;", - IsAutoCloseConnection = true, - InitKeyType = InitKeyType.Attribute - }); - - // Create tables - _db.CodeFirst.InitTables(); - - // Initialize repository with the in-memory database instance - // This requires modifying DbContext.GetInstance() or MqttRepository to accept an ISqlSugarClient - // For now, we'll assume DbContext.GetInstance() can be configured for testing. - // In a real scenario, you'd typically inject ISqlSugarClient into MqttRepository. - // For this example, we'll directly use the _db instance for setup and verification. - // _mqttRepository = new MqttRepository(); // This will still use the static DbContext.GetInstance() - - // To properly test, DbContext.GetInstance() needs to be mockable or configurable. - // For demonstration, we'll simulate the DbContext behavior directly here. - // This is a simplification and not ideal for true unit testing without refactoring DbContext. - } - - [TearDown] - public void TearDown() - { - _db.Dispose(); - } - - [Test] - public async Task AddAsync_ShouldAddMqttEntity() - { - // Arrange - var mqtt = new DbMqtt - { - Name = "TestMqtt", Host = "127.0.0.1", Port = 1883, UserName = "user", PassWord = "password", - }; - - // Act - // This test will currently fail or interact with the real database - // because MqttRepository uses static DbContext.GetInstance(). - // Proper testing requires dependency injection for DbContext. - // For now, we'll simulate the expected outcome if DbContext was mocked. - // int result = await _mqttRepository.AddAsync(mqtt); // This line would be uncommented with proper DI - - // Simulate adding to the in-memory DB for verification - int result = await _db.Insertable(mqtt).ExecuteReturnIdentityAsync(); - - // Assert - Assert.Greater(result, 0); - var addedMqtt = await _db.Queryable().In(result).SingleAsync(); - Assert.IsNotNull(addedMqtt); - Assert.AreEqual("TestMqtt", addedMqtt.Name); - } - - [Test] - public async Task GetByIdAsync_ShouldReturnCorrectMqttEntity() - { - // Arrange - var mqtt = new DbMqtt - { Name = "TestMqtt", Host = "127.0.0.1", Port = 1883, UserName = "user", PassWord = "password" }; - int id = await _db.Insertable(mqtt).ExecuteReturnIdentityAsync(); - - // Act - // DbMqtt result = await _mqttRepository.GetByIdAsync(id); // Uncomment with proper DI - DbMqtt result = await _db.Queryable().In(id).SingleAsync(); // Simulate repository call - - // Assert - Assert.IsNotNull(result); - Assert.AreEqual(id, result.Id); - Assert.AreEqual("TestMqtt", result.Name); - } - - [Test] - public async Task GetAllAsync_ShouldReturnAllMqttEntities() - { - // Arrange - await _db.Insertable(new DbMqtt { Name = "Mqtt1", Host = "127.0.0.1", Port = 1883 }).ExecuteCommandAsync(); - await _db.Insertable(new DbMqtt { Name = "Mqtt2", Host = "127.0.0.2", Port = 1884 }).ExecuteCommandAsync(); - - // Act - // List result = await _mqttRepository.GetAllAsync(); // Uncomment with proper DI - List result = await _db.Queryable().ToListAsync(); // Simulate repository call - - // Assert - Assert.AreEqual(2, result.Count); - Assert.IsTrue(result.Any(m => m.Name == "Mqtt1")); - Assert.IsTrue(result.Any(m => m.Name == "Mqtt2")); - } - - [Test] - public async Task UpdateAsync_ShouldUpdateMqttEntity() - { - // Arrange - var mqtt = new DbMqtt { Name = "OldName", Host = "127.0.0.1", Port = 1883 }; - int id = await _db.Insertable(mqtt).ExecuteReturnIdentityAsync(); - - mqtt.Id = id; - mqtt.Name = "NewName"; - - // Act - // int affectedRows = await _mqttRepository.UpdateAsync(mqtt); // Uncomment with proper DI - int affectedRows = await _db.Updateable(mqtt).ExecuteCommandAsync(); // Simulate repository call - - // Assert - Assert.AreEqual(1, affectedRows); - var updatedMqtt = await _db.Queryable().In(id).SingleAsync(); - Assert.IsNotNull(updatedMqtt); - Assert.AreEqual("NewName", updatedMqtt.Name); - } - - [Test] - public async Task DeleteAsync_ShouldDeleteMqttEntity() - { - // Arrange - var mqtt = new DbMqtt { Name = "ToDelete", Host = "127.0.0.1", Port = 1883 }; - int id = await _db.Insertable(mqtt).ExecuteReturnIdentityAsync(); - - // Act - // int affectedRows = await _mqttRepository.DeleteAsync(id); // Uncomment with proper DI - int affectedRows = await _db.Deleteable().In(id).ExecuteCommandAsync(); // Simulate repository call - - // Assert - Assert.AreEqual(1, affectedRows); - var deletedMqtt = await _db.Queryable().In(id).SingleAsync(); - Assert.IsNull(deletedMqtt); - } - } -} \ No newline at end of file diff --git a/PMSWPF.Tests/NotificationHelperTests.cs b/PMSWPF.Tests/NotificationHelperTests.cs deleted file mode 100644 index d76f8b8..0000000 --- a/PMSWPF.Tests/NotificationHelperTests.cs +++ /dev/null @@ -1,99 +0,0 @@ -using NLog; -using NLog.Config; -using NLog.Targets; -using NUnit.Framework; -using PMSWPF.Helper; -using System; -using System.Linq; - -namespace PMSWPF.Tests -{ - [TestFixture] - public class NotificationHelperTests - { - private MemoryTarget _memoryTarget; - // private Logger _logger; // 声明一个 Logger 变量 - 这个不再需要了 - - [SetUp] - public void Setup() - { - // 1. 加载外部的 nlog.config 文件 - LogManager.LoadConfiguration("nlog.config"); - - // 2. 获取当前加载的配置 - var config = LogManager.Configuration; - - // 3. 创建 MemoryTarget - _memoryTarget = new MemoryTarget("testMemoryTarget") - { - // 捕获消息、级别、异常和 MDC 数据 - Layout - = "${message}|${level}|${exception:format=tostring}|${mdlc:item=CallerFilePath}|${mdlc:item=CallerParentLineNumber}" - }; - - // 4. 将 MemoryTarget 添加到配置中 - config.AddTarget(_memoryTarget); - - // 5. 定义一个规则,将所有日志路由到 MemoryTarget - // 注意:这里我们添加一个新的规则,确保日志也发送到 MemoryTarget - config.AddRule(LogLevel.Trace, LogLevel.Fatal, _memoryTarget); - - // 6. 重新应用配置,以包含新的 MemoryTarget 和规则 - LogManager.Configuration = config; - - // 7. 清空 MemoryTarget 中的日志 - _memoryTarget.Logs.Clear(); - } - - [TearDown] - public void Teardown() - { - // 在每个测试结束后,重置 NLog 配置,避免影响其他测试 - LogManager.Configuration = null; - // 清除 _memoryTarget 引用,以满足静态分析工具的建议 - _memoryTarget.Dispose(); - _memoryTarget = null; - } - - [Test] - public void ShowException_ShouldLogErrorWithExceptionAndCallerInfo() - { - // Arrange - // var testMessage = "这是一个测试异常消息"; - // var innerException = new InvalidOperationException("内部操作失败"); - // var testException = new Exception("外部异常", innerException); - // var expectedCallerFilePath = "D:\\CShap\\PMSWPF\\Tests\\NotificationHelperTests.cs"; // 模拟调用文件路径 - // var expectedCallerLineNumber = 49; // 模拟调用行号 (根据实际测试代码行数调整) - - // Act - // 调用 ShowException 方法,并传入模拟的异常和调用信息 - // NotificationHelper.ShowException(testMessage, testException, expectedCallerFilePath, expectedCallerLineNumber); - - NlogHelper.Info("info"); - NlogHelper.Warn("warn"); - NlogHelper.Trace("trace"); - NlogHelper.Error("hello"); - - // Assert - Assert.That(_memoryTarget.Logs.Count, Is.EqualTo(1), "应该只记录一条日志"); - - var logEntry = _memoryTarget.Logs[0]; - - // 验证日志消息 - // Assert.That(logEntry, Does.Contain(testMessage), "日志消息应该包含测试消息"); - // - // // 验证日志级别 - // Assert.That(logEntry, Does.Contain("|Error|"), "日志级别应该是 Error"); - // - // // 验证异常信息 - // Assert.That(logEntry, Does.Contain(testException.Message), "日志应该包含外部异常消息"); - // Assert.That(logEntry, Does.Contain(innerException.Message), "日志应该包含内部异常消息"); - // Assert.That(logEntry, Does.Contain(nameof(InvalidOperationException)), "日志应该包含内部异常类型"); - // Assert.That(logEntry, Does.Contain(nameof(Exception)), "日志应该包含外部异常类型"); - // - // // 验证 CallerFilePath 和 CallerParentLineNumber - // Assert.That(logEntry, Does.Contain($"|{expectedCallerFilePath}|"), "日志应该包含 CallerFilePath"); - // Assert.That(logEntry, Does.Contain($"|{expectedCallerLineNumber}"), "日志应该包含 CallerParentLineNumber"); - } - } -} \ No newline at end of file diff --git a/PMSWPF.Tests/PMSWPF.Tests.csproj b/PMSWPF.Tests/PMSWPF.Tests.csproj deleted file mode 100644 index 868e305..0000000 --- a/PMSWPF.Tests/PMSWPF.Tests.csproj +++ /dev/null @@ -1,37 +0,0 @@ - - - - net8.0-windows - enable - enable - - false - true - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - -