refactor: 重构设置窗口逻辑
This commit is contained in:
@@ -16,7 +16,8 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0">监听地址</Label>
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding ListenAddress}" />
|
||||
Text="{Binding Item.ListenAddress}"
|
||||
IsEnabled="False" />
|
||||
</Grid>
|
||||
<Grid Margin="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -24,9 +25,10 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0">监听端口</Label>
|
||||
<TextBox Grid.Column="1">
|
||||
<TextBox Grid.Column="1"
|
||||
IsEnabled="False">
|
||||
<TextBox.Text>
|
||||
<Binding Path="ListenPort" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding Path="Item.ListenPort" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
<rules:PortValidationRule />
|
||||
</Binding.ValidationRules>
|
||||
|
Reference in New Issue
Block a user