You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
239 lines
12 KiB
239 lines
12 KiB
<Window x:Class="AIK.Views.MenuPages.Integral.IntegralRechargeWindow"
|
|
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"
|
|
Title="{DynamicResource IntegralRecharge}"
|
|
Width="520"
|
|
Height="640"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterOwner"
|
|
Background="#F4F7FA"
|
|
ShowInTaskbar="False">
|
|
<Window.Resources>
|
|
<Style x:Key="AmountButtonStyle" TargetType="Button">
|
|
<Setter Property="Height" Value="58"/>
|
|
<Setter Property="Margin" Value="4"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Background" Value="White"/>
|
|
<Setter Property="BorderBrush" Value="#DDE4EA"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="border"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="6">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="BorderBrush" Value="#20B8C8"/>
|
|
<Setter TargetName="border" Property="Background" Value="#F7FEFF"/>
|
|
</Trigger>
|
|
<DataTrigger Binding="{Binding IsSelected}" Value="True">
|
|
<Setter TargetName="border" Property="BorderBrush" Value="#20B8C8"/>
|
|
<Setter TargetName="border" Property="Background" Value="#E9FBFD"/>
|
|
</DataTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="CheckRadioButtonStyle" TargetType="RadioButton">
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
<Border x:Name="box"
|
|
Width="26"
|
|
Height="26"
|
|
CornerRadius="4"
|
|
BorderThickness="1"
|
|
BorderBrush="#20B8C8"
|
|
Background="White"
|
|
VerticalAlignment="Center">
|
|
<TextBlock x:Name="check"
|
|
Text="√"
|
|
Foreground="White"
|
|
FontSize="22"
|
|
FontWeight="Bold"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Margin="0,-3,0,0"
|
|
Visibility="Collapsed"/>
|
|
</Border>
|
|
<ContentPresenter Margin="12,0,0,0"
|
|
VerticalAlignment="Center"
|
|
RecognizesAccessKey="True"/>
|
|
</StackPanel>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="box" Property="Background" Value="#20B8C8"/>
|
|
<Setter TargetName="check" Property="Visibility" Value="Visible"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="box" Property="BorderBrush" Value="#18A9B8"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="box" Property="Opacity" Value="0.5"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="145"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="78"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border Grid.Row="0">
|
|
<Border.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
|
<GradientStop Color="#EEF8FA" Offset="0"/>
|
|
<GradientStop Color="#21B8C8" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
<Grid>
|
|
<TextBlock Text="{DynamicResource IntegralRecharge}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Top"
|
|
Margin="0,20,0,0"
|
|
FontSize="26"
|
|
FontWeight="SemiBold"
|
|
Foreground="#2F3438"/>
|
|
<StackPanel HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal"
|
|
Margin="0,38,0,0">
|
|
<TextBlock Text="{DynamicResource RechargeCurrentIntegral}"
|
|
FontSize="23"
|
|
Foreground="#3A4148"
|
|
VerticalAlignment="Center"/>
|
|
<TextBlock Text="{Binding CurrentIntegral}"
|
|
FontSize="40"
|
|
FontWeight="Bold"
|
|
Foreground="#2E3338"
|
|
Margin="14,0,0,0"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border Grid.Row="1"
|
|
Background="#F7F7F8"
|
|
CornerRadius="24,24,0,0"
|
|
Margin="0,-16,0,0"
|
|
Padding="28,20,28,0">
|
|
<StackPanel>
|
|
<TextBlock Text="{DynamicResource RechargeAmountTitle}"
|
|
FontSize="21"
|
|
Foreground="#2F3438"
|
|
Margin="0,0,0,10"/>
|
|
<Border Background="White"
|
|
CornerRadius="8"
|
|
Height="50"
|
|
Padding="16,0"
|
|
Margin="0,0,0,10">
|
|
<Grid>
|
|
<TextBox Text="{Binding Amount, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:0.00}}"
|
|
BorderThickness="0"
|
|
Background="Transparent"
|
|
FontSize="22"
|
|
Foreground="#333"
|
|
VerticalContentAlignment="Center"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<ItemsControl ItemsSource="{Binding AmountOptions}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid Columns="3" Rows="2"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Button Style="{StaticResource AmountButtonStyle}"
|
|
Command="{Binding DataContext.SelectAmountCommand, RelativeSource={RelativeSource AncestorType=Window}}"
|
|
CommandParameter="{Binding}">
|
|
<StackPanel>
|
|
<TextBlock Text="{Binding Amount, StringFormat={}{0:0}}"
|
|
FontSize="21"
|
|
FontWeight="Bold"
|
|
Foreground="#20B8C8"
|
|
HorizontalAlignment="Center"/>
|
|
<TextBlock Text="{Binding Integral}"
|
|
FontSize="14"
|
|
Foreground="#777"
|
|
HorizontalAlignment="Center"
|
|
Margin="0,3,0,0"/>
|
|
</StackPanel>
|
|
</Button>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<TextBlock Text="{DynamicResource RechargePaymentMethodTitle}"
|
|
FontSize="21"
|
|
Foreground="#2F3438"
|
|
Margin="0,14,0,10"/>
|
|
<RadioButton x:Name="PaymentMethodRadioButton"
|
|
Content="{DynamicResource PaymentMethodWechat}"
|
|
IsChecked="True"
|
|
GroupName="PayType"
|
|
Style="{StaticResource CheckRadioButtonStyle}"
|
|
FontSize="19"
|
|
Foreground="#111"
|
|
Height="30"
|
|
VerticalContentAlignment="Center"/>
|
|
|
|
<TextBlock Text="{Binding StatusMessage}"
|
|
FontSize="13"
|
|
Foreground="#D97706"
|
|
TextWrapping="Wrap"
|
|
Margin="0,8,0,0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border Grid.Row="2"
|
|
Background="#F7F7F8"
|
|
Padding="28,8,28,14">
|
|
<Button Content="{DynamicResource RechargePayButton}"
|
|
Command="{Binding PayCommand}"
|
|
Background="#20B8C8"
|
|
Foreground="White"
|
|
FontSize="24"
|
|
FontWeight="SemiBold"
|
|
BorderThickness="0"
|
|
Cursor="Hand">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="border"
|
|
Background="{TemplateBinding Background}"
|
|
CornerRadius="8">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#18A9B8"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="border" Property="Opacity" Value="0.5"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
</Border>
|
|
</Grid>
|
|
</Window>
|
|
|