From 8cd876c67de2df7f18632667ffae1df15b0a6e65 Mon Sep 17 00:00:00 2001 From: "David P.G" Date: Sun, 24 Aug 2025 12:25:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86=E7=9A=84=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/Items/VariableItemViewModel.cs | 4 +- DMS.WPF/Views/Dialogs/VariableDialog.xaml | 294 +++++++++++------- DMS.WPF/Views/Dialogs/VariableDialog.xaml.cs | 5 +- 3 files changed, 182 insertions(+), 121 deletions(-) diff --git a/DMS.WPF/ViewModels/Items/VariableItemViewModel.cs b/DMS.WPF/ViewModels/Items/VariableItemViewModel.cs index e356a17..bd666ef 100644 --- a/DMS.WPF/ViewModels/Items/VariableItemViewModel.cs +++ b/DMS.WPF/ViewModels/Items/VariableItemViewModel.cs @@ -66,14 +66,14 @@ public partial class VariableItemViewModel : ObservableObject /// 获取或设置变量的信号类型 (如:AI, DI, AO, DO)。 /// [ObservableProperty] - private SignalType _signalType ; + private SignalType _signalType =SignalType.OtherASignal; /// /// 获取或设置变量的轮询等级。 /// 用于决定数据采集的频率(如:高、中、低)。 /// [ObservableProperty] - private PollLevelType _pollLevel; + private PollLevelType _pollLevel=PollLevelType.ThirtySeconds; /// /// 获取或设置一个值,该值指示此变量是否被激活。 diff --git a/DMS.WPF/Views/Dialogs/VariableDialog.xaml b/DMS.WPF/Views/Dialogs/VariableDialog.xaml index ad5cebf..b4bf781 100644 --- a/DMS.WPF/Views/Dialogs/VariableDialog.xaml +++ b/DMS.WPF/Views/Dialogs/VariableDialog.xaml @@ -1,131 +1,193 @@ - - + + + + + - - - - - - + + + + + + + + + + + + + + + + + - - - - - + - - + - - + + + + + + + - - - - - - - - + + + + + + + - - + + + + + + + - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DMS.WPF/Views/Dialogs/VariableDialog.xaml.cs b/DMS.WPF/Views/Dialogs/VariableDialog.xaml.cs index 5c22c32..2630999 100644 --- a/DMS.WPF/Views/Dialogs/VariableDialog.xaml.cs +++ b/DMS.WPF/Views/Dialogs/VariableDialog.xaml.cs @@ -7,8 +7,8 @@ namespace DMS.WPF.Views.Dialogs; public partial class VariableDialog { - private const int ContentAreaMaxWidth = 1000; - private const int ContentAreaMaxHeight = 800; + private const int ContentAreaMaxWidth = 1200; + private const int ContentAreaMaxHeight = 900; public VariableDialog() { InitializeComponent(); @@ -17,7 +17,6 @@ public partial class VariableDialog private void OnOpened(ContentDialog sender, ContentDialogOpenedEventArgs args) { - //޸ĶԻݵȺ߶ var backgroundElementBorder = VisualTreeFinder.FindVisualChildByName(this, "BackgroundElement"); backgroundElementBorder.MaxWidth = ContentAreaMaxWidth; backgroundElementBorder.MaxWidth = ContentAreaMaxHeight;