feat: 完善 PortProxy 图形化管理工具

This commit is contained in:
2025-01-29 02:40:46 +08:00
parent 23995df656
commit 38ce3b2071
13 changed files with 685 additions and 25 deletions

View File

@@ -0,0 +1,68 @@
<Window x:Class="PortProxyTool.Wpf.Views.Windows.SetWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:rules="clr-namespace:PortProxyTool.Wpf.Rules"
mc:Ignorable="d"
Title="编辑 PortProxy" Height="450" Width="800"
MinWidth="400" MinHeight="280">
<Grid Margin="16">
<StackPanel>
<Grid Margin="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0">监听地址</Label>
<TextBox Grid.Column="1"
Text="{Binding ListenAddress}" />
</Grid>
<Grid Margin="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0">监听端口</Label>
<TextBox Grid.Column="1">
<TextBox.Text>
<Binding Path="ListenPort" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<rules:PortValidationRule />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</Grid>
<Grid Margin="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0">目标连接地址</Label>
<TextBox Grid.Column="1"
Text="{Binding TargetAddress}" />
</Grid>
<Grid Margin="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0">目标连接端口</Label>
<TextBox Grid.Column="1">
<TextBox.Text>
<Binding Path="TargetPort" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<rules:PortValidationRule />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</Grid>
<Button Margin="4"
Content="编辑"
MinHeight="24"
Click="SetButton_OnClick" />
</StackPanel>
</Grid>
</Window>