diff --git a/DMS.WPF.UnitTests/ViewModelTest/BaseServiceTest.cs b/DMS.WPF.UnitTests/ViewModelTest/BaseServiceTest.cs index abd0aac..8378b06 100644 --- a/DMS.WPF.UnitTests/ViewModelTest/BaseServiceTest.cs +++ b/DMS.WPF.UnitTests/ViewModelTest/BaseServiceTest.cs @@ -9,6 +9,7 @@ using DMS.Core.Interfaces.Repositories; using DMS.Infrastructure.Configurations; using DMS.Infrastructure.Data; using DMS.Infrastructure.Repositories; +using DMS.WPF.Interfaces; using DMS.WPF.Services; using DMS.WPF.ViewModels; using Microsoft.Extensions.DependencyInjection; diff --git a/DMS.WPF/App.xaml.cs b/DMS.WPF/App.xaml.cs index d4b0e37..dd71d0b 100644 --- a/DMS.WPF/App.xaml.cs +++ b/DMS.WPF/App.xaml.cs @@ -24,10 +24,11 @@ using DMS.WPF.Services; using DMS.WPF.Services.Processors; using DMS.WPF.ViewModels.Dialogs; using DataProcessingService = DMS.Services.DataProcessingService; -using IDataProcessingService = DMS.Services.IDataProcessingService; +using IDataProcessingService = DMS.WPF.Interfaces.IDataProcessingService; using LogLevel = Microsoft.Extensions.Logging.LogLevel; using DMS.Core.Interfaces.Services; using DMS.Infrastructure.Interfaces.Services; +using DMS.WPF.Interfaces; namespace DMS; diff --git a/DMS.WPF/Services/IDataProcessingService.cs b/DMS.WPF/Interfaces/IDataProcessingService.cs similarity index 92% rename from DMS.WPF/Services/IDataProcessingService.cs rename to DMS.WPF/Interfaces/IDataProcessingService.cs index 2bec020..8e72677 100644 --- a/DMS.WPF/Services/IDataProcessingService.cs +++ b/DMS.WPF/Interfaces/IDataProcessingService.cs @@ -1,7 +1,7 @@ -using System.Threading.Tasks; using DMS.Core.Models; +using DMS.Services; -namespace DMS.Services; +namespace DMS.WPF.Interfaces; /// /// 定义了数据处理服务的接口。 diff --git a/DMS.WPF/Services/IDialogService.cs b/DMS.WPF/Interfaces/IDialogService.cs similarity index 75% rename from DMS.WPF/Services/IDialogService.cs rename to DMS.WPF/Interfaces/IDialogService.cs index dee24c4..fecc4a3 100644 --- a/DMS.WPF/Services/IDialogService.cs +++ b/DMS.WPF/Interfaces/IDialogService.cs @@ -1,7 +1,6 @@ using DMS.WPF.ViewModels.Dialogs; -using System.Threading.Tasks; -namespace DMS.WPF.Services +namespace DMS.WPF.Interfaces { public interface IDialogService { diff --git a/DMS.WPF/Services/INavigatable.cs b/DMS.WPF/Interfaces/INavigatable.cs similarity index 94% rename from DMS.WPF/Services/INavigatable.cs rename to DMS.WPF/Interfaces/INavigatable.cs index f772f69..882eb20 100644 --- a/DMS.WPF/Services/INavigatable.cs +++ b/DMS.WPF/Interfaces/INavigatable.cs @@ -2,7 +2,7 @@ using DMS.WPF.ViewModels.Items; -namespace DMS.WPF.Services; +namespace DMS.WPF.Interfaces; /// /// 定义了一个契约,表示ViewModel可以安全地接收导航传入的参数。 diff --git a/DMS.WPF/Services/INavigationService.cs b/DMS.WPF/Interfaces/INavigationService.cs similarity index 90% rename from DMS.WPF/Services/INavigationService.cs rename to DMS.WPF/Interfaces/INavigationService.cs index 54b4703..0e062ab 100644 --- a/DMS.WPF/Services/INavigationService.cs +++ b/DMS.WPF/Interfaces/INavigationService.cs @@ -1,8 +1,8 @@ // 文件: DMS.WPF/Services/INavigationService.cs -using System.Threading.Tasks; + using DMS.WPF.ViewModels.Items; -namespace DMS.WPF.Services; +namespace DMS.WPF.Interfaces; /// /// 定义了应用程序的导航服务接口。 diff --git a/DMS.WPF/Services/INotificationService.cs b/DMS.WPF/Interfaces/INotificationService.cs similarity index 79% rename from DMS.WPF/Services/INotificationService.cs rename to DMS.WPF/Interfaces/INotificationService.cs index 5662106..39514c8 100644 --- a/DMS.WPF/Services/INotificationService.cs +++ b/DMS.WPF/Interfaces/INotificationService.cs @@ -1,6 +1,4 @@ -using DMS.Core.Enums; - -namespace DMS.Services; +namespace DMS.WPF.Interfaces; public interface INotificationService { diff --git a/DMS.WPF/Services/IVariableProcessor.cs b/DMS.WPF/Interfaces/IVariableProcessor.cs similarity index 94% rename from DMS.WPF/Services/IVariableProcessor.cs rename to DMS.WPF/Interfaces/IVariableProcessor.cs index c171369..25f2150 100644 --- a/DMS.WPF/Services/IVariableProcessor.cs +++ b/DMS.WPF/Interfaces/IVariableProcessor.cs @@ -1,6 +1,6 @@ using DMS.Core.Models; -namespace DMS.Services; +namespace DMS.WPF.Interfaces; /// /// 定义了变量数据处理器的通用接口。 diff --git a/DMS.WPF/Services/DataProcessingService.cs b/DMS.WPF/Services/DataProcessingService.cs index bc37da8..bf64f7b 100644 --- a/DMS.WPF/Services/DataProcessingService.cs +++ b/DMS.WPF/Services/DataProcessingService.cs @@ -1,6 +1,7 @@ using System.Threading.Channels; using DMS.Core.Helper; using DMS.Core.Models; +using DMS.WPF.Interfaces; using Microsoft.Extensions.Hosting; namespace DMS.Services; diff --git a/DMS.WPF/Services/DialogService.cs b/DMS.WPF/Services/DialogService.cs index bc4adb5..37f1222 100644 --- a/DMS.WPF/Services/DialogService.cs +++ b/DMS.WPF/Services/DialogService.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using System.Windows; +using DMS.WPF.Interfaces; using DMS.WPF.Views; using iNKORE.UI.WPF.Modern.Controls; diff --git a/DMS.WPF/Services/NavigationService.cs b/DMS.WPF/Services/NavigationService.cs index f29071c..6304a19 100644 --- a/DMS.WPF/Services/NavigationService.cs +++ b/DMS.WPF/Services/NavigationService.cs @@ -10,6 +10,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using System.Windows; +using DMS.WPF.Interfaces; namespace DMS.WPF.Services; diff --git a/DMS.WPF/Services/Processors/CheckValueChangedProcessor.cs b/DMS.WPF/Services/Processors/CheckValueChangedProcessor.cs index 3de91bc..246e204 100644 --- a/DMS.WPF/Services/Processors/CheckValueChangedProcessor.cs +++ b/DMS.WPF/Services/Processors/CheckValueChangedProcessor.cs @@ -1,6 +1,7 @@ using DMS.Core.Helper; using DMS.Core.Models; using DMS.Helper; +using DMS.WPF.Interfaces; using DMS.WPF.Services; namespace DMS.Services.Processors; diff --git a/DMS.WPF/Services/Processors/HistoryProcessor.cs b/DMS.WPF/Services/Processors/HistoryProcessor.cs index adea7b1..d811867 100644 --- a/DMS.WPF/Services/Processors/HistoryProcessor.cs +++ b/DMS.WPF/Services/Processors/HistoryProcessor.cs @@ -1,6 +1,7 @@ using DMS.Core.Helper; using DMS.Core.Models; using DMS.Services; +using DMS.WPF.Interfaces; using Microsoft.Extensions.Logging; namespace DMS.WPF.Services.Processors; diff --git a/DMS.WPF/Services/Processors/LoggingProcessor.cs b/DMS.WPF/Services/Processors/LoggingProcessor.cs index 403dad8..8327246 100644 --- a/DMS.WPF/Services/Processors/LoggingProcessor.cs +++ b/DMS.WPF/Services/Processors/LoggingProcessor.cs @@ -2,6 +2,7 @@ using System.Threading.Tasks; using DMS.Core.Models; using Microsoft.Extensions.Logging; using DMS.Helper; +using DMS.WPF.Interfaces; namespace DMS.Services.Processors; diff --git a/DMS.WPF/Services/Processors/MqttPublishProcessor.cs b/DMS.WPF/Services/Processors/MqttPublishProcessor.cs index 0c99cec..66c8dee 100644 --- a/DMS.WPF/Services/Processors/MqttPublishProcessor.cs +++ b/DMS.WPF/Services/Processors/MqttPublishProcessor.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using DMS.Core.Models; +using DMS.WPF.Interfaces; namespace DMS.Services.Processors { diff --git a/DMS.WPF/Services/Processors/UpdateDbVariableProcessor.cs b/DMS.WPF/Services/Processors/UpdateDbVariableProcessor.cs index a5b378d..18484c5 100644 --- a/DMS.WPF/Services/Processors/UpdateDbVariableProcessor.cs +++ b/DMS.WPF/Services/Processors/UpdateDbVariableProcessor.cs @@ -2,6 +2,7 @@ using System.Threading.Tasks; using DMS.Core.Helper; using DMS.Core.Models; using DMS.Helper; +using DMS.WPF.Interfaces; using DMS.WPF.Services; namespace DMS.Services.Processors diff --git a/DMS.WPF/ViewModels/DeviceDetailViewModel.cs b/DMS.WPF/ViewModels/DeviceDetailViewModel.cs index 0a37533..ceed95e 100644 --- a/DMS.WPF/ViewModels/DeviceDetailViewModel.cs +++ b/DMS.WPF/ViewModels/DeviceDetailViewModel.cs @@ -8,6 +8,7 @@ using DMS.Core.Enums; using DMS.Helper; using DMS.WPF.Services; using DMS.Services; +using DMS.WPF.Interfaces; using DMS.WPF.ViewModels.Dialogs; using DMS.WPF.ViewModels.Items; using iNKORE.UI.WPF.Modern.Common.IconKeys; @@ -57,7 +58,8 @@ public partial class DeviceDetailViewModel : ViewModelBase, INavigatable var tableMenu = new MenuBeanDto() { Header = variableTableItemViewModel.Name, - Icon = SegoeFluentIcons.DataSense.Glyph + Icon = SegoeFluentIcons.DataSense.Glyph, + TargetViewKey = "VariableTableView" }; if (await DataServices.AddVariableTable(_mapper.Map(variableTableItemViewModel), diff --git a/DMS.WPF/ViewModels/DevicesViewModel.cs b/DMS.WPF/ViewModels/DevicesViewModel.cs index 6e4d474..d643b8b 100644 --- a/DMS.WPF/ViewModels/DevicesViewModel.cs +++ b/DMS.WPF/ViewModels/DevicesViewModel.cs @@ -10,6 +10,7 @@ using DMS.Core.Models; using DMS.Helper; using DMS.Services; using DMS.WPF.Helper; +using DMS.WPF.Interfaces; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using DMS.WPF.Services; diff --git a/DMS.WPF/ViewModels/MainViewModel.cs b/DMS.WPF/ViewModels/MainViewModel.cs index 35f55e3..530dd52 100644 --- a/DMS.WPF/ViewModels/MainViewModel.cs +++ b/DMS.WPF/ViewModels/MainViewModel.cs @@ -11,6 +11,7 @@ using DMS.Helper; using DMS.Services; using DMS.ViewModels; using DMS.WPF.Helper; +using DMS.WPF.Interfaces; using DMS.WPF.ViewModels.Items; using iNKORE.UI.WPF.Modern.Common.IconKeys; using Microsoft.Extensions.DependencyInjection; diff --git a/DMS.WPF/ViewModels/MqttServerDetailViewModel.cs b/DMS.WPF/ViewModels/MqttServerDetailViewModel.cs index 91829a1..7e397f2 100644 --- a/DMS.WPF/ViewModels/MqttServerDetailViewModel.cs +++ b/DMS.WPF/ViewModels/MqttServerDetailViewModel.cs @@ -5,6 +5,7 @@ using System.Collections.ObjectModel; using DMS.Core.Models; using DMS.Helper; using DMS.Services; +using DMS.WPF.Interfaces; using DMS.WPF.Services; using DMS.WPF.ViewModels; using DMS.WPF.ViewModels.Items; diff --git a/DMS.WPF/ViewModels/MqttsViewModel.cs b/DMS.WPF/ViewModels/MqttsViewModel.cs index 6851e06..b97d079 100644 --- a/DMS.WPF/ViewModels/MqttsViewModel.cs +++ b/DMS.WPF/ViewModels/MqttsViewModel.cs @@ -5,6 +5,7 @@ using DMS.Core.Enums; using DMS.Helper; using DMS.Services; using DMS.WPF.Helper; +using DMS.WPF.Interfaces; using DMS.WPF.Services; using DMS.WPF.ViewModels.Items; using Microsoft.Extensions.Logging; diff --git a/DMS.WPF/ViewModels/VariableTableViewModel.cs b/DMS.WPF/ViewModels/VariableTableViewModel.cs index 4e19327..da7456e 100644 --- a/DMS.WPF/ViewModels/VariableTableViewModel.cs +++ b/DMS.WPF/ViewModels/VariableTableViewModel.cs @@ -14,6 +14,7 @@ using ObservableCollections; using System.Collections; using System.Collections.Generic; using System.Linq; +using DMS.WPF.Interfaces; namespace DMS.WPF.ViewModels;