|
- <hc:Window
- x:Class="HKCardIN.Views.RootView"
- 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: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"
- x:Name="Root"
- Title="海科智慧一卡通平台"
- Width="800"
- 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>
- <Style
- x:Key="Title"
- BasedOn="{StaticResource TextBlockDefaultBold}"
- TargetType="TextBlock">
- <Setter Property="Foreground" Value="WhiteSmoke" />
- </Style>
- </hc:Window.Resources>
- <hc:Window.Background>
- <ImageBrush ImageSource="/HKResouces/背景.jpg" />
- </hc:Window.Background>
- <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>
- <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 Width="13" />
- <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"
- 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 Title}"
- Text="姓名:" />
- <TextBlock
- FontSize="18"
- Foreground="Red"
- Style="{StaticResource TextBlockDefaultBold}"
- Text="李四" />
- </WrapPanel>
- <WrapPanel Margin="0,20,0,0">
- <TextBlock
- FontSize="18"
- Style="{StaticResource Title}"
- Text="手机:" />
- <TextBlock
- FontSize="18"
- Foreground="Red"
- Style="{StaticResource TextBlockDefaultBold}"
- Text="13812345678" />
- </WrapPanel>
- <WrapPanel Margin="0,20,0,0">
- <TextBlock
- FontSize="18"
- Style="{StaticResource Title}"
- Text="员工号:" />
- <TextBlock
- FontSize="18"
- Foreground="Red"
- Style="{StaticResource TextBlockDefaultBold}"
- Text="001" />
- </WrapPanel>
- </StackPanel>
- </Grid>
- <hc:Divider
- Content="卡信息"
- FontSize="16"
- FontWeight="Bold"
- Foreground="WhiteSmoke" />
- <StackPanel Margin="20,0,0,0">
- <WrapPanel>
- <TextBlock
- FontSize="18"
- Style="{StaticResource Title}"
- Text="卡号:" />
- <TextBlock
- FontSize="18"
- Foreground="Red"
- Style="{StaticResource TextBlockDefaultBold}"
- Text="123456" />
- </WrapPanel>
- <WrapPanel Margin="0,20,0,0">
- <TextBlock
- FontSize="18"
- Style="{StaticResource Title}"
- Text="卡状态:" />
- <TextBlock
- FontSize="18"
- Foreground="Red"
- Style="{StaticResource TextBlockDefaultBold}"
- Text="正常" />
- </WrapPanel>
- <WrapPanel Margin="0,20,0,0">
- <TextBlock
- FontSize="18"
- Style="{StaticResource Title}"
- Text="卡上余额:" />
- <TextBlock
- FontSize="18"
- Foreground="Red"
- Style="{StaticResource TextBlockDefaultBold}"
- Text="123456" />
- </WrapPanel>
- <WrapPanel Margin="0,20,0,0">
- <TextBlock
- FontSize="18"
- Style="{StaticResource Title}"
- Text="启用日期:" />
- <TextBlock
- FontSize="18"
- Foreground="Red"
- Style="{StaticResource TextBlockDefaultBold}"
- Text="2021-01-01" />
- </WrapPanel>
- </StackPanel>
- </StackPanel>
- <hc:Divider
- Grid.Column="1"
- Height="{Binding ActualHeight, ElementName=Root}"
- Orientation="Vertical" />
- <StackPanel Grid.Column="2">
- <hc:Divider
- Content="充值金额"
- FontSize="16"
- FontWeight="Bold"
- Foreground="WhiteSmoke" />
- <TextBlock
- Margin="5,0,0,0"
- FontSize="18"
- Style="{StaticResource Title}">
- <Run Foreground="WhiteSmoke" Text="当前充值金额:" />
- <Run Foreground="Red" Text="{Binding ShowMoney}" />
- </TextBlock>
- <WrapPanel HorizontalAlignment="Center">
- <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 HorizontalAlignment="Center">
- <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>
- </WrapPanel>
- <hc:Divider
- Content="操作"
- FontSize="16"
- FontWeight="Bold"
- Foreground="WhiteSmoke" />
- <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>
- </Grid>
- </Grid>
- </hc:Window>
|