-
Notifications
You must be signed in to change notification settings - Fork 2
/
AuthorizeWindow.xaml
68 lines (63 loc) · 3.76 KB
/
AuthorizeWindow.xaml
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
<Window x:Class="Screenshotter.AuthorizeWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" WindowStartupLocation="CenterScreen" Loaded="InitAsync"
BorderBrush="#39F" BorderThickness="1" FontFamily="Meiryo UI"
Title="Twitterアカウントの認証" Height="130" Width="498" Icon="Resources/icon.ico"
SizeToContent="Height" SnapsToDevicePixels="True" UseLayoutRounding="True">
<WindowChrome.WindowChrome>
<WindowChrome CornerRadius="3" GlassFrameThickness="1" ResizeBorderThickness="8"
UseAeroCaptionButtons="False" CaptionHeight="43" />
</WindowChrome.WindowChrome>
<Window.Resources>
<Storyboard x:Key="DialogShowAnimation" Storyboard.TargetProperty="(Grid.Opacity)">
<DoubleAnimation From="0" To="1" Duration="0:0:0.3"/>
</Storyboard>
<Storyboard x:Key="DialogCloseAnimation" Storyboard.TargetProperty="(Grid.Opacity)">
<DoubleAnimation From="1" To="0" Duration="0:0:0.3"/>
</Storyboard>
</Window.Resources>
<Grid>
<StackPanel Margin="15,10,15,15">
<Label FontSize="18">Twitterアカウントの認証</Label>
<DockPanel>
<Button DockPanel.Dock="Right" Width="100" Height="26"
Background="Transparent" BorderBrush="#BBB"
FontSize="13" Click="OpenInBrowser">ブラウザで開く</Button>
<Button DockPanel.Dock="Right" Width="80" Height="26"
Background="Transparent" Margin="0,0,5,0"
BorderBrush="#BBB" FontSize="13" Click="CopyUrl">コピー</Button>
<Label>
<TextBlock x:Name="AuthorizeUrl" TextTrimming="CharacterEllipsis">
認証の準備をしています...
</TextBlock>
</Label>
</DockPanel>
<DockPanel Margin="0,5,0,0">
<Button DockPanel.Dock="Right" Width="80" Height="26" Background="Transparent"
BorderBrush="#BBB" Margin="5,0,0,0" FontSize="13" Click="AuthorizeAsync">認証</Button>
<Label>PINコード:</Label>
<TextBox x:Name="Pin" BorderBrush="#BBB" FontSize="13" Height="26" MaxLength="7"
PreviewTextInput="CheckPin" InputMethod.IsInputMethodEnabled="False"
VerticalContentAlignment="Center" HorizontalContentAlignment="Center" />
</DockPanel>
</StackPanel>
<Grid x:Name="StatusGrid" Background="#BB000000" Opacity="0" IsHitTestVisible="False">
<Border Background="#FFF" Width="256" Height="72"
Padding="20,0" CornerRadius="3">
<StackPanel Orientation="Horizontal">
<Label x:Name="Loader" VerticalContentAlignment="Center"
FontFamily="Resources/#Material Icons"
FontSize="36" Foreground="#555" Visibility="Visible"></Label>
<Label x:Name="Success" VerticalContentAlignment="Center"
FontFamily="Resources/#Material Icons"
FontSize="40" Foreground="#009688" Visibility="Collapsed"></Label>
<Label x:Name="Status" VerticalContentAlignment="Center"
FontSize="14" Foreground="#333" Margin="0,-2,0,0">認証しています..</Label>
</StackPanel>
</Border>
</Grid>
</Grid>
</Window>