|
|
@@ -4,105 +4,284 @@ |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|
|
|
xmlns:hc="https://handyorg.github.io/handycontrol" |
|
|
|
xmlns:local="clr-namespace:HKCardIN" |
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
|
|
xmlns:s="https://github.com/canton7/Stylet" |
|
|
|
xmlns:viewModels="clr-namespace:HKCardIN.ViewModels" |
|
|
|
Title="海科智慧一卡通平台" |
|
|
|
Width="800" |
|
|
|
Height="500" |
|
|
|
Width="700" |
|
|
|
Height="420" |
|
|
|
d:DataContext="{d:DesignInstance Type=viewModels:RootViewModel}" |
|
|
|
ShowMaxButton="False" |
|
|
|
ShowTitle="True" |
|
|
|
WindowStartupLocation="CenterScreen" |
|
|
|
mc:Ignorable="d"> |
|
|
|
<hc:Window.Resources> |
|
|
|
<Style |
|
|
|
x:Key="充值" |
|
|
|
BasedOn="{StaticResource ButtonDefault}" |
|
|
|
TargetType="Button"> |
|
|
|
<Setter Property="Width" Value="75" /> |
|
|
|
<Setter Property="Height" Value="75" /> |
|
|
|
<Setter Property="Margin" Value="5" /> |
|
|
|
<Setter Property="Foreground" Value="Red" /> |
|
|
|
<Setter Property="FontSize" Value="18" /> |
|
|
|
</Style> |
|
|
|
<Style |
|
|
|
x:Key="操作" |
|
|
|
BasedOn="{StaticResource ButtonDefault}" |
|
|
|
TargetType="Button"> |
|
|
|
<Setter Property="Width" Value="120" /> |
|
|
|
<Setter Property="Height" Value="75" /> |
|
|
|
<Setter Property="Margin" Value="5" /> |
|
|
|
<Setter Property="Foreground" Value="Red" /> |
|
|
|
<Setter Property="FontSize" Value="18" /> |
|
|
|
</Style> |
|
|
|
</hc:Window.Resources> |
|
|
|
<hc:Window.InputBindings> |
|
|
|
<KeyBinding |
|
|
|
Key="F1" |
|
|
|
Command="{s:Action InputAction}" |
|
|
|
CommandParameter="50" /> |
|
|
|
<KeyBinding |
|
|
|
Key="F2" |
|
|
|
Command="{s:Action InputAction}" |
|
|
|
CommandParameter="100" /> |
|
|
|
<KeyBinding |
|
|
|
Key="F3" |
|
|
|
Command="{s:Action InputAction}" |
|
|
|
CommandParameter="200" /> |
|
|
|
<KeyBinding |
|
|
|
Key="F4" |
|
|
|
Command="{s:Action InputAction}" |
|
|
|
CommandParameter="500" /> |
|
|
|
<KeyBinding Key="F5" Command="{s:Action LockSreenAction}" /> |
|
|
|
</hc:Window.InputBindings> |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition /> |
|
|
|
<ColumnDefinition /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<StackPanel Margin="0,12,0,0"> |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition /> |
|
|
|
<ColumnDefinition /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<Border |
|
|
|
Width="100" |
|
|
|
Height="120" |
|
|
|
BorderBrush="BlanchedAlmond" |
|
|
|
BorderThickness="1"> |
|
|
|
<Border.Effect> |
|
|
|
<DropShadowEffect ShadowDepth="1" Color="Black" /> |
|
|
|
</Border.Effect> |
|
|
|
<Image |
|
|
|
<StackPanel |
|
|
|
HorizontalAlignment="Center" |
|
|
|
VerticalAlignment="Center" |
|
|
|
Visibility="{Binding CodeVisible}"> |
|
|
|
<TextBox |
|
|
|
Width="200" |
|
|
|
hc:InfoElement.Placeholder="请输入解锁码" |
|
|
|
Style="{StaticResource TextBoxExtend}" |
|
|
|
Text="{Binding LockCode}" /> |
|
|
|
<WrapPanel Margin="0,10,0,0" HorizontalAlignment="Center"> |
|
|
|
<Button |
|
|
|
Width="60" |
|
|
|
Height="40" |
|
|
|
Margin="0,0,10,0" |
|
|
|
Command="{s:Action UnLockAction}" |
|
|
|
Content="确定" |
|
|
|
FontSize="15" /> |
|
|
|
<Button |
|
|
|
Width="60" |
|
|
|
Height="40" |
|
|
|
Margin="10,0,0,0" |
|
|
|
Command="{s:Action ResetAction}" |
|
|
|
Content="取消" |
|
|
|
FontSize="15" /> |
|
|
|
</WrapPanel> |
|
|
|
</StackPanel> |
|
|
|
<Grid Visibility="{Binding ContentVisible}"> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition /> |
|
|
|
<ColumnDefinition /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<StackPanel Margin="0,12,0,0"> |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width=".4*" /> |
|
|
|
<ColumnDefinition Width=".6*" /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<Border |
|
|
|
Width="100" |
|
|
|
Height="120" |
|
|
|
Source="/HKResouces/头像.png" |
|
|
|
Stretch="UniformToFill" /> |
|
|
|
</Border> |
|
|
|
<StackPanel Grid.Column="1"> |
|
|
|
BorderBrush="BlanchedAlmond" |
|
|
|
BorderThickness="1"> |
|
|
|
<Border.Effect> |
|
|
|
<DropShadowEffect ShadowDepth="1" Color="Black" /> |
|
|
|
</Border.Effect> |
|
|
|
<Image |
|
|
|
Width="100" |
|
|
|
Height="120" |
|
|
|
Source="/HKResouces/头像.png" |
|
|
|
Stretch="UniformToFill" /> |
|
|
|
</Border> |
|
|
|
<StackPanel Grid.Column="1"> |
|
|
|
<WrapPanel> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="姓名:" /> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Foreground="Red" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="李四" /> |
|
|
|
</WrapPanel> |
|
|
|
<WrapPanel Margin="0,20,0,0"> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="手机:" /> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Foreground="Red" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="13812345678" /> |
|
|
|
</WrapPanel> |
|
|
|
<WrapPanel Margin="0,20,0,0"> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="员工号:" /> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Foreground="Red" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="001" /> |
|
|
|
</WrapPanel> |
|
|
|
</StackPanel> |
|
|
|
</Grid> |
|
|
|
<hc:Divider |
|
|
|
Content="卡信息" |
|
|
|
FontSize="16" |
|
|
|
FontWeight="Bold" /> |
|
|
|
<StackPanel Margin="20,0,0,0"> |
|
|
|
<WrapPanel> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="姓名:" /> |
|
|
|
Text="卡号:" /> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Foreground="Red" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="123456" /> |
|
|
|
</WrapPanel> |
|
|
|
<WrapPanel Margin="0,20,0,0"> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="卡状态:" /> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Foreground="Red" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="李四" /> |
|
|
|
Text="正常" /> |
|
|
|
</WrapPanel> |
|
|
|
<WrapPanel Margin="0,20,0,0"> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="手机:" /> |
|
|
|
Text="卡上余额:" /> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Foreground="Red" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="13812345678" /> |
|
|
|
Text="123456" /> |
|
|
|
</WrapPanel> |
|
|
|
<WrapPanel Margin="0,20,0,0"> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="员工号:" /> |
|
|
|
Text="启用日期:" /> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Foreground="Red" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="001" /> |
|
|
|
Text="2021-01-01" /> |
|
|
|
</WrapPanel> |
|
|
|
</StackPanel> |
|
|
|
</Grid> |
|
|
|
<hc:Divider |
|
|
|
Content="卡信息" |
|
|
|
FontSize="16" |
|
|
|
FontWeight="Bold" /> |
|
|
|
<StackPanel Margin="20,0,0,0"> |
|
|
|
</StackPanel> |
|
|
|
<StackPanel Grid.Column="1"> |
|
|
|
<hc:Divider |
|
|
|
Content="充值金额" |
|
|
|
FontSize="16" |
|
|
|
FontWeight="Bold" /> |
|
|
|
<TextBlock Margin="5,0,0,0" FontSize="15"> |
|
|
|
<Run Text="当前充值金额:" /> |
|
|
|
<Run Foreground="Red" Text="{Binding ShowMoney}" /> |
|
|
|
</TextBlock> |
|
|
|
<WrapPanel> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="卡号:" /> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Foreground="Red" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="123456" /> |
|
|
|
<Button |
|
|
|
Command="{s:Action InputAction}" |
|
|
|
CommandParameter="50" |
|
|
|
Style="{StaticResource 充值}"> |
|
|
|
<Button.Content> |
|
|
|
<StackPanel HorizontalAlignment="Center"> |
|
|
|
<TextBlock HorizontalAlignment="Center" Text="¥50" /> |
|
|
|
<TextBlock HorizontalAlignment="Center" Text="[F1]" /> |
|
|
|
</StackPanel> |
|
|
|
</Button.Content> |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
Command="{s:Action InputAction}" |
|
|
|
CommandParameter="100" |
|
|
|
Style="{StaticResource 充值}"> |
|
|
|
<Button.Content> |
|
|
|
<StackPanel HorizontalAlignment="Center"> |
|
|
|
<TextBlock HorizontalAlignment="Center" Text="¥100" /> |
|
|
|
<TextBlock HorizontalAlignment="Center" Text="[F2]" /> |
|
|
|
</StackPanel> |
|
|
|
</Button.Content> |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
Command="{s:Action InputAction}" |
|
|
|
CommandParameter="200" |
|
|
|
Style="{StaticResource 充值}"> |
|
|
|
<Button.Content> |
|
|
|
<StackPanel HorizontalAlignment="Center"> |
|
|
|
<TextBlock HorizontalAlignment="Center" Text="¥200" /> |
|
|
|
<TextBlock HorizontalAlignment="Center" Text="[F3]" /> |
|
|
|
</StackPanel> |
|
|
|
</Button.Content> |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
Command="{s:Action InputAction}" |
|
|
|
CommandParameter="500" |
|
|
|
Style="{StaticResource 充值}"> |
|
|
|
<Button.Content> |
|
|
|
<StackPanel HorizontalAlignment="Center"> |
|
|
|
<TextBlock HorizontalAlignment="Center" Text="¥500" /> |
|
|
|
<TextBlock HorizontalAlignment="Center" Text="[F4]" /> |
|
|
|
</StackPanel> |
|
|
|
</Button.Content> |
|
|
|
</Button> |
|
|
|
</WrapPanel> |
|
|
|
<WrapPanel Margin="0,20,0,0"> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="卡上余额:" /> |
|
|
|
<TextBlock |
|
|
|
FontSize="18" |
|
|
|
Foreground="Red" |
|
|
|
Style="{StaticResource TextBlockDefaultBold}" |
|
|
|
Text="123456" /> |
|
|
|
<TextBox |
|
|
|
Width="330" |
|
|
|
Margin="5,10,0,10" |
|
|
|
HorizontalAlignment="Left" |
|
|
|
hc:InfoElement.Placeholder="请输入自定义金额" |
|
|
|
Style="{StaticResource TextBoxExtend}"> |
|
|
|
<TextBox.Text> |
|
|
|
<Binding Path="InputMoney" UpdateSourceTrigger="PropertyChanged"> |
|
|
|
<Binding.ValidationRules> |
|
|
|
<local:ValidataRule /> |
|
|
|
</Binding.ValidationRules> |
|
|
|
</Binding> |
|
|
|
</TextBox.Text> |
|
|
|
</TextBox> |
|
|
|
<hc:Divider |
|
|
|
Content="操作" |
|
|
|
FontSize="16" |
|
|
|
FontWeight="Bold" /> |
|
|
|
<WrapPanel HorizontalAlignment="Center"> |
|
|
|
<Button |
|
|
|
Command="{s:Action SaveAction}" |
|
|
|
Content="确定[Enter]" |
|
|
|
IsDefault="True" |
|
|
|
Style="{StaticResource 操作}" /> |
|
|
|
<Button |
|
|
|
Command="{s:Action LockSreenAction}" |
|
|
|
Content="锁屏[F5]" |
|
|
|
IsDefault="True" |
|
|
|
Style="{StaticResource 操作}" /> |
|
|
|
</WrapPanel> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</hc:Window> |