Repository navigation
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
47 lines (45 loc) · 2.7 KB
/
Copy pathMainWindow.xaml
File metadata and controls
47 lines (45 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<Window x:Class="WindowsProxySwitch.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="系统代理" Width="340" SizeToContent="Height" ResizeMode="CanMinimize"
WindowStartupLocation="CenterScreen" Topmost="True" Language="zh-CN"
FontFamily="Microsoft YaHei UI" FontSize="12" Background="#F3F6FA"
UseLayoutRounding="True" Activated="WindowActivated">
<Border Margin="14" Padding="16" Background="White" BorderBrush="#DDE5EF"
BorderThickness="1" CornerRadius="10">
<StackPanel>
<DockPanel LastChildFill="True">
<Border x:Name="StateBadge" DockPanel.Dock="Right" Padding="8,3"
VerticalAlignment="Center" CornerRadius="8" Background="#EDF1F6">
<TextBlock x:Name="StateText" Text="读取中" Foreground="#49576B"/>
</Border>
<TextBlock Text="手动代理" FontSize="18" FontWeight="SemiBold" Foreground="#17263B"/>
</DockPanel>
<Grid Margin="0,14,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="72"/>
</Grid.ColumnDefinitions>
<StackPanel>
<Label Target="{Binding ElementName=IPAddressInput}" Content="预设 IP" Padding="0,0,0,4"/>
<TextBox x:Name="IPAddressInput" MinHeight="27" Padding="6,0" IsReadOnly="True"
ToolTip="在程序同目录的 proxy.txt 中修改预设"
VerticalContentAlignment="Center" BorderBrush="#A8B8C9"/>
</StackPanel>
<StackPanel Grid.Column="2">
<Label Target="{Binding ElementName=PortInput}" Content="预设端口" Padding="0,0,0,4"/>
<TextBox x:Name="PortInput" MinHeight="27" Padding="6,0" IsReadOnly="True"
ToolTip="在程序同目录的 proxy.txt 中修改预设"
VerticalContentAlignment="Center" BorderBrush="#A8B8C9"/>
</StackPanel>
</Grid>
<UniformGrid Columns="2" Margin="0,12,0,0">
<Button Content="开启并应用" Height="29" Margin="0,0,5,0" Click="EnableClicked"/>
<Button Content="关闭代理" Height="29" Margin="5,0,0,0" Click="DisableClicked"/>
</UniformGrid>
<TextBlock x:Name="Feedback" Margin="0,9,0,0" MinHeight="17"
TextWrapping="Wrap" Visibility="Hidden"/>
</StackPanel>
</Border>
</Window>