-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProxySettingsWindow.axaml
More file actions
116 lines (107 loc) · 4.66 KB
/
Copy pathProxySettingsWindow.axaml
File metadata and controls
116 lines (107 loc) · 4.66 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Babelive.ProxySettingsWindow"
Title="Proxy Settings"
Width="580" Height="540"
MinWidth="480" MinHeight="460"
Background="Transparent"
TransparencyLevelHint="Transparent"
WindowDecorations="BorderOnly"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaTitleBarHeightHint="36"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
FontFamily="Microsoft YaHei UI, Segoe UI, PingFang SC"
FontSize="13">
<Border Background="{StaticResource WindowBg}"
BorderBrush="{StaticResource WindowBorder}"
BorderThickness="1"
CornerRadius="12">
<Grid RowDefinitions="36,*">
<!-- Title bar (drag region) -->
<Grid Grid.Row="0" Background="Transparent"
PointerPressed="TitleBar_PointerPressed"
ColumnDefinitions="*,Auto">
<TextBlock Grid.Column="0"
Text="Proxy Settings"
FontSize="13" FontWeight="SemiBold"
VerticalAlignment="Center"
Margin="20,0,0,0"
Foreground="{StaticResource TextSecondary}"/>
<Button Grid.Column="1"
Classes="caption close" Content="X"
Click="CancelBtn_Click"
ToolTip.Tip="Cancel"/>
</Grid>
<!-- Form content -->
<Grid Grid.Row="1" Margin="28,12,28,24"
RowDefinitions="Auto,16,Auto,Auto,Auto,16,Auto,Auto,16,Auto,Auto,16,Auto,Auto,*,Auto">
<!-- Master enable switch -->
<CheckBox Grid.Row="0" x:Name="EnableCheck"
Content="Use proxy for API connection"
FontWeight="SemiBold"
IsCheckedChanged="EnableCheck_Changed"/>
<!-- Proxy type -->
<TextBlock Grid.Row="2" Text="PROXY TYPE" Classes="section"/>
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="0,2,0,0">
<RadioButton x:Name="HttpRadio"
GroupName="ProxyType"
Content="HTTP / HTTPS"
Margin="0,0,28,0"
IsChecked="True"/>
<RadioButton x:Name="Socks5Radio"
GroupName="ProxyType"
Content="SOCKS5"/>
</StackPanel>
<TextBlock Grid.Row="4"
Classes="helper"
Text="HTTP / HTTPS uses the CONNECT method to tunnel the WSS connection (works with most corporate / Squid / Charles / Fiddler proxies). SOCKS5 routes the raw TCP stream through the proxy."/>
<!-- Host + Port row -->
<Grid Grid.Row="6"
ColumnDefinitions="*,12,140">
<StackPanel Grid.Column="0">
<TextBlock Text="HOST" Classes="section"/>
<TextBox x:Name="HostBox"
Classes="input"
Margin="0,2,0,0"
FontFamily="Consolas, Microsoft YaHei UI"
PlaceholderText="127.0.0.1"/>
</StackPanel>
<StackPanel Grid.Column="2">
<TextBlock Text="PORT" Classes="section"/>
<TextBox x:Name="PortBox"
Classes="input"
Margin="0,2,0,0"
FontFamily="Consolas, Microsoft YaHei UI"
PlaceholderText="7890"/>
</StackPanel>
</Grid>
<TextBlock Grid.Row="7"
Classes="helper"
Text="Hostname or IP of the proxy server, plus the port it listens on."/>
<TextBlock Grid.Row="9" Text="USERNAME (OPTIONAL)" Classes="section"/>
<TextBox Grid.Row="10" x:Name="UsernameBox"
Classes="input"
Margin="0,2,0,0"
FontFamily="Consolas, Microsoft YaHei UI"/>
<TextBlock Grid.Row="12" Text="PASSWORD (OPTIONAL)" Classes="section"/>
<TextBox Grid.Row="13" x:Name="PasswordBox"
Classes="input"
Margin="0,2,0,0"
FontFamily="Consolas, Microsoft YaHei UI"
PasswordChar="*"/>
<StackPanel Grid.Row="15" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Classes="flat"
Content="Cancel" Width="100" Height="34"
Margin="0,0,8,0"
Click="CancelBtn_Click"
IsCancel="True"/>
<Button Classes="primary"
Content="Save" Width="100" Height="34"
Click="SaveBtn_Click"
IsDefault="True"/>
</StackPanel>
</Grid>
</Grid>
</Border>
</Window>