|
3 | 3 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 | 5 | mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
6 | | - Width="600" Height="450" |
| 6 | + Width="600" Height="450" x:Name="u" |
7 | 7 | x:Class="System.Application.UI.Views.Windows.AuthTradeWindow" |
8 | 8 | xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop" |
9 | 9 | xmlns:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop" |
10 | 10 | xmlns:controls="clr-namespace:System.Application.UI.Views.Controls" |
| 11 | + xmlns:i="using:Avalonia.Xaml.Interactivity" |
| 12 | + xmlns:ia="using:Avalonia.Xaml.Interactions.Core" |
11 | 13 | Background="Transparent" |
12 | 14 | ExtendClientAreaToDecorationsHint="True" |
13 | 15 | ExtendClientAreaChromeHints="NoChrome" |
14 | 16 | ExtendClientAreaTitleBarHeightHint="30" |
15 | 17 | Title="{Binding Title}"> |
16 | 18 | <Panel MaxWidth="{Binding $parent.MaxWidth}"> |
17 | 19 | <controls:TitleBar></controls:TitleBar> |
18 | | - <Panel> |
| 20 | + <Panel IsVisible="{Binding !IsLoggedIn}"> |
19 | 21 | <StackPanel VerticalAlignment="Center" Spacing="8" Margin="10,0" Width="250"> |
20 | | - <Image Source="/Application/UI/Assets/Icon.ico" Height="128" Width="128" HorizontalAlignment="Center" Margin="0 0 0 25"> |
21 | | - <!--<Image.Clip> |
22 | | - <EllipseGeometry Rect="0,0,128,128" /> |
23 | | - </Image.Clip>--> |
| 22 | + <Image Height="100" Width="100" HorizontalAlignment="Center" Margin="0 0 0 25"> |
| 23 | + <Image.Source> |
| 24 | + <DrawingImage Drawing="{StaticResource SteamDrawing}"></DrawingImage> |
| 25 | + </Image.Source> |
24 | 26 | </Image> |
25 | | - <TextBox Watermark="{Binding Path=Res.User_Phone,Mode=OneWay,Source={x:Static resx:R.Current}}"></TextBox> |
| 27 | + <TextBox Watermark="{Binding Path=Res.Steam_User,Mode=OneWay,Source={x:Static resx:R.Current}}" Text="{Binding UserName}"></TextBox> |
26 | 28 |
|
27 | | - <Panel> |
28 | | - <TextBox Watermark="{Binding Path=Res.User_SMSCode,Mode=OneWay,Source={x:Static resx:R.Current}}"></TextBox> |
29 | | - <Border HorizontalAlignment="Right" Cursor="Hand"> |
30 | | - <Button Classes="CodeButton" Content="{Binding Path=Res.User_GetSMSCode,Mode=OneWay,Source={x:Static resx:R.Current}}"></Button> |
31 | | - </Border> |
32 | | - </Panel> |
| 29 | + <TextBox Watermark="{Binding Path=Res.Steam_Password,Mode=OneWay,Source={x:Static resx:R.Current}}" PasswordChar="*" Text="{Binding Password}"></TextBox> |
33 | 30 |
|
34 | 31 | <Panel Margin="2 0 6 0"> |
35 | | - <CheckBox Content="{Binding Path=Res.User_Rememberme,Mode=OneWay,Source={x:Static resx:R.Current}}"></CheckBox> |
36 | | - <Button Classes="Hyperlink" Content="{Binding Path=Res.User_LoginTroubleshoot,Mode=OneWay,Source={x:Static resx:R.Current}}" HorizontalAlignment="Right"></Button> |
| 32 | + <CheckBox Content="{Binding Path=Res.User_Rememberme,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding RememberMe}"></CheckBox> |
37 | 33 | </Panel> |
38 | 34 |
|
| 35 | + <StackPanel IsVisible="{Binding IsRequiresCaptcha}" Orientation="Vertical" HorizontalAlignment="Center" Spacing="10"> |
| 36 | + <Border Width="206" Height="37"> |
| 37 | + <Image Width="206" Height="37" Source="{Binding CodeImage,Converter={StaticResource BitmapAssetValueConverter}}"> |
| 38 | + </Image> |
| 39 | + </Border> |
| 40 | + <TextBox Watermark="{Binding Path=Res.Steam_ImageCodeTip,Mode=OneWay,Source={x:Static resx:R.Current}}" Text="{Binding CodeImageChar}" MaxWidth="200"></TextBox> |
| 41 | + </StackPanel> |
| 42 | + |
39 | 43 | <Button Content="{Binding Path=Res.Login,Mode=OneWay,Source={x:Static resx:R.Current}}" |
40 | | - HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"> |
| 44 | + HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Command="{Binding LoginButton_Click}"> |
41 | 45 | </Button> |
42 | 46 | </StackPanel> |
| 47 | + <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 5" Text="{Binding Path=Res.LocalAuth_SteamTradeLoginTip,Mode=OneWay,Source={x:Static resx:R.Current}}"></TextBlock> |
| 48 | + </Panel> |
| 49 | + |
| 50 | + <Panel HorizontalAlignment="Stretch" IsVisible="{Binding IsLoggedIn}"> |
| 51 | + <TextBlock IsVisible="{Binding IsConfirmationsEmpty}" |
| 52 | + Text="{Binding Path=Res.LocalAuth_AuthTradeListNullTip,Mode=OneWay,Source={x:Static resx:R.Current}}" |
| 53 | + TextWrapping="WrapWithOverflow" |
| 54 | + VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock> |
| 55 | + <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Margin="0 35 0 0" Padding="0"> |
| 56 | + <ItemsControl Items="{Binding Confirmations}"> |
| 57 | + <!--<ItemsRepeater.Layout> |
| 58 | + --><!--<UniformGridLayout ItemsJustification="SpaceEvenly" MinRowSpacing="20" Orientation="Horizontal" |
| 59 | + MaximumRowsOrColumns="6" />--><!-- |
| 60 | + <StackLayout Orientation="Vertical" Spacing="20"></StackLayout> |
| 61 | + </ItemsRepeater.Layout>--> |
| 62 | + <ItemsControl.ItemTemplate> |
| 63 | + <DataTemplate> |
| 64 | + <Panel x:Name="panel" Margin="10" MinWidth="100"> |
| 65 | + <Border x:Name="card" DockPanel.Dock="Top" Classes="paper" CornerRadius="0" Background="{DynamicResource ThemeBrushKey}"> |
| 66 | + <Grid Width="{Binding #panel.Width}" |
| 67 | + ColumnDefinitions="Auto,Auto,*,Auto"> |
| 68 | + <Panel> |
| 69 | + <Image Width="36" Margin="10 0" Stretch="Uniform" Source="{Binding Image,Converter={StaticResource BitmapAssetValueConverter}}"/> |
| 70 | + </Panel> |
| 71 | + <Panel Grid.Column="1" Margin="10,5"> |
| 72 | + <StackPanel> |
| 73 | + <DockPanel LastChildFill="True"> |
| 74 | + <controls:ScrollingTextBlock Width="{Binding $parent.Width}" Text="{Binding Details}" FontSize="24" Foreground="{DynamicResource HighlightForegroundBrushKey}" Cursor="Hand"></controls:ScrollingTextBlock> |
| 75 | + </DockPanel> |
| 76 | + |
| 77 | + <TextBlock Text="{Binding Traded}" FontSize="16" Foreground="{DynamicResource InactiveForegroundBrushKey}"/> |
| 78 | + <TextBlock Text="{Binding When}" FontSize="16" Foreground="{DynamicResource InactiveForegroundBrushKey}"/> |
| 79 | + </StackPanel> |
| 80 | + </Panel> |
| 81 | + <Grid Grid.Column="3" RowDefinitions="*,Auto"> |
| 82 | + <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 0 0 0"> |
| 83 | + <Border BorderBrush="{DynamicResource SemiactiveBackgroundBrushKey}" BorderThickness=".66 .66 .66 0" ToolTip.Tip="{Binding Path=Res.Confirm,Mode=OneWay,Source={x:Static resx:R.Current}}"> |
| 84 | + <Button Classes="flatbutton" Cursor="Hand" Content="{Binding Path=Res.Confirm,Mode=OneWay,Source={x:Static resx:R.Current}}" HorizontalAlignment="Stretch" Background="{DynamicResource ThemeBrushKey}" Command="{Binding #u.DataContext.ConfirmTrade_Click}" CommandParameter="{Binding}"></Button> |
| 85 | + </Border> |
| 86 | + <Border BorderBrush="{DynamicResource SemiactiveBackgroundBrushKey}" BorderThickness="0 .66 0 0" ToolTip.Tip="{Binding Path=Res.UserChange_BtnTootlip,Mode=OneWay,Source={x:Static resx:R.Current}}"> |
| 87 | + <Button Classes="flatbutton" Cursor="Hand" Content="{Binding Path=Res.Cancel,Mode=OneWay,Source={x:Static resx:R.Current}}" Background="{DynamicResource ThemeBrushKey}" HorizontalAlignment="Stretch" Command="{Binding #u.DataContext.CancelTrade_Click}" CommandParameter="{Binding}"></Button> |
| 88 | + </Border> |
| 89 | + </StackPanel> |
| 90 | + </Grid> |
| 91 | + </Grid> |
| 92 | + </Border> |
| 93 | + </Panel> |
| 94 | + </DataTemplate> |
| 95 | + </ItemsControl.ItemTemplate> |
| 96 | + </ItemsControl> |
| 97 | + </ScrollViewer> |
43 | 98 | </Panel> |
44 | 99 | </Panel> |
45 | 100 | </Window> |
0 commit comments