-
Notifications
You must be signed in to change notification settings - Fork 94
/
PreferencesDialog.xeto
265 lines (260 loc) · 11.5 KB
/
PreferencesDialog.xeto
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<?xml version="1.0" encoding="UTF-8"?>
<Dialog
xmlns="http://schema.picoe.ca/eto.forms"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:resource="clr-namespace:OpenTrace.Properties"
Title="{x:Static resource:Resources.PREFERENCES}"
MinimumSize="500,350"
Padding="10"
>
<TableLayout Spacing="5,5">
<TableRow ScaleHeight="True">
<TableLayout>
<TabControl>
<TabPage Text="{x:Static resource:Resources.GENERAL}">
<TableLayout Padding="10" Spacing="10,10">
<TableRow>
<TableLayout Spacing="5,5">
<TableRow>
<Label Text="{x:Static resource:Resources.EXE_PATH}"></Label>
<TextBox x:Name="executablePath" PlaceholderText="{x:Static resource:Resources.AUTO_DETECT}"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.ADDITIONAL_ARGS}"></Label>
<TextBox x:Name="arguments" Text=""></TextBox>
</TableRow>
<TableRow>
<Label Text="Language (语言)"></Label>
<DropDown x:Name="language" SelectedIndex="0">
<ListItem Text="English" Key="en"></ListItem>
<ListItem Text="简体中文" Key="zh-CN"></ListItem>
<ListItem Text="繁體中文" Key="zh-HK"></ListItem>
<ListItem Text="正體中文" Key="zh-TW"></ListItem>
</DropDown>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.MAP_PROVIDER}"></Label>
<DropDown x:Name="mapProvider" SelectedIndex="0">
<ListItem Text="{x:Static resource:Resources.MAP_PROVIDER_BAIDU}" Key="baidu"></ListItem>
<ListItem Text="{x:Static resource:Resources.MAP_PROVIDER_GOOGLE}" Key="google"></ListItem>
<!--
<ListItem Text="{x:Static resource:Resources.MAP_PROVIDER_OSM}" Key="openstreetmap"></ListItem>
-->
</DropDown>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.CUSTOM_DNS_RESOLVERS}"></Label>
<TextArea x:Name="customDNSResolvers"></TextArea>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.GRID_SIZE_RATIO}"></Label>
<NumericStepper x:Name="gridSizePercentage" MaxValue="90" MinValue="10" ></NumericStepper>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.PRIVACY_MASKING}"></Label>
<TableLayout Spacing="5,5">
<TableRow>
<Label Text="{x:Static resource:Resources.PRIVACY_MASKING_DESCR}"></Label>
<NumericStepper x:Name="maskedHops" MaxValue="30" MinValue="0" ></NumericStepper>
<DropDown x:Name="maskedHopsMode" SelectedIndex="0">
<ListItem Text="{x:Static resource:Resources.PRIVACY_MASKING_IP_HALF}" Key="ip_half"></ListItem>
<ListItem Text="{x:Static resource:Resources.PRIVACY_MASKING_IP_FULL}" Key="ip_full"></ListItem>
<ListItem Text="{x:Static resource:Resources.PRIVACY_MASKING_IP_GEO}" Key="ip_geo"></ListItem>
<ListItem Text="{x:Static resource:Resources.PRIVACY_MASKING_ALL}" Key="all"></ListItem>
</DropDown>
</TableRow>
</TableLayout>
</TableRow>
</TableLayout>
</TableRow>
<TableRow>
<CheckBox x:Name="combineGeoOrg" Text="{x:Static resource:Resources.COMBINE_GEO_ORG}"></CheckBox>
</TableRow>
<TableRow>
<CheckBox x:Name="timeRounding" Text="{x:Static resource:Resources.TIME_ROUNDING}"></CheckBox>
</TableRow>
<TableRow>
<CheckBox x:Name="hideMapPopup" Text="{x:Static resource:Resources.HIDE_MAP_POPUP}"></CheckBox>
</TableRow>
<TableRow>
<CheckBox x:Name="hideAddICMPFirewallRule" Text="{x:Static resource:Resources.HIDE_ADD_FIREWALL_PROMPT}"></CheckBox>
</TableRow>
<TableRow>
<CheckBox x:Name="checkUpdateOnStartup" Text="{x:Static resource:Resources.CHECK_UPDATE_ON_STARTUP}"></CheckBox>
</TableRow>
<TableRow ScaleHeight="True"></TableRow>
</TableLayout>
</TabPage>
<TabPage x:Name="TraceroutingTabPage" Text="{x:Static resource:Resources.TRACEROUTING}">
<TableLayout Padding="10" Spacing="5,5">
<TableRow>
<Label Text="{x:Static resource:Resources.QUERIES_SETTING}"></Label>
<TextBox x:Name="queries" PlaceholderText="3"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.DST_PORT_INIT_SEQ}"></Label>
<TextBox x:Name="port" PlaceholderText="80/tcp 53/udp 1/icmp"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.PARALLEL_REQ}"></Label>
<TextBox x:Name="parallel_requests" PlaceholderText="18"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.MAX_HOPS}"></Label>
<TextBox x:Name="max_hops" PlaceholderText="30"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.FIRST_TTL_HOP}"></Label>
<TextBox x:Name="first" PlaceholderText="1"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.PACKET_INTERVAL}"></Label>
<TextBox x:Name="send_time" PlaceholderText="100"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.PACKET_GROUP_INTERVAL}"></Label>
<TextBox x:Name="ttl_time" PlaceholderText="500"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.SRC_ADDR_SETTING}"></Label>
<TextBox x:Name="source" Text=""></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.SRC_INTERFACE_SETTING}"></Label>
<TextBox x:Name="dev" Text=""></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.RDNS_MODE}"></Label>
<DropDown x:Name="rdns_mode" SelectedIndex="0">
<ListItem Text="{x:Static resource:Resources.RDNS_MODE_DEFAULT}" Key="default"></ListItem>
<ListItem Text="{x:Static resource:Resources.RDNS_MODE_DISABLE}" Key="disable"></ListItem>
<ListItem Text="{x:Static resource:Resources.RDNS_MODE_ALWAYS}" Key="always"></ListItem>
</DropDown>
</TableRow>
<TableRow ScaleHeight="True"></TableRow>
</TableLayout>
</TabPage>
<TabPage Text="API">
<TableLayout Padding="10" Spacing="10,10">
<TableRow>
<TableLayout Spacing="5,5">
<TableRow>
<Label Text="{x:Static resource:Resources.LEOMOEAPI_HOSTPORT}"></Label>
<TextBox x:Name="LeoMoeAPI_HOSTPORT" Text=""></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.POW_PROVIDER}"></Label>
<DropDown x:Name="POWProvider" SelectedIndex="0">
<ListItem Text="{x:Static resource:Resources.POW_PROVIDER_LEOMOE}" Key="api.leo.moe"></ListItem>
</DropDown>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.NEXTTRACE_PROXY}"></Label>
<TextBox x:Name="NextTraceProxy" PlaceholderText="protocol://username:password@host:port" Text=""></TextBox>
</TableRow>
<TableRow>
<Label Text="API Base"></Label>
<TextBox x:Name="IPAPI_Base" Text=""></TextBox>
</TableRow>
<TableRow>
<Label Text="IPInsight Token"></Label>
<TextBox x:Name="IPInsightToken" Text=""></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.IPINFO_TOKEN}"></Label>
<TextBox x:Name="IPInfoToken" Text=""></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.CHUNZHEN_ENDPOINT}"></Label>
<TextBox x:Name="ChunZhenEndpoint"></TextBox>
</TableRow>
</TableLayout>
</TableRow>
<TableRow>
<CheckBox x:Name="enable_ip2region" Text="{x:Static resource:Resources.ENABLE_IP2REGION}"></CheckBox>
</TableRow>
<TableRow>
<CheckBox x:Name="enable_ipinfolocal" Text="{x:Static resource:Resources.ENABLE_IPINFOLOCAL}"></CheckBox>
</TableRow>
<TableRow ScaleHeight="True"></TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.OTHER_DATABASE_TIPS}"></Label>
</TableRow>
</TableLayout>
</TabPage>
<TabPage x:Name="LocalMMDBPage" Text="{x:Static resource:Resources.LOCAL_MMDB}">
<TableLayout Padding="10" Spacing="10,10">
<TableRow>
<TableLayout Spacing="5,5">
<TableRow>
<Label Text="{x:Static resource:Resources.LOCAL_MMDB_PATH}"></Label>
<TextBox x:Name="localDBPath"></TextBox>
</TableRow>
<TableRow>
<Label Text=""></Label>
<Button Text="{x:Static resource:Resources.LOCAL_MMDB_SELECT}" Click="HandleMMDBSelect"></Button>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.LOCAL_MMDB_PREVIEW_IP}"></Label>
<TextBox x:Name="testMMDBIP" Text="223.5.5.5"></TextBox>
</TableRow>
<TableRow>
<Label Text=""></Label>
<Button Text="{x:Static resource:Resources.LOCAL_MMDB_PREVIEW}" Click="HandleMMDBPreview"></Button>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.LOCAL_MMDB_PRESETS}"></Label>
<DropDown x:Name="localDBPreset" SelectedIndex="0" DropDownClosed="HandleMMDBPreset">
<ListItem Text="" Key="none"></ListItem>
<ListItem Text="GeoIP2 City" Key="geoip2-city"></ListItem>
<ListItem Text="IPInfo.io Location" Key="ipinfo-loc"></ListItem>
<ListItem Text="IPInfo.io Org" Key="ipinfo-org"></ListItem>
</DropDown>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.LOCAL_MMDB_ADDR}"></Label>
<TextBox x:Name="localDBAddr"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.LOCAL_MMDB_ORG}"></Label>
<TextBox x:Name="localDBOrg"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.LOCAL_MMDB_LAT}"></Label>
<TextBox x:Name="localDBLat"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.LOCAL_MMDB_LON}"></Label>
<TextBox x:Name="localDBLon"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.LOCAL_MMDB_ASN}"></Label>
<TextBox x:Name="localDBASN"></TextBox>
</TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.LOCAL_MMDB_HOSTNAME}"></Label>
<TextBox x:Name="localDBHostname"></TextBox>
</TableRow>
</TableLayout>
</TableRow>
<TableRow ScaleHeight="True"></TableRow>
<TableRow>
<Label Text="{x:Static resource:Resources.LOCAL_MMDB_TIPS}"></Label>
</TableRow>
</TableLayout>
</TabPage>
</TabControl>
</TableLayout>
</TableRow>
<TableRow>
<TableLayout Spacing="5, 5">
<TableRow>
<Label Text="{x:Static resource:Resources.RESTART_TO_APPLY}"></Label>
<TableCell ScaleWidth="True"></TableCell>
<Button Text="{x:Static resource:Resources.SAVE}" Click="SaveButton_Click"></Button>
<Button Text="{x:Static resource:Resources.CANCEL}" Click="CancelButton_Click"></Button>
</TableRow>
</TableLayout>
</TableRow>
</TableLayout>
</Dialog>