diff --git a/PMSWPF.sln b/DMS.sln similarity index 55% rename from PMSWPF.sln rename to DMS.sln index deffc39..fbc0702 100644 --- a/PMSWPF.sln +++ b/DMS.sln @@ -1,11 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.12.35728.132 d17.12 +VisualStudioVersion = 17.12.35728.132 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PMSWPF", "PMSWPF.csproj", "{CD3529C9-218C-41EE-B64B-A884DC56E21E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PMSWPF.Tests", "PMSWPF.Tests\PMSWPF.Tests.csproj", "{5EEE2682-FB7B-4E77-AB22-1B7C4E47F53A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DMS", "DMS\DMS.csproj", "{CD3529C9-218C-41EE-B64B-A884DC56E21E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -17,10 +15,6 @@ Global {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 - {5EEE2682-FB7B-4E77-AB22-1B7C4E47F53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5EEE2682-FB7B-4E77-AB22-1B7C4E47F53A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5EEE2682-FB7B-4E77-AB22-1B7C4E47F53A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5EEE2682-FB7B-4E77-AB22-1B7C4E47F53A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/App.xaml b/DMS/App.xaml similarity index 97% rename from App.xaml rename to DMS/App.xaml index aa6b598..5da72cb 100644 --- a/App.xaml +++ b/DMS/App.xaml @@ -1,5 +1,5 @@  /// Interaction logic for App.xaml @@ -78,7 +78,7 @@ public partial class App : Application MainWindow.Show(); // 根据配置启动服务 - // var connectionSettings = PMSWPF.Config.ConnectionSettings.Load(); + // var connectionSettings = DMS.Config.ConnectionSettings.Load(); // if (connectionSettings.EnableMqttService) // { // Host.Services.GetRequiredService().StartService(); diff --git a/AppIcon2.ico b/DMS/AppIcon2.ico similarity index 100% rename from AppIcon2.ico rename to DMS/AppIcon2.ico diff --git a/Assets/AppIcon.png b/DMS/Assets/AppIcon.png similarity index 100% rename from Assets/AppIcon.png rename to DMS/Assets/AppIcon.png diff --git a/Config/ConnectionSettings.cs b/DMS/Config/ConnectionSettings.cs similarity index 98% rename from Config/ConnectionSettings.cs rename to DMS/Config/ConnectionSettings.cs index b725148..dba00ad 100644 --- a/Config/ConnectionSettings.cs +++ b/DMS/Config/ConnectionSettings.cs @@ -2,7 +2,7 @@ using System; using System.IO; using Newtonsoft.Json; -namespace PMSWPF.Config +namespace DMS.Config { public class ConnectionSettings { diff --git a/Config/nlog.config b/DMS/Config/nlog.config similarity index 100% rename from Config/nlog.config rename to DMS/Config/nlog.config diff --git a/PMSWPF.csproj b/DMS/DMS.csproj similarity index 100% rename from PMSWPF.csproj rename to DMS/DMS.csproj diff --git a/Data/DbContext.cs b/DMS/Data/DbContext.cs similarity index 84% rename from Data/DbContext.cs rename to DMS/Data/DbContext.cs index 731a849..9037e02 100644 --- a/Data/DbContext.cs +++ b/DMS/Data/DbContext.cs @@ -1,12 +1,13 @@ -using SqlSugar; +using DMS.Config; +using SqlSugar; -namespace PMSWPF.Data; +namespace DMS.Data; public class DbContext { public static SqlSugarClient GetInstance() { - var settings = PMSWPF.Config.ConnectionSettings.Load(); + var settings = ConnectionSettings.Load(); var connectionString = settings.ToConnectionString(); var dbType = (SqlSugar.DbType)Enum.Parse(typeof(SqlSugar.DbType), settings.DbType); diff --git a/Data/Entities/DbDevice.cs b/DMS/Data/Entities/DbDevice.cs similarity index 90% rename from Data/Entities/DbDevice.cs rename to DMS/Data/Entities/DbDevice.cs index e9d217f..f732c42 100644 --- a/Data/Entities/DbDevice.cs +++ b/DMS/Data/Entities/DbDevice.cs @@ -1,10 +1,11 @@ -using PMSWPF.Enums; +using DMS.Enums; using SqlSugar; using SqlSugar.DbConvert; -using ProtocolType = PMSWPF.Enums.ProtocolType; -using S7.Net; // AddAsync this using directive +using ProtocolType = DMS.Enums.ProtocolType; +using S7.Net; +using Enums_ProtocolType = DMS.Enums.ProtocolType; // AddAsync this using directive -namespace PMSWPF.Data.Entities; +namespace DMS.Data.Entities; /// /// 表示数据库中的设备实体。 @@ -77,7 +78,7 @@ public class DbDevice /// 设备的通信协议类型。 /// [SugarColumn(ColumnDataType = "varchar(20)", SqlParameterDbType = typeof(EnumToStringConvert))] - public ProtocolType ProtocolType { get; set; } + public Enums_ProtocolType ProtocolType { get; set; } /// /// OPC UA Endpoint URL。 diff --git a/Data/Entities/DbMenu.cs b/DMS/Data/Entities/DbMenu.cs similarity index 96% rename from Data/Entities/DbMenu.cs rename to DMS/Data/Entities/DbMenu.cs index 1567e29..a1fb965 100644 --- a/Data/Entities/DbMenu.cs +++ b/DMS/Data/Entities/DbMenu.cs @@ -1,8 +1,8 @@ -using PMSWPF.Enums; +using DMS.Enums; using SqlSugar; using SqlSugar.DbConvert; -namespace PMSWPF.Data.Entities; +namespace DMS.Data.Entities; /// /// 表示数据库中的菜单实体。 diff --git a/Data/Entities/DbMqtt.cs b/DMS/Data/Entities/DbMqtt.cs similarity index 97% rename from Data/Entities/DbMqtt.cs rename to DMS/Data/Entities/DbMqtt.cs index 0bc43d6..84c9d09 100644 --- a/Data/Entities/DbMqtt.cs +++ b/DMS/Data/Entities/DbMqtt.cs @@ -1,8 +1,8 @@ -using PMSWPF.Enums; +using DMS.Enums; using SqlSugar; using SqlSugar.DbConvert; -namespace PMSWPF.Data.Entities; +namespace DMS.Data.Entities; /// /// 表示数据库中的MQTT配置实体。 diff --git a/Data/Entities/DbNlog.cs b/DMS/Data/Entities/DbNlog.cs similarity index 98% rename from Data/Entities/DbNlog.cs rename to DMS/Data/Entities/DbNlog.cs index 80f3d6f..5354595 100644 --- a/Data/Entities/DbNlog.cs +++ b/DMS/Data/Entities/DbNlog.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace PMSWPF.Data.Entities; +namespace DMS.Data.Entities; /// /// 表示数据库中的NLog日志实体。 diff --git a/Data/Entities/DbUser.cs b/DMS/Data/Entities/DbUser.cs similarity index 94% rename from Data/Entities/DbUser.cs rename to DMS/Data/Entities/DbUser.cs index d95edbc..e9cdbd4 100644 --- a/Data/Entities/DbUser.cs +++ b/DMS/Data/Entities/DbUser.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace PMSWPF.Data.Entities; +namespace DMS.Data.Entities; /// /// 表示数据库中的用户实体。 diff --git a/Data/Entities/DbVariable.cs b/DMS/Data/Entities/DbVariable.cs similarity index 98% rename from Data/Entities/DbVariable.cs rename to DMS/Data/Entities/DbVariable.cs index 111e7d0..d8fac42 100644 --- a/Data/Entities/DbVariable.cs +++ b/DMS/Data/Entities/DbVariable.cs @@ -1,8 +1,8 @@ -using PMSWPF.Enums; +using DMS.Enums; using SqlSugar; using SqlSugar.DbConvert; -namespace PMSWPF.Data.Entities; +namespace DMS.Data.Entities; /// /// 表示数据库中的变量数据实体。 diff --git a/Data/Entities/DbVariableHistory.cs b/DMS/Data/Entities/DbVariableHistory.cs similarity index 97% rename from Data/Entities/DbVariableHistory.cs rename to DMS/Data/Entities/DbVariableHistory.cs index de91ac1..b0cea18 100644 --- a/Data/Entities/DbVariableHistory.cs +++ b/DMS/Data/Entities/DbVariableHistory.cs @@ -1,7 +1,7 @@ using System; using SqlSugar; -namespace PMSWPF.Data.Entities; +namespace DMS.Data.Entities; /// /// 表示数据库中的变量数据历史实体。 diff --git a/Data/Entities/DbVariableMqtt.cs b/DMS/Data/Entities/DbVariableMqtt.cs similarity index 97% rename from Data/Entities/DbVariableMqtt.cs rename to DMS/Data/Entities/DbVariableMqtt.cs index 5536dda..f862751 100644 --- a/Data/Entities/DbVariableMqtt.cs +++ b/DMS/Data/Entities/DbVariableMqtt.cs @@ -1,7 +1,7 @@ using System; using SqlSugar; -namespace PMSWPF.Data.Entities; +namespace DMS.Data.Entities; /// /// 表示变量数据与MQTT服务器之间的关联实体,包含MQTT别名。 diff --git a/Data/Entities/DbVariableTable.cs b/DMS/Data/Entities/DbVariableTable.cs similarity index 96% rename from Data/Entities/DbVariableTable.cs rename to DMS/Data/Entities/DbVariableTable.cs index 8aeb455..91ff197 100644 --- a/Data/Entities/DbVariableTable.cs +++ b/DMS/Data/Entities/DbVariableTable.cs @@ -1,8 +1,8 @@ -using PMSWPF.Enums; +using DMS.Enums; using SqlSugar; using SqlSugar.DbConvert; -namespace PMSWPF.Data.Entities; +namespace DMS.Data.Entities; /// /// 表示数据库中的变量表实体。 diff --git a/Data/Repositories/BaseRepositories.cs b/DMS/Data/Repositories/BaseRepositories.cs similarity index 100% rename from Data/Repositories/BaseRepositories.cs rename to DMS/Data/Repositories/BaseRepositories.cs diff --git a/Data/Repositories/DeviceRepository.cs b/DMS/Data/Repositories/DeviceRepository.cs similarity index 98% rename from Data/Repositories/DeviceRepository.cs rename to DMS/Data/Repositories/DeviceRepository.cs index 43ad920..64d73e1 100644 --- a/Data/Repositories/DeviceRepository.cs +++ b/DMS/Data/Repositories/DeviceRepository.cs @@ -1,14 +1,14 @@ using System.Diagnostics; using AutoMapper; +using DMS.Data.Entities; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; using iNKORE.UI.WPF.Modern.Common.IconKeys; -using PMSWPF.Data.Entities; -using PMSWPF.Enums; -using PMSWPF.Extensions; -using PMSWPF.Helper; -using PMSWPF.Models; +using DMS.Extensions; using SqlSugar; -namespace PMSWPF.Data.Repositories; +namespace DMS.Data.Repositories; public class DeviceRepository { diff --git a/Data/Repositories/MenuRepository.cs b/DMS/Data/Repositories/MenuRepository.cs similarity index 97% rename from Data/Repositories/MenuRepository.cs rename to DMS/Data/Repositories/MenuRepository.cs index 099306d..5da3020 100644 --- a/Data/Repositories/MenuRepository.cs +++ b/DMS/Data/Repositories/MenuRepository.cs @@ -1,16 +1,14 @@ using System.Diagnostics; using iNKORE.UI.WPF.Modern.Common.IconKeys; -using PMSWPF.Data.Entities; -using PMSWPF.Enums; -using PMSWPF.Extensions; -using PMSWPF.Helper; -using PMSWPF.Models; +using DMS.Extensions; using SqlSugar; using AutoMapper; +using DMS.Data.Entities; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; -using PMSWPF.Helper; - -namespace PMSWPF.Data.Repositories; +namespace DMS.Data.Repositories; public class MenuRepository { diff --git a/Data/Repositories/MqttRepository.cs b/DMS/Data/Repositories/MqttRepository.cs similarity index 97% rename from Data/Repositories/MqttRepository.cs rename to DMS/Data/Repositories/MqttRepository.cs index 876d5d9..84a1d51 100644 --- a/Data/Repositories/MqttRepository.cs +++ b/DMS/Data/Repositories/MqttRepository.cs @@ -1,12 +1,12 @@ using System.Diagnostics; using AutoMapper; +using DMS.Data.Entities; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; using iNKORE.UI.WPF.Modern.Common.IconKeys; -using PMSWPF.Data.Entities; -using PMSWPF.Enums; -using PMSWPF.Helper; -using PMSWPF.Models; -namespace PMSWPF.Data.Repositories; +namespace DMS.Data.Repositories; /// /// Mqtt仓储类,用于操作DbMqtt实体 diff --git a/Data/Repositories/UserRepository.cs b/DMS/Data/Repositories/UserRepository.cs similarity index 97% rename from Data/Repositories/UserRepository.cs rename to DMS/Data/Repositories/UserRepository.cs index 15fc79d..7c7748d 100644 --- a/Data/Repositories/UserRepository.cs +++ b/DMS/Data/Repositories/UserRepository.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; -using PMSWPF.Data.Entities; -using PMSWPF.Helper; +using DMS.Data.Entities; +using DMS.Helper; -namespace PMSWPF.Data.Repositories; +namespace DMS.Data.Repositories; /// /// 用户仓储类,用于操作DbUser实体 diff --git a/Data/Repositories/VarDataRepository.cs b/DMS/Data/Repositories/VarDataRepository.cs similarity index 99% rename from Data/Repositories/VarDataRepository.cs rename to DMS/Data/Repositories/VarDataRepository.cs index 84fb7c3..470af20 100644 --- a/Data/Repositories/VarDataRepository.cs +++ b/DMS/Data/Repositories/VarDataRepository.cs @@ -1,15 +1,15 @@ using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; -using PMSWPF.Data.Entities; -using PMSWPF.Extensions; -using PMSWPF.Helper; -using PMSWPF.Models; +using DMS.Extensions; using SqlSugar; using AutoMapper; using Dm.util; +using DMS.Data.Entities; +using DMS.Helper; +using DMS.Models; -namespace PMSWPF.Data.Repositories; +namespace DMS.Data.Repositories; /// /// VariableData仓储类,用于操作DbVariableData实体 diff --git a/Data/Repositories/VarTableRepository.cs b/DMS/Data/Repositories/VarTableRepository.cs similarity index 96% rename from Data/Repositories/VarTableRepository.cs rename to DMS/Data/Repositories/VarTableRepository.cs index c00d71c..e9b404a 100644 --- a/Data/Repositories/VarTableRepository.cs +++ b/DMS/Data/Repositories/VarTableRepository.cs @@ -1,14 +1,14 @@ using iNKORE.UI.WPF.Modern.Common.IconKeys; -using PMSWPF.Data.Entities; -using PMSWPF.Enums; -using PMSWPF.Extensions; -using PMSWPF.Helper; -using PMSWPF.Models; +using DMS.Enums; +using DMS.Extensions; using SqlSugar; using System.Diagnostics; using AutoMapper; +using DMS.Data.Entities; +using DMS.Helper; +using DMS.Models; -namespace PMSWPF.Data.Repositories; +namespace DMS.Data.Repositories; public class VarTableRepository { diff --git a/Data/Repositories/VariableMqttAliasRepository.cs b/DMS/Data/Repositories/VariableMqttAliasRepository.cs similarity index 98% rename from Data/Repositories/VariableMqttAliasRepository.cs rename to DMS/Data/Repositories/VariableMqttAliasRepository.cs index f1a5325..3070de6 100644 --- a/Data/Repositories/VariableMqttAliasRepository.cs +++ b/DMS/Data/Repositories/VariableMqttAliasRepository.cs @@ -1,9 +1,9 @@ -using PMSWPF.Data.Entities; using SqlSugar; using System.Collections.Generic; using System.Threading.Tasks; +using DMS.Data.Entities; -namespace PMSWPF.Data.Repositories; +namespace DMS.Data.Repositories; /// /// 变量与MQTT服务器别名关联的数据仓库。 diff --git a/Enums/Brand.cs b/DMS/Enums/Brand.cs similarity index 89% rename from Enums/Brand.cs rename to DMS/Enums/Brand.cs index 335b7b9..3cba679 100644 --- a/Enums/Brand.cs +++ b/DMS/Enums/Brand.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.Enums; +namespace DMS.Enums; /// /// PLC品牌 diff --git a/Enums/DeviceType.cs b/DMS/Enums/DeviceType.cs similarity index 85% rename from Enums/DeviceType.cs rename to DMS/Enums/DeviceType.cs index a140f11..587fc9d 100644 --- a/Enums/DeviceType.cs +++ b/DMS/Enums/DeviceType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace PMSWPF.Enums; +namespace DMS.Enums; public enum DeviceType { diff --git a/Enums/LoadTypes.cs b/DMS/Enums/LoadTypes.cs similarity index 71% rename from Enums/LoadTypes.cs rename to DMS/Enums/LoadTypes.cs index 479b264..d363c7d 100644 --- a/Enums/LoadTypes.cs +++ b/DMS/Enums/LoadTypes.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.Enums; +namespace DMS.Enums; public enum LoadTypes { diff --git a/Enums/MenuType.cs b/DMS/Enums/MenuType.cs similarity index 81% rename from Enums/MenuType.cs rename to DMS/Enums/MenuType.cs index c939cee..3185e4e 100644 --- a/Enums/MenuType.cs +++ b/DMS/Enums/MenuType.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.Enums; +namespace DMS.Enums; public enum MenuType { diff --git a/Enums/MqttPlatform.cs b/DMS/Enums/MqttPlatform.cs similarity index 85% rename from Enums/MqttPlatform.cs rename to DMS/Enums/MqttPlatform.cs index 96e9532..664001d 100644 --- a/Enums/MqttPlatform.cs +++ b/DMS/Enums/MqttPlatform.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace PMSWPF.Enums; +namespace DMS.Enums; public enum MqttPlatform { diff --git a/Enums/NotificationType.cs b/DMS/Enums/NotificationType.cs similarity index 80% rename from Enums/NotificationType.cs rename to DMS/Enums/NotificationType.cs index 80cb9a5..5b46ff8 100644 --- a/Enums/NotificationType.cs +++ b/DMS/Enums/NotificationType.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.Enums; +namespace DMS.Enums; public enum NotificationType { diff --git a/Enums/OpcUaUpdateType.cs b/DMS/Enums/OpcUaUpdateType.cs similarity index 87% rename from Enums/OpcUaUpdateType.cs rename to DMS/Enums/OpcUaUpdateType.cs index 2adab26..0340ec7 100644 --- a/Enums/OpcUaUpdateType.cs +++ b/DMS/Enums/OpcUaUpdateType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace PMSWPF.Enums; +namespace DMS.Enums; public enum OpcUaUpdateType { diff --git a/Enums/PollLevelType.cs b/DMS/Enums/PollLevelType.cs similarity index 97% rename from Enums/PollLevelType.cs rename to DMS/Enums/PollLevelType.cs index 2334b22..79afbd2 100644 --- a/Enums/PollLevelType.cs +++ b/DMS/Enums/PollLevelType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace PMSWPF.Enums +namespace DMS.Enums { public enum PollLevelType { diff --git a/Enums/ProtocolType.cs b/DMS/Enums/ProtocolType.cs similarity index 90% rename from Enums/ProtocolType.cs rename to DMS/Enums/ProtocolType.cs index 5ce676e..5d322a8 100644 --- a/Enums/ProtocolType.cs +++ b/DMS/Enums/ProtocolType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace PMSWPF.Enums; +namespace DMS.Enums; public enum ProtocolType { diff --git a/Enums/SignalType.cs b/DMS/Enums/SignalType.cs similarity index 95% rename from Enums/SignalType.cs rename to DMS/Enums/SignalType.cs index c18bd58..7761507 100644 --- a/Enums/SignalType.cs +++ b/DMS/Enums/SignalType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace PMSWPF.Enums; +namespace DMS.Enums; public enum SignalType { diff --git a/Exceptions/DbExistException.cs b/DMS/Exceptions/DbExistException.cs similarity index 89% rename from Exceptions/DbExistException.cs rename to DMS/Exceptions/DbExistException.cs index 0680d77..9296baf 100644 --- a/Exceptions/DbExistException.cs +++ b/DMS/Exceptions/DbExistException.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.Excptions; +namespace DMS.Excptions; public class DbExistException : Exception { diff --git a/Extensions/BindingProxy.cs b/DMS/Extensions/BindingProxy.cs similarity index 95% rename from Extensions/BindingProxy.cs rename to DMS/Extensions/BindingProxy.cs index d394fc1..822a19f 100644 --- a/Extensions/BindingProxy.cs +++ b/DMS/Extensions/BindingProxy.cs @@ -1,6 +1,6 @@ using System.Windows; -namespace PMSWPF.Extensions +namespace DMS.Extensions { public class BindingProxy : Freezable { diff --git a/Extensions/EnumBindingSourceExtension.cs b/DMS/Extensions/EnumBindingSourceExtension.cs similarity index 97% rename from Extensions/EnumBindingSourceExtension.cs rename to DMS/Extensions/EnumBindingSourceExtension.cs index 4323603..dee8710 100644 --- a/Extensions/EnumBindingSourceExtension.cs +++ b/DMS/Extensions/EnumBindingSourceExtension.cs @@ -1,6 +1,6 @@ using System.Windows.Markup; -namespace PMSWPF.Extensions; +namespace DMS.Extensions; internal class EnumBindingSourceExtension : MarkupExtension { diff --git a/Extensions/ObjectExtensions.cs b/DMS/Extensions/ObjectExtensions.cs similarity index 99% rename from Extensions/ObjectExtensions.cs rename to DMS/Extensions/ObjectExtensions.cs index e07e618..bd41f21 100644 --- a/Extensions/ObjectExtensions.cs +++ b/DMS/Extensions/ObjectExtensions.cs @@ -1,10 +1,10 @@ using System.Collections; using System.Reflection; -using PMSWPF.Models; -using PMSWPF.Data.Entities; -using PMSWPF.Helper; +using DMS.Data.Entities; +using DMS.Models; +using DMS.Helper; -namespace PMSWPF.Extensions; +namespace DMS.Extensions; public static class ObjectExtensions { diff --git a/Extensions/TaskExtensions.cs b/DMS/Extensions/TaskExtensions.cs similarity index 98% rename from Extensions/TaskExtensions.cs rename to DMS/Extensions/TaskExtensions.cs index 54f6e28..60790df 100644 --- a/Extensions/TaskExtensions.cs +++ b/DMS/Extensions/TaskExtensions.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.Extensions; +namespace DMS.Extensions; /// /// 任务扩展类,提供异步任务的扩展方法。 diff --git a/Helper/DataServicesHelper.cs b/DMS/Helper/DataServicesHelper.cs similarity index 97% rename from Helper/DataServicesHelper.cs rename to DMS/Helper/DataServicesHelper.cs index 139e459..eb8f7d8 100644 --- a/Helper/DataServicesHelper.cs +++ b/DMS/Helper/DataServicesHelper.cs @@ -1,9 +1,9 @@ +using DMS.Enums; +using DMS.Models; +using DMS.ViewModels; using Microsoft.Extensions.DependencyInjection; -using PMSWPF.Enums; -using PMSWPF.Models; -using PMSWPF.ViewModels; -namespace PMSWPF.Helper; +namespace DMS.Helper; public class DataServicesHelper { diff --git a/Helper/ExcelHelper.cs b/DMS/Helper/ExcelHelper.cs similarity index 99% rename from Helper/ExcelHelper.cs rename to DMS/Helper/ExcelHelper.cs index 66c6f3a..9ab164e 100644 --- a/Helper/ExcelHelper.cs +++ b/DMS/Helper/ExcelHelper.cs @@ -5,12 +5,12 @@ using System.Data; using System.IO; using System.Linq; using System.Reflection; +using DMS.Enums; +using DMS.Models; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; -using PMSWPF.Enums; -using PMSWPF.Models; -namespace PMSWPF.Helper +namespace DMS.Helper { /// /// Excel 操作帮助类 diff --git a/Helper/MenuHelper.cs b/DMS/Helper/MenuHelper.cs similarity index 89% rename from Helper/MenuHelper.cs rename to DMS/Helper/MenuHelper.cs index 0947d45..c52c4f9 100644 --- a/Helper/MenuHelper.cs +++ b/DMS/Helper/MenuHelper.cs @@ -1,6 +1,6 @@ -using PMSWPF.Models; +using DMS.Models; -namespace PMSWPF.Helper; +namespace DMS.Helper; public class MenuHelper { diff --git a/Helper/MessageHelper.cs b/DMS/Helper/MessageHelper.cs similarity index 89% rename from Helper/MessageHelper.cs rename to DMS/Helper/MessageHelper.cs index 8017083..eaa2e60 100644 --- a/Helper/MessageHelper.cs +++ b/DMS/Helper/MessageHelper.cs @@ -1,9 +1,9 @@ using CommunityToolkit.Mvvm.Messaging; -using PMSWPF.Enums; -using PMSWPF.Message; -using PMSWPF.ViewModels; +using DMS.Enums; +using DMS.Message; +using DMS.ViewModels; -namespace PMSWPF.Helper; +namespace DMS.Helper; public class MessageHelper { diff --git a/Helper/NlogHelper.cs b/DMS/Helper/NlogHelper.cs similarity index 99% rename from Helper/NlogHelper.cs rename to DMS/Helper/NlogHelper.cs index 8b8437f..1318335 100644 --- a/Helper/NlogHelper.cs +++ b/DMS/Helper/NlogHelper.cs @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; using System.Threading; using NLog; -namespace PMSWPF.Helper; +namespace DMS.Helper; /// /// NLog 日志帮助类,提供简化的日志记录方法,并自动捕获调用者信息。 diff --git a/Helper/NotificationHelper.cs b/DMS/Helper/NotificationHelper.cs similarity index 99% rename from Helper/NotificationHelper.cs rename to DMS/Helper/NotificationHelper.cs index 6d1ddd1..05608c2 100644 --- a/Helper/NotificationHelper.cs +++ b/DMS/Helper/NotificationHelper.cs @@ -4,10 +4,10 @@ using System.Collections.Concurrent; using System.Runtime.CompilerServices; using System.Threading; using CommunityToolkit.Mvvm.Messaging; -using PMSWPF.Enums; -using PMSWPF.Message; +using DMS.Enums; +using DMS.Message; -namespace PMSWPF.Helper; +namespace DMS.Helper; /// /// 通知帮助类,用于显示各种类型的通知消息,并集成日志记录功能。 diff --git a/Helper/ServiceHelper.cs b/DMS/Helper/ServiceHelper.cs similarity index 99% rename from Helper/ServiceHelper.cs rename to DMS/Helper/ServiceHelper.cs index f5acbe5..fc2aedb 100644 --- a/Helper/ServiceHelper.cs +++ b/DMS/Helper/ServiceHelper.cs @@ -1,9 +1,9 @@ -using Opc.Ua; +using DMS.Enums; +using Opc.Ua; using Opc.Ua.Client; using Opc.Ua.Configuration; -using PMSWPF.Enums; -namespace PMSWPF.Helper; +namespace DMS.Helper; public static class ServiceHelper { @@ -152,7 +152,7 @@ public static class ServiceHelper config, new ConfiguredEndpoint(null, selectedEndpoint, EndpointConfiguration.Create(config)), false, - "PMSWPF OPC UA Session", + "DMS OPC UA Session", 60000, new UserIdentity(new AnonymousIdentityToken()), null,stoppingToken); diff --git a/Helper/SiemensHelper.cs b/DMS/Helper/SiemensHelper.cs similarity index 98% rename from Helper/SiemensHelper.cs rename to DMS/Helper/SiemensHelper.cs index 333e44b..86ee237 100644 --- a/Helper/SiemensHelper.cs +++ b/DMS/Helper/SiemensHelper.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.Helper; +namespace DMS.Helper; /// /// 西门子帮助类 diff --git a/Helper/ThemeHelper.cs b/DMS/Helper/ThemeHelper.cs similarity index 98% rename from Helper/ThemeHelper.cs rename to DMS/Helper/ThemeHelper.cs index f5dccc3..ba88712 100644 --- a/Helper/ThemeHelper.cs +++ b/DMS/Helper/ThemeHelper.cs @@ -1,11 +1,11 @@ using System; using System.Linq; using System.Windows; +using DMS.Config; using iNKORE.UI.WPF.Modern; using Microsoft.Win32; -using PMSWPF.Config; -namespace PMSWPF.Helper; +namespace DMS.Helper; public static class ThemeHelper { diff --git a/LICENSE.txt b/DMS/LICENSE.txt similarity index 100% rename from LICENSE.txt rename to DMS/LICENSE.txt diff --git a/Message/LoadMessage.cs b/DMS/Message/LoadMessage.cs similarity index 84% rename from Message/LoadMessage.cs rename to DMS/Message/LoadMessage.cs index 72ac1d8..75c1ef5 100644 --- a/Message/LoadMessage.cs +++ b/DMS/Message/LoadMessage.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.Messaging.Messages; -using PMSWPF.Enums; +using DMS.Enums; -namespace PMSWPF.Message; +namespace DMS.Message; public class LoadMessage:ValueChangedMessage { diff --git a/Message/MyMessage.cs b/DMS/Message/MyMessage.cs similarity index 88% rename from Message/MyMessage.cs rename to DMS/Message/MyMessage.cs index a49d562..882b35c 100644 --- a/Message/MyMessage.cs +++ b/DMS/Message/MyMessage.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.Messaging.Messages; -namespace PMSWPF.Message; +namespace DMS.Message; public class MyMessage : ValueChangedMessage { diff --git a/Message/NavgatorMessage.cs b/DMS/Message/NavgatorMessage.cs similarity index 84% rename from Message/NavgatorMessage.cs rename to DMS/Message/NavgatorMessage.cs index 4d1215c..dff4b1b 100644 --- a/Message/NavgatorMessage.cs +++ b/DMS/Message/NavgatorMessage.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.Messaging.Messages; -using PMSWPF.ViewModels; +using DMS.ViewModels; -namespace PMSWPF.Message; +namespace DMS.Message; public class NavgatorMessage : ValueChangedMessage { diff --git a/Message/NotificationMessage.cs b/DMS/Message/NotificationMessage.cs similarity index 89% rename from Message/NotificationMessage.cs rename to DMS/Message/NotificationMessage.cs index 0d8ac65..184898f 100644 --- a/Message/NotificationMessage.cs +++ b/DMS/Message/NotificationMessage.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.Messaging.Messages; -using PMSWPF.Enums; +using DMS.Enums; -namespace PMSWPF.Message; +namespace DMS.Message; public class NotificationMessage : ValueChangedMessage { diff --git a/Message/ReqMessage.cs b/DMS/Message/ReqMessage.cs similarity index 88% rename from Message/ReqMessage.cs rename to DMS/Message/ReqMessage.cs index 47a8bbc..6a4c433 100644 --- a/Message/ReqMessage.cs +++ b/DMS/Message/ReqMessage.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.Messaging.Messages; -namespace PMSWPF.Message; +namespace DMS.Message; public class ReqMessage : RequestMessage { diff --git a/Message/UpdateMenuMessage.cs b/DMS/Message/UpdateMenuMessage.cs similarity index 87% rename from Message/UpdateMenuMessage.cs rename to DMS/Message/UpdateMenuMessage.cs index 34c35cf..b761ef3 100644 --- a/Message/UpdateMenuMessage.cs +++ b/DMS/Message/UpdateMenuMessage.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.Messaging.Messages; -namespace PMSWPF.Message; +namespace DMS.Message; public class UpdateMenuMessage:ValueChangedMessage { diff --git a/Models/Device.cs b/DMS/Models/Device.cs similarity index 98% rename from Models/Device.cs rename to DMS/Models/Device.cs index ed7d4ba..1faf6bc 100644 --- a/Models/Device.cs +++ b/DMS/Models/Device.cs @@ -1,11 +1,11 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Enums; +using DMS.Enums; using SqlSugar; using SqlSugar.DbConvert; using S7.Net; // AddAsync this using directive -namespace PMSWPF.Models; +namespace DMS.Models; /// /// 表示设备信息。 diff --git a/Models/MenuBean.cs b/DMS/Models/MenuBean.cs similarity index 94% rename from Models/MenuBean.cs rename to DMS/Models/MenuBean.cs index ff3dad7..638722c 100644 --- a/Models/MenuBean.cs +++ b/DMS/Models/MenuBean.cs @@ -1,8 +1,8 @@ using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Enums; -using PMSWPF.ViewModels; +using DMS.Enums; +using DMS.ViewModels; -namespace PMSWPF.Models; +namespace DMS.Models; /// /// 表示菜单项。 diff --git a/Models/Mqtt.cs b/DMS/Models/Mqtt.cs similarity index 98% rename from Models/Mqtt.cs rename to DMS/Models/Mqtt.cs index c5f44c8..b575434 100644 --- a/Models/Mqtt.cs +++ b/DMS/Models/Mqtt.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Enums; +using DMS.Enums; -namespace PMSWPF.Models; +namespace DMS.Models; /// /// 表示MQTT配置信息。 diff --git a/Models/Notification.cs b/DMS/Models/Notification.cs similarity index 89% rename from Models/Notification.cs rename to DMS/Models/Notification.cs index bd9ff4a..6fa6435 100644 --- a/Models/Notification.cs +++ b/DMS/Models/Notification.cs @@ -1,6 +1,6 @@ -using PMSWPF.Enums; +using DMS.Enums; -namespace PMSWPF.Models; +namespace DMS.Models; /// /// 表示通知信息。 diff --git a/Models/OpcUaNode.cs b/DMS/Models/OpcUaNode.cs similarity index 98% rename from Models/OpcUaNode.cs rename to DMS/Models/OpcUaNode.cs index 449dc6d..c4605b8 100644 --- a/Models/OpcUaNode.cs +++ b/DMS/Models/OpcUaNode.cs @@ -2,7 +2,7 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; using Opc.Ua; -namespace PMSWPF.Models; +namespace DMS.Models; /// /// 表示OPC UA节点,用于构建节点树。 diff --git a/Models/User.cs b/DMS/Models/User.cs similarity index 90% rename from Models/User.cs rename to DMS/Models/User.cs index 1d46f5e..2b26fe4 100644 --- a/Models/User.cs +++ b/DMS/Models/User.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.Models; +namespace DMS.Models; public class User { diff --git a/Models/Variable.cs b/DMS/Models/Variable.cs similarity index 99% rename from Models/Variable.cs rename to DMS/Models/Variable.cs index c3441d3..500cd66 100644 --- a/Models/Variable.cs +++ b/DMS/Models/Variable.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Enums; +using DMS.Enums; -namespace PMSWPF.Models; +namespace DMS.Models; /// /// 表示变量数据信息。 diff --git a/Models/VariableContext.cs b/DMS/Models/VariableContext.cs similarity index 86% rename from Models/VariableContext.cs rename to DMS/Models/VariableContext.cs index a001945..f023cc5 100644 --- a/Models/VariableContext.cs +++ b/DMS/Models/VariableContext.cs @@ -1,6 +1,6 @@ -using PMSWPF.Models; +using DMS.Models; -namespace PMSWPF.Models +namespace DMS.Models { public class VariableContext { diff --git a/Models/VariableMqtt.cs b/DMS/Models/VariableMqtt.cs similarity index 96% rename from Models/VariableMqtt.cs rename to DMS/Models/VariableMqtt.cs index 066f1ab..f52840f 100644 --- a/Models/VariableMqtt.cs +++ b/DMS/Models/VariableMqtt.cs @@ -1,9 +1,9 @@ using System; using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Data.Entities; -using PMSWPF.Enums; +using DMS.Enums; +using DMS.Data.Entities; -namespace PMSWPF.Models; +namespace DMS.Models; /// /// 表示变量数据与MQTT服务器之间的关联模型,包含MQTT别名。 diff --git a/Models/VariableTable.cs b/DMS/Models/VariableTable.cs similarity index 96% rename from Models/VariableTable.cs rename to DMS/Models/VariableTable.cs index d3c060e..2461bf1 100644 --- a/Models/VariableTable.cs +++ b/DMS/Models/VariableTable.cs @@ -1,9 +1,9 @@ using System.Collections.ObjectModel; using System.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Enums; +using DMS.Enums; -namespace PMSWPF.Models; +namespace DMS.Models; /// /// 表示变量表信息。 diff --git a/NetIcon256X256.ico b/DMS/NetIcon256X256.ico similarity index 100% rename from NetIcon256X256.ico rename to DMS/NetIcon256X256.ico diff --git a/PMSWPF.OpcUaClient.Config.xml b/DMS/PMSWPF.OpcUaClient.Config.xml similarity index 89% rename from PMSWPF.OpcUaClient.Config.xml rename to DMS/PMSWPF.OpcUaClient.Config.xml index 093bf05..4c6679c 100644 --- a/PMSWPF.OpcUaClient.Config.xml +++ b/DMS/PMSWPF.OpcUaClient.Config.xml @@ -4,15 +4,15 @@ xmlns:ua="http://opcfoundation.org/UA/2008/02/Types.xsd" xmlns="http://opcfoundation.org/UA/SDK/Configuration.xsd" > - PMSWPF OPC UA Client - urn:{System.Net.Dns.GetHostName()}:PMSWPF.OpcUaClient + DMS OPC UA Client + urn:{System.Net.Dns.GetHostName()}:DMS.OpcUaClient 0 Directory %CommonApplicationData%/OPC Foundation/CertificateStores/MachineDefault - CN=PMSWPF OPC UA Client, O=OPC Foundation, OU=UA Applications + CN=DMS OPC UA Client, O=OPC Foundation, OU=UA Applications Directory diff --git a/Profiles/MappingProfile.cs b/DMS/Profiles/MappingProfile.cs similarity index 91% rename from Profiles/MappingProfile.cs rename to DMS/Profiles/MappingProfile.cs index 678ea48..96cf4d0 100644 --- a/Profiles/MappingProfile.cs +++ b/DMS/Profiles/MappingProfile.cs @@ -1,9 +1,9 @@ using System; using AutoMapper; -using PMSWPF.Data.Entities; -using PMSWPF.Models; +using DMS.Data.Entities; +using DMS.Models; -namespace PMSWPF.Profiles; +namespace DMS.Profiles; /// /// AutoMapper 的配置类,用于定义对象之间的映射规则。 diff --git a/Resources/DevicesItemTemplateDictionary.xaml b/DMS/Resources/DevicesItemTemplateDictionary.xaml similarity index 100% rename from Resources/DevicesItemTemplateDictionary.xaml rename to DMS/Resources/DevicesItemTemplateDictionary.xaml diff --git a/Services/DataProcessingService.cs b/DMS/Services/DataProcessingService.cs similarity index 98% rename from Services/DataProcessingService.cs rename to DMS/Services/DataProcessingService.cs index 81984b8..41d097f 100644 --- a/Services/DataProcessingService.cs +++ b/DMS/Services/DataProcessingService.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Channels; using System.Threading.Tasks; +using DMS.Helper; +using DMS.Models; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using PMSWPF.Helper; -using PMSWPF.Models; -namespace PMSWPF.Services; +namespace DMS.Services; /// /// 核心数据处理服务,作为后台服务运行。 diff --git a/Services/DataServices.cs b/DMS/Services/DataServices.cs similarity index 98% rename from Services/DataServices.cs rename to DMS/Services/DataServices.cs index e143a97..9a0a90a 100644 --- a/Services/DataServices.cs +++ b/DMS/Services/DataServices.cs @@ -2,17 +2,17 @@ using AutoMapper; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; +using DMS.Data.Repositories; +using DMS.Enums; +using DMS.Helper; +using DMS.Message; +using DMS.Models; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using PMSWPF.Data.Repositories; -using PMSWPF.Enums; -using PMSWPF.Helper; -using PMSWPF.Message; -using PMSWPF.Models; -using PMSWPF.ViewModels; +using DMS.ViewModels; using SqlSugar; -namespace PMSWPF.Services; +namespace DMS.Services; /// /// 数据服务类,负责从数据库加载和管理各种数据,并提供数据变更通知。 diff --git a/Services/DialogService.cs b/DMS/Services/DialogService.cs similarity index 97% rename from Services/DialogService.cs rename to DMS/Services/DialogService.cs index e6be0cb..f65d11a 100644 --- a/Services/DialogService.cs +++ b/DMS/Services/DialogService.cs @@ -1,13 +1,13 @@ -using HandyControl.Tools.Extension; +using DMS.Enums; +using DMS.Models; +using DMS.ViewModels.Dialogs; +using DMS.Views.Dialogs; +using HandyControl.Tools.Extension; using iNKORE.UI.WPF.Modern.Controls; using NPOI.SS.Formula.Functions; -using PMSWPF.Data.Repositories; -using PMSWPF.Enums; -using PMSWPF.Models; -using PMSWPF.ViewModels.Dialogs; -using PMSWPF.Views.Dialogs; +using DMS.Data.Repositories; -namespace PMSWPF.Services; +namespace DMS.Services; public class DialogService :IDialogService { diff --git a/Services/GrowlNotificationService.cs b/DMS/Services/GrowlNotificationService.cs similarity index 89% rename from Services/GrowlNotificationService.cs rename to DMS/Services/GrowlNotificationService.cs index a3eac47..51831f7 100644 --- a/Services/GrowlNotificationService.cs +++ b/DMS/Services/GrowlNotificationService.cs @@ -1,11 +1,12 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; +using DMS.Enums; +using DMS.Message; using HandyControl.Controls; -using PMSWPF.Enums; -using PMSWPF.Message; -using Notification = PMSWPF.Models.Notification; +using Models_Notification = DMS.Models.Notification; +using Notification = DMS.Models.Notification; -namespace PMSWPF.Services; +namespace DMS.Services; public class GrowlNotificationService : ObservableRecipient, IRecipient { @@ -19,7 +20,7 @@ public class GrowlNotificationService : ObservableRecipient, IRecipient /// 定义了数据处理服务的接口。 diff --git a/Services/IDialogService.cs b/DMS/Services/IDialogService.cs similarity index 92% rename from Services/IDialogService.cs rename to DMS/Services/IDialogService.cs index 5229abd..f2ebe55 100644 --- a/Services/IDialogService.cs +++ b/DMS/Services/IDialogService.cs @@ -1,8 +1,8 @@ -using iNKORE.UI.WPF.Modern.Controls; -using PMSWPF.Enums; -using PMSWPF.Models; +using DMS.Enums; +using DMS.Models; +using iNKORE.UI.WPF.Modern.Controls; -namespace PMSWPF.Services; +namespace DMS.Services; public interface IDialogService { diff --git a/Services/INotificationService.cs b/DMS/Services/INotificationService.cs similarity index 72% rename from Services/INotificationService.cs rename to DMS/Services/INotificationService.cs index a5a2857..c0b1baf 100644 --- a/Services/INotificationService.cs +++ b/DMS/Services/INotificationService.cs @@ -1,7 +1,7 @@ -using PMSWPF.Enums; -using PMSWPF.Models; +using DMS.Enums; +using DMS.Models; -namespace PMSWPF.Services; +namespace DMS.Services; public interface INotificationService { diff --git a/Services/IVariableProcessor.cs b/DMS/Services/IVariableProcessor.cs similarity index 90% rename from Services/IVariableProcessor.cs rename to DMS/Services/IVariableProcessor.cs index 7db17f3..c8aa8bf 100644 --- a/Services/IVariableProcessor.cs +++ b/DMS/Services/IVariableProcessor.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using PMSWPF.Models; +using DMS.Models; -namespace PMSWPF.Services; +namespace DMS.Services; /// /// 定义了变量数据处理器的通用接口。 diff --git a/Services/LogService.cs b/DMS/Services/LogService.cs similarity index 50% rename from Services/LogService.cs rename to DMS/Services/LogService.cs index 0f556a8..a4a0545 100644 --- a/Services/LogService.cs +++ b/DMS/Services/LogService.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.Services; +namespace DMS.Services; public class LogService { diff --git a/Services/MqttBackgroundService.cs b/DMS/Services/MqttBackgroundService.cs similarity index 99% rename from Services/MqttBackgroundService.cs rename to DMS/Services/MqttBackgroundService.cs index dd5e041..5a999f2 100644 --- a/Services/MqttBackgroundService.cs +++ b/DMS/Services/MqttBackgroundService.cs @@ -1,17 +1,17 @@ using System.Collections.Concurrent; using System.Text; using System.Threading.Channels; +using DMS.Data.Repositories; +using DMS.Helper; +using DMS.Models; using Microsoft.Extensions.Hosting; using MQTTnet; using MQTTnet.Client; using MQTTnet.Client.Connecting; using MQTTnet.Client.Disconnecting; using MQTTnet.Client.Options; -using PMSWPF.Data.Repositories; -using PMSWPF.Helper; -using PMSWPF.Models; -namespace PMSWPF.Services +namespace DMS.Services { /// /// MQTT后台服务,继承自BackgroundService,用于在后台管理MQTT连接和数据发布。 diff --git a/Services/NavgatorServices.cs b/DMS/Services/NavgatorServices.cs similarity index 93% rename from Services/NavgatorServices.cs rename to DMS/Services/NavgatorServices.cs index d1560b0..82c9f07 100644 --- a/Services/NavgatorServices.cs +++ b/DMS/Services/NavgatorServices.cs @@ -1,13 +1,13 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; +using DMS.Helper; +using DMS.Message; +using DMS.ViewModels; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using PMSWPF.Enums; -using PMSWPF.Helper; -using PMSWPF.Message; -using PMSWPF.ViewModels; +using DMS.Enums; -namespace PMSWPF.Services; +namespace DMS.Services; public partial class NavgatorServices : ObservableRecipient, IRecipient { diff --git a/Services/OpcUaBackgroundService.cs b/DMS/Services/OpcUaBackgroundService.cs similarity index 99% rename from Services/OpcUaBackgroundService.cs rename to DMS/Services/OpcUaBackgroundService.cs index 12c019d..a34dd1a 100644 --- a/Services/OpcUaBackgroundService.cs +++ b/DMS/Services/OpcUaBackgroundService.cs @@ -1,12 +1,12 @@ using System.Collections.Concurrent; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; using Microsoft.Extensions.Hosting; using Opc.Ua; using Opc.Ua.Client; -using PMSWPF.Enums; -using PMSWPF.Helper; -using PMSWPF.Models; -namespace PMSWPF.Services +namespace DMS.Services { public class OpcUaBackgroundService : BackgroundService { diff --git a/Services/Processors/CheckValueChangedProcessor.cs b/DMS/Services/Processors/CheckValueChangedProcessor.cs similarity index 92% rename from Services/Processors/CheckValueChangedProcessor.cs rename to DMS/Services/Processors/CheckValueChangedProcessor.cs index f9cf952..fdfc35f 100644 --- a/Services/Processors/CheckValueChangedProcessor.cs +++ b/DMS/Services/Processors/CheckValueChangedProcessor.cs @@ -1,7 +1,7 @@ -using PMSWPF.Helper; -using PMSWPF.Models; +using DMS.Helper; +using DMS.Models; -namespace PMSWPF.Services.Processors; +namespace DMS.Services.Processors; public class CheckValueChangedProcessor : IVariableProcessor { diff --git a/Services/Processors/HistoryProcessor.cs b/DMS/Services/Processors/HistoryProcessor.cs similarity index 94% rename from Services/Processors/HistoryProcessor.cs rename to DMS/Services/Processors/HistoryProcessor.cs index 18e69e5..5d25133 100644 --- a/Services/Processors/HistoryProcessor.cs +++ b/DMS/Services/Processors/HistoryProcessor.cs @@ -4,14 +4,14 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; +using DMS.Data; +using DMS.Data.Entities; +using DMS.Helper; +using DMS.Models; using Microsoft.Extensions.Logging; -using PMSWPF.Data; -using PMSWPF.Data.Entities; -using PMSWPF.Helper; -using PMSWPF.Models; -using PMSWPF.Services; +using DMS.Services; -namespace PMSWPF.Services.Processors; +namespace DMS.Services.Processors; public class HistoryProcessor : IVariableProcessor, IDisposable { diff --git a/Services/Processors/LoggingProcessor.cs b/DMS/Services/Processors/LoggingProcessor.cs similarity index 86% rename from Services/Processors/LoggingProcessor.cs rename to DMS/Services/Processors/LoggingProcessor.cs index 8747110..00ad152 100644 --- a/Services/Processors/LoggingProcessor.cs +++ b/DMS/Services/Processors/LoggingProcessor.cs @@ -1,9 +1,9 @@ using System.Threading.Tasks; +using DMS.Models; using Microsoft.Extensions.Logging; -using PMSWPF.Helper; -using PMSWPF.Models; +using DMS.Helper; -namespace PMSWPF.Services.Processors; +namespace DMS.Services.Processors; /// /// 一个简单的数据处理器实现,用于演示。 diff --git a/Services/Processors/MqttPublishProcessor.cs b/DMS/Services/Processors/MqttPublishProcessor.cs similarity index 95% rename from Services/Processors/MqttPublishProcessor.cs rename to DMS/Services/Processors/MqttPublishProcessor.cs index 01c22cc..9844a07 100644 --- a/Services/Processors/MqttPublishProcessor.cs +++ b/DMS/Services/Processors/MqttPublishProcessor.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using PMSWPF.Models; +using DMS.Models; -namespace PMSWPF.Services.Processors +namespace DMS.Services.Processors { /// /// 负责将变量数据发布到MQTT的处理器。 diff --git a/Services/Processors/UpdateDbVariableProcessor.cs b/DMS/Services/Processors/UpdateDbVariableProcessor.cs similarity index 94% rename from Services/Processors/UpdateDbVariableProcessor.cs rename to DMS/Services/Processors/UpdateDbVariableProcessor.cs index 443065f..8095bcd 100644 --- a/Services/Processors/UpdateDbVariableProcessor.cs +++ b/DMS/Services/Processors/UpdateDbVariableProcessor.cs @@ -1,8 +1,8 @@ using System.Threading.Tasks; -using PMSWPF.Models; -using PMSWPF.Helper; +using DMS.Helper; +using DMS.Models; -namespace PMSWPF.Services.Processors +namespace DMS.Services.Processors { public class UpdateDbVariableProcessor : IVariableProcessor { diff --git a/Services/S7BackgroundService.cs b/DMS/Services/S7BackgroundService.cs similarity index 99% rename from Services/S7BackgroundService.cs rename to DMS/Services/S7BackgroundService.cs index 1c453aa..31adeb3 100644 --- a/Services/S7BackgroundService.cs +++ b/DMS/Services/S7BackgroundService.cs @@ -1,13 +1,13 @@ using System.Collections.Concurrent; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; using Microsoft.Extensions.Hosting; -using PMSWPF.Enums; -using PMSWPF.Helper; -using PMSWPF.Models; using S7.Net; using S7.Net.Types; using DateTime = System.DateTime; -namespace PMSWPF.Services +namespace DMS.Services { /// /// S7后台服务,继承自BackgroundService,用于在后台周期性地轮询S7 PLC设备数据。 diff --git a/ValueConverts/EnumDescriptionConverter.cs b/DMS/ValueConverts/EnumDescriptionConverter.cs similarity index 96% rename from ValueConverts/EnumDescriptionConverter.cs rename to DMS/ValueConverts/EnumDescriptionConverter.cs index e09b9ed..92f72c5 100644 --- a/ValueConverts/EnumDescriptionConverter.cs +++ b/DMS/ValueConverts/EnumDescriptionConverter.cs @@ -3,7 +3,7 @@ using System.Globalization; using System.Windows; using System.Windows.Data; -namespace PMSWPF.ValueConverts; +namespace DMS.ValueConverts; public class EnumDescriptionConverter : IValueConverter { diff --git a/ValueConverts/NullableBooleanConverter.cs b/DMS/ValueConverts/NullableBooleanConverter.cs similarity index 96% rename from ValueConverts/NullableBooleanConverter.cs rename to DMS/ValueConverts/NullableBooleanConverter.cs index 55762ad..c9786fc 100644 --- a/ValueConverts/NullableBooleanConverter.cs +++ b/DMS/ValueConverts/NullableBooleanConverter.cs @@ -2,7 +2,7 @@ using System; using System.Globalization; using System.Windows.Data; -namespace PMSWPF.ValueConverts +namespace DMS.ValueConverts { public class NullableBooleanConverter : IValueConverter { diff --git a/ViewModels/DataTransformViewModel.cs b/DMS/ViewModels/DataTransformViewModel.cs similarity index 64% rename from ViewModels/DataTransformViewModel.cs rename to DMS/ViewModels/DataTransformViewModel.cs index 59d1b36..b3bfb6b 100644 --- a/ViewModels/DataTransformViewModel.cs +++ b/DMS/ViewModels/DataTransformViewModel.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.ViewModels; +namespace DMS.ViewModels; public class DataTransformViewModel : ViewModelBase { diff --git a/ViewModels/DeviceDetailViewModel.cs b/DMS/ViewModels/DeviceDetailViewModel.cs similarity index 98% rename from ViewModels/DeviceDetailViewModel.cs rename to DMS/ViewModels/DeviceDetailViewModel.cs index cc3728e..fcd74ed 100644 --- a/ViewModels/DeviceDetailViewModel.cs +++ b/DMS/ViewModels/DeviceDetailViewModel.cs @@ -1,15 +1,15 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; +using DMS.Data; +using DMS.Data.Repositories; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; +using DMS.Services; using Microsoft.Extensions.DependencyInjection; -using PMSWPF.Data; -using PMSWPF.Data.Repositories; -using PMSWPF.Enums; -using PMSWPF.Helper; -using PMSWPF.Models; -using PMSWPF.Services; -namespace PMSWPF.ViewModels; +namespace DMS.ViewModels; public partial class DeviceDetailViewModel : ViewModelBase { diff --git a/ViewModels/DevicesViewModel.cs b/DMS/ViewModels/DevicesViewModel.cs similarity index 97% rename from ViewModels/DevicesViewModel.cs rename to DMS/ViewModels/DevicesViewModel.cs index 1e9cb67..f06e249 100644 --- a/ViewModels/DevicesViewModel.cs +++ b/DMS/ViewModels/DevicesViewModel.cs @@ -1,16 +1,16 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; +using DMS.Data.Repositories; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; +using DMS.Services; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using PMSWPF.Data; -using PMSWPF.Data.Repositories; -using PMSWPF.Enums; -using PMSWPF.Helper; -using PMSWPF.Models; -using PMSWPF.Services; +using DMS.Data; -namespace PMSWPF.ViewModels; +namespace DMS.ViewModels; /// /// 设备管理视图模型,负责设备的增删改查操作。 diff --git a/ViewModels/Dialogs/ConfrimDialogViewModel.cs b/DMS/ViewModels/Dialogs/ConfrimDialogViewModel.cs similarity index 87% rename from ViewModels/Dialogs/ConfrimDialogViewModel.cs rename to DMS/ViewModels/Dialogs/ConfrimDialogViewModel.cs index 5f8d5b9..ac4760f 100644 --- a/ViewModels/Dialogs/ConfrimDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/ConfrimDialogViewModel.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.ComponentModel; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class ConfrimDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/DeviceDialogViewModel.cs b/DMS/ViewModels/Dialogs/DeviceDialogViewModel.cs similarity index 93% rename from ViewModels/Dialogs/DeviceDialogViewModel.cs rename to DMS/ViewModels/Dialogs/DeviceDialogViewModel.cs index 3bf45c2..c361cc5 100644 --- a/ViewModels/Dialogs/DeviceDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/DeviceDialogViewModel.cs @@ -1,9 +1,9 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using PMSWPF.Models; +using DMS.Models; using S7.Net; // AddAsync this using directive -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class DeviceDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/ImportExcelDialogViewModel.cs b/DMS/ViewModels/Dialogs/ImportExcelDialogViewModel.cs similarity index 89% rename from ViewModels/Dialogs/ImportExcelDialogViewModel.cs rename to DMS/ViewModels/Dialogs/ImportExcelDialogViewModel.cs index 27ee7a1..2e23fb5 100644 --- a/ViewModels/Dialogs/ImportExcelDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/ImportExcelDialogViewModel.cs @@ -1,9 +1,9 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Helper; -using PMSWPF.Models; +using DMS.Helper; +using DMS.Models; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class ImportExcelDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/ImportResultDialogViewModel.cs b/DMS/ViewModels/Dialogs/ImportResultDialogViewModel.cs similarity index 96% rename from ViewModels/Dialogs/ImportResultDialogViewModel.cs rename to DMS/ViewModels/Dialogs/ImportResultDialogViewModel.cs index 445a1a6..2490e21 100644 --- a/ViewModels/Dialogs/ImportResultDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/ImportResultDialogViewModel.cs @@ -1,9 +1,9 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using PMSWPF.Models; +using DMS.Models; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; /// /// ImportResultDialogViewModel 是用于显示变量导入结果的视图模型。 diff --git a/ViewModels/Dialogs/IsActiveDialogViewModel.cs b/DMS/ViewModels/Dialogs/IsActiveDialogViewModel.cs similarity index 91% rename from ViewModels/Dialogs/IsActiveDialogViewModel.cs rename to DMS/ViewModels/Dialogs/IsActiveDialogViewModel.cs index df99d59..6425a91 100644 --- a/ViewModels/Dialogs/IsActiveDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/IsActiveDialogViewModel.cs @@ -1,8 +1,8 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using PMSWPF.Enums; +using DMS.Enums; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class IsActiveDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs b/DMS/ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs similarity index 94% rename from ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs rename to DMS/ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs index c2aa9e4..0439e69 100644 --- a/ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/MqttAliasBatchEditDialogViewModel.cs @@ -1,11 +1,11 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using PMSWPF.Models; using System.Collections.ObjectModel; using System.Collections.Generic; using System.Linq; +using DMS.Models; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class MqttAliasBatchEditDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/MqttAliasDialogViewModel.cs b/DMS/ViewModels/Dialogs/MqttAliasDialogViewModel.cs similarity index 96% rename from ViewModels/Dialogs/MqttAliasDialogViewModel.cs rename to DMS/ViewModels/Dialogs/MqttAliasDialogViewModel.cs index 453ab06..f048d8d 100644 --- a/ViewModels/Dialogs/MqttAliasDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/MqttAliasDialogViewModel.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class MqttAliasDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/MqttDialogViewModel.cs b/DMS/ViewModels/Dialogs/MqttDialogViewModel.cs similarity index 88% rename from ViewModels/Dialogs/MqttDialogViewModel.cs rename to DMS/ViewModels/Dialogs/MqttDialogViewModel.cs index 4ab5369..ca772b0 100644 --- a/ViewModels/Dialogs/MqttDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/MqttDialogViewModel.cs @@ -1,8 +1,8 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using PMSWPF.Models; +using DMS.Models; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class MqttDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/MqttSelectionDialogViewModel.cs b/DMS/ViewModels/Dialogs/MqttSelectionDialogViewModel.cs similarity index 80% rename from ViewModels/Dialogs/MqttSelectionDialogViewModel.cs rename to DMS/ViewModels/Dialogs/MqttSelectionDialogViewModel.cs index cf8119c..1ca9d1a 100644 --- a/ViewModels/Dialogs/MqttSelectionDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/MqttSelectionDialogViewModel.cs @@ -1,11 +1,11 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Models; -using PMSWPF.Data.Repositories; +using DMS.Data.Repositories; using System.Threading.Tasks; -using PMSWPF.Services; +using DMS.Models; +using DMS.Services; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class MqttSelectionDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs b/DMS/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs similarity index 98% rename from ViewModels/Dialogs/OpcUaImportDialogViewModel.cs rename to DMS/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs index e7b35fe..7d204c1 100644 --- a/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/OpcUaImportDialogViewModel.cs @@ -3,14 +3,14 @@ using System.Linq; using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; using Opc.Ua; using Opc.Ua.Client; using Opc.Ua.Configuration; -using PMSWPF.Enums; -using PMSWPF.Helper; -using PMSWPF.Models; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class OpcUaImportDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs b/DMS/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs similarity index 87% rename from ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs rename to DMS/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs index 806ab73..104c7d5 100644 --- a/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/OpcUaUpdateTypeDialogViewModel.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Enums; +using DMS.Enums; -namespace PMSWPF.ViewModels.Dialogs +namespace DMS.ViewModels.Dialogs { public partial class OpcUaUpdateTypeDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/PollLevelDialogViewModel.cs b/DMS/ViewModels/Dialogs/PollLevelDialogViewModel.cs similarity index 91% rename from ViewModels/Dialogs/PollLevelDialogViewModel.cs rename to DMS/ViewModels/Dialogs/PollLevelDialogViewModel.cs index 9d29644..57532f6 100644 --- a/ViewModels/Dialogs/PollLevelDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/PollLevelDialogViewModel.cs @@ -2,9 +2,9 @@ using System; using System.Collections.Generic; using System.Linq; using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Enums; +using DMS.Enums; -namespace PMSWPF.ViewModels.Dialogs +namespace DMS.ViewModels.Dialogs { public partial class PollLevelDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/ProcessingDialogViewModel.cs b/DMS/ViewModels/Dialogs/ProcessingDialogViewModel.cs similarity index 85% rename from ViewModels/Dialogs/ProcessingDialogViewModel.cs rename to DMS/ViewModels/Dialogs/ProcessingDialogViewModel.cs index 19989a2..d6d0bf7 100644 --- a/ViewModels/Dialogs/ProcessingDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/ProcessingDialogViewModel.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.ComponentModel; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class ProcessingDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/VarDataDialogViewModel.cs b/DMS/ViewModels/Dialogs/VarDataDialogViewModel.cs similarity index 82% rename from ViewModels/Dialogs/VarDataDialogViewModel.cs rename to DMS/ViewModels/Dialogs/VarDataDialogViewModel.cs index 27cb8cd..874feb1 100644 --- a/ViewModels/Dialogs/VarDataDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/VarDataDialogViewModel.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Models; +using DMS.Models; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class VarDataDialogViewModel : ObservableObject { diff --git a/ViewModels/Dialogs/VarTableDialogViewModel.cs b/DMS/ViewModels/Dialogs/VarTableDialogViewModel.cs similarity index 83% rename from ViewModels/Dialogs/VarTableDialogViewModel.cs rename to DMS/ViewModels/Dialogs/VarTableDialogViewModel.cs index e59461f..4c32695 100644 --- a/ViewModels/Dialogs/VarTableDialogViewModel.cs +++ b/DMS/ViewModels/Dialogs/VarTableDialogViewModel.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.ComponentModel; -using PMSWPF.Models; +using DMS.Models; -namespace PMSWPF.ViewModels.Dialogs; +namespace DMS.ViewModels.Dialogs; public partial class VarTableDialogViewModel:ObservableObject { diff --git a/ViewModels/HomeViewModel.cs b/DMS/ViewModels/HomeViewModel.cs similarity index 60% rename from ViewModels/HomeViewModel.cs rename to DMS/ViewModels/HomeViewModel.cs index 94bb2ae..b9ddf31 100644 --- a/ViewModels/HomeViewModel.cs +++ b/DMS/ViewModels/HomeViewModel.cs @@ -1,4 +1,4 @@ -namespace PMSWPF.ViewModels; +namespace DMS.ViewModels; public class HomeViewModel : ViewModelBase { diff --git a/ViewModels/MainViewModel.cs b/DMS/ViewModels/MainViewModel.cs similarity index 97% rename from ViewModels/MainViewModel.cs rename to DMS/ViewModels/MainViewModel.cs index 77f835c..e7a977e 100644 --- a/ViewModels/MainViewModel.cs +++ b/DMS/ViewModels/MainViewModel.cs @@ -2,21 +2,21 @@ using System.Windows; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; +using DMS.Data; +using DMS.Data.Repositories; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; +using DMS.Services; +using DMS.Views; using iNKORE.UI.WPF.Modern.Common.IconKeys; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using PMSWPF.Data; -using PMSWPF.Data.Repositories; -using PMSWPF.Enums; -using PMSWPF.Helper; -using PMSWPF.Models; -using PMSWPF.Services; -using PMSWPF.Views; // AddAsync this using directive // AddAsync this using directive -namespace PMSWPF.ViewModels; +namespace DMS.ViewModels; /// /// 主视图模型,负责应用程序的主导航和数据管理。 diff --git a/ViewModels/MqttServerDetailViewModel.cs b/DMS/ViewModels/MqttServerDetailViewModel.cs similarity index 97% rename from ViewModels/MqttServerDetailViewModel.cs rename to DMS/ViewModels/MqttServerDetailViewModel.cs index 1b0b329..a03de4f 100644 --- a/ViewModels/MqttServerDetailViewModel.cs +++ b/DMS/ViewModels/MqttServerDetailViewModel.cs @@ -1,17 +1,17 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Microsoft.Extensions.Logging; -using PMSWPF.Models; -using PMSWPF.Services; -using PMSWPF.Helper; -using PMSWPF.Enums; +using DMS.Enums; using System.Collections.ObjectModel; using System.Linq; using System.Threading.Tasks; using System.Collections.Generic; -using PMSWPF.Data.Repositories; +using DMS.Data.Repositories; +using DMS.Helper; +using DMS.Models; +using DMS.Services; -namespace PMSWPF.ViewModels +namespace DMS.ViewModels { /// /// MQTT服务器详情视图模型。 diff --git a/ViewModels/MqttsViewModel.cs b/DMS/ViewModels/MqttsViewModel.cs similarity index 96% rename from ViewModels/MqttsViewModel.cs rename to DMS/ViewModels/MqttsViewModel.cs index 35519b3..a8c7774 100644 --- a/ViewModels/MqttsViewModel.cs +++ b/DMS/ViewModels/MqttsViewModel.cs @@ -1,16 +1,16 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; +using DMS.Data.Repositories; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; +using DMS.Services; using Microsoft.Extensions.Logging; -using PMSWPF.Data; -using PMSWPF.Data.Repositories; -using PMSWPF.Enums; -using PMSWPF.Helper; -using PMSWPF.Models; -using PMSWPF.Services; -using PMSWPF.Views; +using DMS.Data; +using DMS.Views; -namespace PMSWPF.ViewModels; +namespace DMS.ViewModels; public partial class MqttsViewModel : ViewModelBase { diff --git a/ViewModels/SettingViewModel.cs b/DMS/ViewModels/SettingViewModel.cs similarity index 97% rename from ViewModels/SettingViewModel.cs rename to DMS/ViewModels/SettingViewModel.cs index 326405b..41b8cd2 100644 --- a/ViewModels/SettingViewModel.cs +++ b/DMS/ViewModels/SettingViewModel.cs @@ -1,15 +1,15 @@ using CommunityToolkit.Mvvm.Input; -using PMSWPF.Config; -using PMSWPF.Data; -using PMSWPF.Helper; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using PMSWPF.Services; +using DMS.Config; +using DMS.Data; +using DMS.Helper; +using DMS.Services; -namespace PMSWPF.ViewModels; +namespace DMS.ViewModels; public partial class SettingViewModel : ViewModelBase { diff --git a/ViewModels/VariableTableViewModel.cs b/DMS/ViewModels/VariableTableViewModel.cs similarity index 99% rename from ViewModels/VariableTableViewModel.cs rename to DMS/ViewModels/VariableTableViewModel.cs index 9c7bab2..0d08b36 100644 --- a/ViewModels/VariableTableViewModel.cs +++ b/DMS/ViewModels/VariableTableViewModel.cs @@ -5,17 +5,17 @@ using System.Windows.Input; using AutoMapper; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; +using DMS.Data.Repositories; +using DMS.Enums; +using DMS.Helper; +using DMS.Models; +using DMS.Services; using iNKORE.UI.WPF.Modern.Controls; using Newtonsoft.Json; -using PMSWPF.Data.Repositories; -using PMSWPF.Enums; -using PMSWPF.Extensions; -using PMSWPF.Helper; -using PMSWPF.Models; -using PMSWPF.Services; +using DMS.Extensions; using SqlSugar; -namespace PMSWPF.ViewModels; +namespace DMS.ViewModels; /// /// VariableTableViewModel 是用于管理和显示变量表数据的视图模型。 @@ -23,7 +23,7 @@ namespace PMSWPF.ViewModels; /// /// 调用逻辑概述: /// 1. **实例化**: 当导航到 VariableTableView 时,通常会通过依赖注入框架(如 CommunityToolkit.Mvvm 的服务定位器或自定义工厂)实例化 VariableTableViewModel。 -/// 构造函数 负责初始化必要的服务和数据仓库。 +/// 构造函数 负责初始化必要的服务和数据仓库。 /// 2. **数据加载**: /// - 当视图加载完成时,框架会自动调用 方法。 /// - 此方法会根据传入的 对象初始化 集合,并设置协议类型相关的布尔属性。 diff --git a/ViewModels/ViewModelBase.cs b/DMS/ViewModels/ViewModelBase.cs similarity index 91% rename from ViewModels/ViewModelBase.cs rename to DMS/ViewModels/ViewModelBase.cs index e98e48a..55b2648 100644 --- a/ViewModels/ViewModelBase.cs +++ b/DMS/ViewModels/ViewModelBase.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.ComponentModel; -namespace PMSWPF.ViewModels; +namespace DMS.ViewModels; public abstract class ViewModelBase : ObservableObject { diff --git a/Views/DataTransformView.xaml b/DMS/Views/DataTransformView.xaml similarity index 90% rename from Views/DataTransformView.xaml rename to DMS/Views/DataTransformView.xaml index b2cc873..2e424e2 100644 --- a/Views/DataTransformView.xaml +++ b/DMS/Views/DataTransformView.xaml @@ -1,4 +1,4 @@ - /// ImportResultDialog.xaml 的交互逻辑 diff --git a/Views/Dialogs/IsActiveDialog.xaml b/DMS/Views/Dialogs/IsActiveDialog.xaml similarity index 89% rename from Views/Dialogs/IsActiveDialog.xaml rename to DMS/Views/Dialogs/IsActiveDialog.xaml index 14113bf..50ec92e 100644 --- a/Views/Dialogs/IsActiveDialog.xaml +++ b/DMS/Views/Dialogs/IsActiveDialog.xaml @@ -1,11 +1,11 @@ - /// OpcUaImportDialog.xaml 的交互逻辑 diff --git a/Views/Dialogs/OpcUaUpdateTypeDialog.xaml b/DMS/Views/Dialogs/OpcUaUpdateTypeDialog.xaml similarity index 78% rename from Views/Dialogs/OpcUaUpdateTypeDialog.xaml rename to DMS/Views/Dialogs/OpcUaUpdateTypeDialog.xaml index 2fc827e..37bc5f5 100644 --- a/Views/Dialogs/OpcUaUpdateTypeDialog.xaml +++ b/DMS/Views/Dialogs/OpcUaUpdateTypeDialog.xaml @@ -1,12 +1,12 @@ - /// MainView.xaml 的交互逻辑 diff --git a/Views/MqttServerDetailView.xaml b/DMS/Views/MqttServerDetailView.xaml similarity index 94% rename from Views/MqttServerDetailView.xaml rename to DMS/Views/MqttServerDetailView.xaml index 3fdc092..98d96e1 100644 --- a/Views/MqttServerDetailView.xaml +++ b/DMS/Views/MqttServerDetailView.xaml @@ -1,15 +1,15 @@ - diff --git a/Views/MqttServerDetailView.xaml.cs b/DMS/Views/MqttServerDetailView.xaml.cs similarity index 87% rename from Views/MqttServerDetailView.xaml.cs rename to DMS/Views/MqttServerDetailView.xaml.cs index a9533be..4b68640 100644 --- a/Views/MqttServerDetailView.xaml.cs +++ b/DMS/Views/MqttServerDetailView.xaml.cs @@ -1,8 +1,8 @@ using System.Windows.Controls; using Microsoft.Extensions.DependencyInjection; -using PMSWPF.ViewModels; +using DMS.ViewModels; -namespace PMSWPF.Views +namespace DMS.Views { /// /// MqttServerDetailView.xaml 的交互逻辑 diff --git a/Views/MqttsView.xaml b/DMS/Views/MqttsView.xaml similarity index 99% rename from Views/MqttsView.xaml rename to DMS/Views/MqttsView.xaml index 7dd606c..45e8840 100644 --- a/Views/MqttsView.xaml +++ b/DMS/Views/MqttsView.xaml @@ -1,11 +1,11 @@ -