完成编辑设备

This commit is contained in:
2025-07-29 20:02:09 +08:00
parent 61807bfc65
commit 3b5ecef895
8 changed files with 95 additions and 109 deletions

View File

@@ -65,7 +65,9 @@
<TextBlock Text="设备类型"
HorizontalAlignment="Left"
Style="{StaticResource TextBlockSubTitle}" />
<ComboBox SelectedItem="{Binding Device.DeviceType}"
<ComboBox
IsEnabled="{Binding IsAddMode}"
SelectedItem="{Binding Device.DeviceType}"
ItemsSource="{Binding Source={StaticResource deviceType} }">
<ComboBox.ItemTemplate>
<DataTemplate>
@@ -102,7 +104,9 @@
<TextBlock Text="设备通信协议"
HorizontalAlignment="Left"
Style="{StaticResource TextBlockSubTitle}" />
<ComboBox x:Name="ProtocolComboBox" SelectedItem="{Binding Device.Protocol}"
<ComboBox x:Name="ProtocolComboBox"
IsEnabled="{Binding IsAddMode}"
SelectedItem="{Binding Device.Protocol}"
ItemsSource="{Binding Source={StaticResource protocolType} }">
<ComboBox.ItemTemplate>
<DataTemplate>