XiangTanReport/DM_Weight/Views/LoginWindow.xaml

206 lines
11 KiB
Plaintext
Raw Normal View History

2025-07-28 15:29:09 +08:00
<!--登录界面-->
<UserControl x:Class="DM_Weight.Views.LoginWindow"
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"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
FontFamily="{DynamicResource MaterialDesignFont}"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d">
<UserControl.Background>
<ImageBrush ImageSource="/Images/body-bg.jpg" Stretch="Fill"/>
</UserControl.Background>
<Grid>
<!--<i:Interaction.Triggers>
<i:KeyTrigger Key="Enter">
<i:InvokeCommandAction Command="{Binding LoginCommand}" />
</i:KeyTrigger>
</i:Interaction.Triggers>-->
<Grid.RowDefinitions >
<RowDefinition Height="2*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="6*"></RowDefinition>
<RowDefinition Height="3*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="17*"/>
<ColumnDefinition Width="66*"/>
<ColumnDefinition Width="17*"/>
</Grid.ColumnDefinitions>
<materialDesign:Card Margin="16" Grid.Row="2" Grid.Column="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="7*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions >
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="2*"></RowDefinition>
<RowDefinition Height="2*"></RowDefinition>
<RowDefinition Height="7*"></RowDefinition>
</Grid.RowDefinitions>
<TextBlock
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="28"
Foreground="#31ccec"
FontWeight="Bold"
Text="欢迎登录毒麻药品管理系统">
</TextBlock>
<TextBlock
Grid.Row="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="14"
Foreground="#31ccec"
FontWeight="Bold"
Text="登录方式1账号密码登录">
</TextBlock>
<Grid Grid.Row="3" >
<Grid.RowDefinitions >
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBox
Grid.Row="0"
Grid.Column="1"
x:Name="account"
Text="{Binding Username, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource MaterialDesignOutlinedTextBox}"
VerticalAlignment="Top"
AcceptsReturn="False"
TextWrapping="Wrap"
materialDesign:HintAssist.Hint="账号" />
<PasswordBox
Grid.Row="1"
Grid.Column="1"
x:Name="PasswordBox"
materialDesign:PasswordBoxAssist.Password="{Binding Password, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Style="{StaticResource MaterialDesignOutlinedPasswordBox}"
VerticalAlignment="Top"
materialDesign:HintAssist.Hint="密码" />
<StackPanel Grid.Row="2"
Grid.Column="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button
Grid.Column="1"
Style="{StaticResource MaterialDesignRaisedButton}"
materialDesign:ButtonAssist.CornerRadius="5"
Command="{ Binding LoginCommand }"
Background="#42a5f5"
BorderBrush="#42a5f5" Cursor="Hand" IsDefault="True" Content="登录"/>
<Button
Grid.Column="3"
Style="{StaticResource MaterialDesignRaisedLightButton}"
Background="#7986cb"
BorderBrush="#7986cb"
materialDesign:ButtonAssist.CornerRadius="5" Cursor="Hand" IsCancel="true"
Command="{ Binding ExitCommand }" >
<TextBlock Foreground="{DynamicResource MaterialDesignPaper}" Text="退出" />
</Button>
</Grid>
</StackPanel>
</Grid>
</Grid>
<Grid Grid.Column="1">
<Grid.Background>
<ImageBrush ImageSource="/Images/finger-bg-r.png" Stretch="Fill"/>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="3*"></RowDefinition>
<RowDefinition Height="2*"></RowDefinition>
<RowDefinition Height="7*"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0"></StackPanel>
<!--<TextBlock
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="14"
FontWeight="Bold"
Foreground="{DynamicResource MaterialDesignPaper}"
Text="登录方式2屏幕外右侧指纹登录">
</TextBlock>-->
<!--<StackPanel Grid.Row="2"></StackPanel>
<StackPanel Grid.Row="3" Visibility="{Binding SingleLogin, Converter={StaticResource BooleanToVisibilityConverter}}">
<materialDesign:PackIcon
Kind="Fingerprint"
Foreground="{DynamicResource MaterialDesignPaper}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="75"
Height="75"
/>
</StackPanel>-->
<Grid Grid.Row="2" Visibility="{Binding MultiLogin, Converter={StaticResource BooleanToVisibilityConverter}}">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0"
FontSize="14"
FontWeight="Bold"
Foreground="{DynamicResource MaterialDesignPaper}"
Grid.Column="1" Text="发药人:" />
<TextBlock
FontSize="14"
FontWeight="Bold"
Foreground="{DynamicResource MaterialDesignPaper}"
Grid.Row="0" Grid.Column="2" Text="{Binding Operator.Nickname}" />
<TextBlock
FontSize="14"
FontWeight="Bold"
Foreground="{DynamicResource MaterialDesignPaper}"
Grid.Row="1" Grid.Column="1" Text="审核人:" />
<TextBlock
FontSize="14"
FontWeight="Bold"
Foreground="{DynamicResource MaterialDesignPaper}"
Grid.Row="1" Grid.Column="2" Text="{Binding Reviewer.Nickname}" />
</Grid>
</Grid>
</Grid>
</materialDesign:Card>
<!--<StackPanel Orientation="Vertical" Grid.Row="4" Grid.Column="2">
<TextBlock Visibility="{Binding DrawerPortMsg, Converter={StaticResource BooleanToVisibilityConverter}}" Text="抽屉串口连接失败" />
<TextBlock Visibility="{Binding CanBusPortMsg, Converter={StaticResource BooleanToVisibilityConverter}}" Text="can总线串口连接失败" />
<TextBlock Visibility="{Binding FingerMsg, Converter={StaticResource BooleanToVisibilityConverter}}" Text="指纹机连接失败" />
--><!--<TextBlock Visibility="{Binding HIKMsg, Converter={StaticResource BooleanToVisibilityConverter}}" Text="录像机登录失败" />-->
<!--<TextBlock Visibility="{Binding FridgePortMsg, Converter={StaticResource BooleanToVisibilityConverter}}" Text="冰箱串口连接失败" />--><!--
</StackPanel>-->
</Grid>
</UserControl>