From e3c2253f7b660df5945772ee09fc71bce9cff3fe Mon Sep 17 00:00:00 2001 From: "David P.G" Date: Sun, 27 Jul 2025 22:35:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B7=BB=E5=8A=A0=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=97=B6=E9=80=89=E6=8B=A9=E9=80=9A=E8=AE=AF=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=EF=BC=8C=E7=95=8C=E9=9D=A2=E4=B9=9F=E8=B7=9F=E7=9D=80?= =?UTF-8?q?=E8=B7=9F=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ValueConverts/EnumDescriptionConverter.cs | 2 +- .../ValueConverts/NullableBooleanConverter.cs | 3 +- .../ViewModels/Items/DeviceItemViewModel.cs | 5 +++ DMS.WPF/Views/Dialogs/ConfirmDialog.xaml | 1 - DMS.WPF/Views/Dialogs/DeviceDialog.xaml | 36 ++++++++++--------- DMS.WPF/Views/Dialogs/IsActiveDialog.xaml | 4 +-- DMS.WPF/Views/Dialogs/MqttDialog.xaml | 4 +-- DMS.WPF/Views/Dialogs/PollLevelDialog.xaml | 4 +-- DMS.WPF/Views/Dialogs/VarDataDialog.xaml | 4 +-- DMS.WPF/Views/Dialogs/VarTableDialog.xaml | 1 - DMS.WPF/Views/MqttServerDetailView.xaml | 4 +-- DMS.WPF/Views/VariableTableView.xaml | 4 +-- 12 files changed, 38 insertions(+), 34 deletions(-) diff --git a/DMS.WPF/ValueConverts/EnumDescriptionConverter.cs b/DMS.WPF/ValueConverts/EnumDescriptionConverter.cs index 92f72c5..71248bd 100644 --- a/DMS.WPF/ValueConverts/EnumDescriptionConverter.cs +++ b/DMS.WPF/ValueConverts/EnumDescriptionConverter.cs @@ -3,7 +3,7 @@ using System.Globalization; using System.Windows; using System.Windows.Data; -namespace DMS.ValueConverts; +namespace DMS.WPF.ValueConverts; public class EnumDescriptionConverter : IValueConverter { diff --git a/DMS.WPF/ValueConverts/NullableBooleanConverter.cs b/DMS.WPF/ValueConverts/NullableBooleanConverter.cs index c9786fc..680df23 100644 --- a/DMS.WPF/ValueConverts/NullableBooleanConverter.cs +++ b/DMS.WPF/ValueConverts/NullableBooleanConverter.cs @@ -1,8 +1,7 @@ -using System; using System.Globalization; using System.Windows.Data; -namespace DMS.ValueConverts +namespace DMS.WPF.ValueConverts { public class NullableBooleanConverter : IValueConverter { diff --git a/DMS.WPF/ViewModels/Items/DeviceItemViewModel.cs b/DMS.WPF/ViewModels/Items/DeviceItemViewModel.cs index 6078198..8a29df2 100644 --- a/DMS.WPF/ViewModels/Items/DeviceItemViewModel.cs +++ b/DMS.WPF/ViewModels/Items/DeviceItemViewModel.cs @@ -54,6 +54,11 @@ public partial class DeviceItemViewModel : ObservableObject [ObservableProperty] private string _status; + partial void OnProtocolChanged(ProtocolType oldValue, ProtocolType newValue) + { + + } + public ObservableCollection VariableTables { get; set; } = new(); public DeviceItemViewModel(DeviceDto dto) diff --git a/DMS.WPF/Views/Dialogs/ConfirmDialog.xaml b/DMS.WPF/Views/Dialogs/ConfirmDialog.xaml index b807cc5..56344cb 100644 --- a/DMS.WPF/Views/Dialogs/ConfirmDialog.xaml +++ b/DMS.WPF/Views/Dialogs/ConfirmDialog.xaml @@ -6,7 +6,6 @@ xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" xmlns:vmd="clr-namespace:DMS.WPF.ViewModels.Dialogs" - xmlns:vc="clr-namespace:DMS.ValueConverts" xmlns:ex="clr-namespace:DMS.Extensions" xmlns:en="clr-namespace:DMS.Core.Enums" Title="{Binding Title}" diff --git a/DMS.WPF/Views/Dialogs/DeviceDialog.xaml b/DMS.WPF/Views/Dialogs/DeviceDialog.xaml index fb46847..58f0c26 100644 --- a/DMS.WPF/Views/Dialogs/DeviceDialog.xaml +++ b/DMS.WPF/Views/Dialogs/DeviceDialog.xaml @@ -6,10 +6,10 @@ xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" xmlns:vmd="clr-namespace:DMS.WPF.ViewModels.Dialogs" - xmlns:vc="clr-namespace:DMS.ValueConverts" xmlns:ex="clr-namespace:DMS.Extensions" xmlns:enums="clr-namespace:DMS.Core.Enums;assembly=DMS.Core" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" + xmlns:vc="clr-namespace:DMS.WPF.ValueConverts" Title="{Binding Title}" CloseButtonText="取消" DefaultButton="Primary" @@ -34,6 +34,7 @@ + @@ -61,17 +62,17 @@ Text="{Binding Device.IpAddress, UpdateSourceTrigger=PropertyChanged}" /> - - - - - - - - - - - + + + + + + + + - @@ -109,14 +110,15 @@ - + - +