2024-03-11 05:12:02 +00:00
|
|
|
<UserControl x:Class="InSituLaboratory.Views.LoginView"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:local="clr-namespace:InSituLaboratory.Views"
|
|
|
|
|
xmlns:b="clr-namespace:InSituLaboratory.Base"
|
|
|
|
|
xmlns:c="clr-namespace:InSituLaboratory.Controls;assembly=InSituLaboratory.Controls"
|
|
|
|
|
mc:Ignorable="d"
|
2024-04-10 09:50:54 +00:00
|
|
|
FontFamily="{StaticResource DigitalDisplay}"
|
2024-03-11 05:12:02 +00:00
|
|
|
Height="400" Width="650">
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
<Style TargetType="TextBox">
|
|
|
|
|
<Setter Property="FontSize" Value="14"/>
|
|
|
|
|
<Setter Property="Height" Value="30"/>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="TextBox">
|
|
|
|
|
<Border BorderBrush="#DDD" BorderThickness="0,0,0,1"
|
|
|
|
|
Name="border" Background="White">
|
|
|
|
|
<Grid>
|
|
|
|
|
<TextBlock Text="账号/手机号/邮箱"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Foreground="#DDD"
|
|
|
|
|
Name="markText" Visibility="Collapsed"
|
|
|
|
|
FontSize="12" Margin="3,0"/>
|
|
|
|
|
<ScrollViewer x:Name="PART_ContentHost" Focusable="false"
|
|
|
|
|
HorizontalScrollBarVisibility="Hidden"
|
|
|
|
|
VerticalScrollBarVisibility="Hidden"
|
|
|
|
|
VerticalAlignment="Center" MinHeight="20"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="BorderBrush" Value="#0b3d90" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsKeyboardFocused" Value="True">
|
|
|
|
|
<Setter Property="BorderBrush" Value="#0b3d90" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<DataTrigger Binding="{Binding Path=Text,RelativeSource={RelativeSource Self}}"
|
|
|
|
|
Value="">
|
|
|
|
|
<Setter TargetName="markText" Property="Visibility" Value="Visible"/>
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="PasswordBox">
|
|
|
|
|
<Setter Property="FontSize" Value="14"/>
|
|
|
|
|
<Setter Property="Height" Value="30"/>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="PasswordBox">
|
|
|
|
|
<Border BorderBrush="#DDD" BorderThickness="0,0,0,1"
|
|
|
|
|
Name="border" Background="White">
|
|
|
|
|
<Grid>
|
|
|
|
|
<TextBlock Text="请输入用户密码"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Foreground="#DDD"
|
|
|
|
|
Name="markText" Visibility="Collapsed"
|
|
|
|
|
FontSize="12" Margin="3,0"/>
|
|
|
|
|
<ScrollViewer x:Name="PART_ContentHost" Focusable="false"
|
|
|
|
|
HorizontalScrollBarVisibility="Hidden"
|
|
|
|
|
VerticalScrollBarVisibility="Hidden"
|
|
|
|
|
VerticalAlignment="Center" MinHeight="20"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="BorderBrush" Value="#0b3d90" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsKeyboardFocused" Value="True">
|
|
|
|
|
<Setter Property="BorderBrush" Value="#0b3d90" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<!--<DataTrigger Binding="{Binding Path=Password,RelativeSource={RelativeSource Self}}"-->
|
|
|
|
|
<DataTrigger Binding="{Binding Path=Password}" Value="">
|
|
|
|
|
<Setter TargetName="markText" Property="Visibility" Value="Visible"/>
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="Button">
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Border CornerRadius="3" Background="DarkOrange" Name="border">
|
|
|
|
|
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="orange" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#99FF0F00" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<BooleanToVisibilityConverter x:Key="b2v"/>
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.Effect>
|
|
|
|
|
<BlurEffect Radius="{Binding BlurValue}"/>
|
|
|
|
|
</Grid.Effect>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition/>
|
|
|
|
|
<ColumnDefinition/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
<Image Source="/InSituLaboratory.Assets;component/Images/login_back.jpg"/>
|
|
|
|
|
|
|
|
|
|
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,60,0,0">
|
|
|
|
|
<TextBlock Text="欢迎使用" Foreground="#AAFFFFFF"/>
|
|
|
|
|
<TextBlock Text="原位实验室主控系统" Foreground="White" FontSize="15" Margin="0,10"/>
|
|
|
|
|
<TextBlock Text="v1.0" Foreground="#5FFF"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="2024 © ZTT" Foreground="#88FFFFFF" VerticalAlignment="Bottom" HorizontalAlignment="Center" FontSize="8" Margin="0,5"/>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Column="1" VerticalAlignment="Center" Margin="30,0,30,20">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition Height="auto"/>
|
|
|
|
|
<RowDefinition Height="auto"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<TextBlock Text="用户登录" Foreground="#0b3d90" FontSize="13" Margin="0,10" FontWeight="Normal"/>
|
|
|
|
|
<TextBlock Text="用户名" Grid.Row="1" Foreground="#CC0b3d90" Margin="0,10,0,5" FontWeight="Normal"/>
|
|
|
|
|
<TextBox Grid.Row="2" Text="{Binding UserName}"/>
|
|
|
|
|
<TextBlock Text="密码" Grid.Row="3" Foreground="#CC0b3d90" Margin="0,10,0,5" FontWeight="Normal"/>
|
|
|
|
|
<PasswordBox Grid.Row="4" b:PasswordEx.Password="{Binding Password,Mode=TwoWay}"/>
|
|
|
|
|
<CheckBox Content="记住密码" Foreground="#BBB" VerticalAlignment="Center" HorizontalAlignment="Left" VerticalContentAlignment="Center" FontSize="11" Grid.Row="5" IsChecked="{Binding IsRecord}" Margin="0,5"/>
|
|
|
|
|
<Button Content="登 录" Grid.Row="6" Foreground="White" Height="28" Margin="0,10,0,5" Command="{Binding LoginCommand}"/>
|
|
|
|
|
<TextBlock Text="{Binding ErrorInfo}" Foreground="Red" Grid.Row="7" TextAlignment="Center" TextWrapping="Wrap"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<Border Background="Transparent" Visibility="{Binding IsShowLoading,Converter={StaticResource b2v}}"/>
|
|
|
|
|
<c:Loading Width="60" Visibility="{Binding IsShowLoading,Converter={StaticResource b2v}}"/>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</UserControl>
|