-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWirelessPairingWindow.xaml
More file actions
89 lines (85 loc) · 5.79 KB
/
Copy pathWirelessPairingWindow.xaml
File metadata and controls
89 lines (85 loc) · 5.79 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
<Window x:Class="AndroidWidget.WirelessPairingWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chrome="clr-namespace:AndroidWidget.Presentation.Chrome"
Title="Wireless debugging" Icon="{StaticResource AppIconImage}"
Width="600" Height="700" MinWidth="520" MinHeight="620"
WindowStartupLocation="CenterOwner" Style="{StaticResource DialogWindowStyle}">
<Window.Resources>
<Style TargetType="Button" BasedOn="{StaticResource DialogButton}" />
<Style TargetType="TextBox" BasedOn="{StaticResource DialogTextBox}" />
</Window.Resources>
<Grid>
<Grid.RowDefinitions><RowDefinition Height="44" /><RowDefinition Height="*" /></Grid.RowDefinitions>
<chrome:DialogTitleBar Title="Wireless debugging" Subtitle="Device Widget" />
<Grid Grid.Row="1" Margin="22,12,22,22">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel>
<TextBlock Text="Wireless debugging" FontSize="23" FontWeight="SemiBold"
Foreground="{DynamicResource TextPrimary}" />
<TextBlock Margin="0,5,0,0" Foreground="{DynamicResource TextSecondary}" TextWrapping="Wrap"
Text="На телефоне откройте Для разработчиков → Беспроводная отладка → Сопряжение с помощью кода." />
</StackPanel>
<Border Grid.Row="1" Margin="0,18,0,0" Style="{StaticResource DialogCard}">
<Grid>
<Grid.ColumnDefinitions><ColumnDefinition Width="210" /><ColumnDefinition Width="*" /></Grid.ColumnDefinitions>
<Border Width="190" Height="190" CornerRadius="12" Background="White" Padding="8">
<Image x:Name="QrImage" Stretch="Uniform" />
</Border>
<StackPanel Grid.Column="1" Margin="16,0,0,0" VerticalAlignment="Center">
<TextBlock Text="Системное QR-сопряжение" FontSize="16" FontWeight="SemiBold"
Foreground="{DynamicResource TextPrimary}" />
<TextBlock Margin="0,7,0,0" TextWrapping="Wrap" Foreground="{DynamicResource TextSecondary}"
Text="На телефоне выберите «Сопряжение с помощью QR-кода», затем отсканируйте код. Виджет дождётся mDNS pairing-server и завершит TLS-сопряжение через ADB." />
<Button x:Name="CreateQrButton" Margin="0,13,0,0" Content="Создать новый QR"
Padding="14,9" HorizontalAlignment="Left" Click="CreateQrButton_Click" />
</StackPanel>
</Grid>
</Border>
<Border Grid.Row="2" Margin="0,12,0,0" Style="{StaticResource DialogCard}">
<Grid>
<Grid.RowDefinitions><RowDefinition /><RowDefinition Height="Auto" /></Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /><ColumnDefinition Width="120" /><ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="Адрес сопряжения" Foreground="{DynamicResource TextSecondary}" FontSize="10" />
<TextBox x:Name="PairEndpointText" Margin="0,5,8,0" Padding="9" ToolTip="Например, 192.0.2.1:37123" />
</StackPanel>
<StackPanel Grid.Column="1">
<TextBlock Text="Код" Foreground="{DynamicResource TextSecondary}" FontSize="10" />
<TextBox x:Name="PairCodeText" Margin="0,5,8,0" Padding="9" MaxLength="6" />
</StackPanel>
<Button Grid.Column="2" Content="Сопрячь" Padding="14,9" VerticalAlignment="Bottom"
Click="PairButton_Click" />
<TextBlock Grid.Row="1" Grid.ColumnSpan="3" Margin="0,12,0,0" FontSize="10"
Foreground="{DynamicResource TextSecondary}" TextWrapping="Wrap"
Text="Адрес сопряжения и адрес подключения обычно используют разные порты." />
</Grid>
</Border>
<Border Grid.Row="3" Margin="0,12,0,0" Style="{StaticResource DialogCard}">
<Grid>
<Grid.ColumnDefinitions><ColumnDefinition Width="*" /><ColumnDefinition Width="Auto" /></Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="Адрес подключения" Foreground="{DynamicResource TextSecondary}" FontSize="10" />
<TextBox x:Name="ConnectEndpointText" Margin="0,5,8,0" Padding="9"
ToolTip="Адрес из основного экрана Беспроводной отладки" />
</StackPanel>
<Button Grid.Column="1" Content="Подключить" Padding="14,9" VerticalAlignment="Bottom"
Click="ConnectButton_Click" />
</Grid>
</Border>
<TextBlock x:Name="StatusText" Grid.Row="4" Margin="2,14,2,0" TextWrapping="Wrap"
Foreground="{DynamicResource TextSecondary}" />
<Button Grid.Row="5" Content="Готово" Width="100" Padding="13,8" HorizontalAlignment="Right"
IsDefault="True" Click="CloseButton_Click" />
</Grid>
</Grid>
</Window>