|
@@ -1,15 +1,16 @@
|
|
|
-<UserControl x:Class="TeamAAS_VP.Views.User.LoginView"
|
|
|
|
|
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
- xmlns:prism="http://prismlibrary.com/"
|
|
|
|
|
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
|
|
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
- xmlns:lex="http://wpflocalizeextension.codeplex.com"
|
|
|
|
|
- lex:LocalizeDictionary.DesignCulture="zh-CN"
|
|
|
|
|
- lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
|
|
|
|
|
- lex:ResxLocalizationProvider.DefaultDictionary="Lang"
|
|
|
|
|
- prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
|
|
- FontFamily="{DynamicResource DefaultFont}">
|
|
|
|
|
|
|
+<UserControl
|
|
|
|
|
+ x:Class="TeamAAS_VP.Views.User.LoginView"
|
|
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
+ xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
+ xmlns:lex="http://wpflocalizeextension.codeplex.com"
|
|
|
|
|
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
|
|
+ xmlns:prism="http://prismlibrary.com/"
|
|
|
|
|
+ lex:LocalizeDictionary.DesignCulture="zh-CN"
|
|
|
|
|
+ lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
|
|
|
|
|
+ lex:ResxLocalizationProvider.DefaultDictionary="Lang"
|
|
|
|
|
+ prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
|
|
+ FontFamily="{DynamicResource DefaultFont}">
|
|
|
<b:Interaction.Triggers>
|
|
<b:Interaction.Triggers>
|
|
|
<b:EventTrigger EventName="Loaded">
|
|
<b:EventTrigger EventName="Loaded">
|
|
|
<b:InvokeCommandAction Command="{Binding LoadedCommand}" />
|
|
<b:InvokeCommandAction Command="{Binding LoadedCommand}" />
|
|
@@ -17,9 +18,10 @@
|
|
|
</b:Interaction.Triggers>
|
|
</b:Interaction.Triggers>
|
|
|
<Viewbox Stretch="Uniform">
|
|
<Viewbox Stretch="Uniform">
|
|
|
<Grid>
|
|
<Grid>
|
|
|
- <materialDesign:Card UniformCornerRadius="50"
|
|
|
|
|
- Width="400"
|
|
|
|
|
- Margin="0,50,0,50">
|
|
|
|
|
|
|
+ <materialDesign:Card
|
|
|
|
|
+ Width="400"
|
|
|
|
|
+ Margin="0,50,0,50"
|
|
|
|
|
+ UniformCornerRadius="50">
|
|
|
<materialDesign:Card.Resources>
|
|
<materialDesign:Card.Resources>
|
|
|
<!--<Style TargetType="TextBlock">
|
|
<!--<Style TargetType="TextBlock">
|
|
|
<Setter Property="Foreground"
|
|
<Setter Property="Foreground"
|
|
@@ -34,36 +36,41 @@
|
|
|
<RowDefinition Height="20*" />
|
|
<RowDefinition Height="20*" />
|
|
|
<RowDefinition Height="20*" />
|
|
<RowDefinition Height="20*" />
|
|
|
</Grid.RowDefinitions>
|
|
</Grid.RowDefinitions>
|
|
|
- <TextBlock Text="{lex:Loc 登录}"
|
|
|
|
|
- FontSize="32"
|
|
|
|
|
- HorizontalAlignment="Center" />
|
|
|
|
|
- <materialDesign:PackIcon Grid.Row="1"
|
|
|
|
|
- Kind="User"
|
|
|
|
|
- VerticalAlignment="Center" />
|
|
|
|
|
- <ComboBox Grid.Row="1"
|
|
|
|
|
- Height="50"
|
|
|
|
|
- Margin="20"
|
|
|
|
|
- materialDesign:HintAssist.Hint="{lex:Loc 用户}"
|
|
|
|
|
- HorizontalContentAlignment="Left"
|
|
|
|
|
- Style="{StaticResource MaterialDesignFloatingHintComboBox}"
|
|
|
|
|
- ItemsSource="{Binding UserNameList,Mode=TwoWay}"
|
|
|
|
|
- SelectedItem="{Binding SelectedUserName}">
|
|
|
|
|
- </ComboBox>
|
|
|
|
|
- <materialDesign:PackIcon Grid.Row="2"
|
|
|
|
|
- Kind="Password"
|
|
|
|
|
- VerticalAlignment="Center"/>
|
|
|
|
|
- <PasswordBox Grid.Row="2"
|
|
|
|
|
- Height="50"
|
|
|
|
|
- Margin="20,0,20,0"
|
|
|
|
|
- HorizontalContentAlignment="Left"
|
|
|
|
|
- Style="{StaticResource MaterialDesignFloatingHintPasswordBox}"
|
|
|
|
|
- materialDesign:HintAssist.HelperText="{lex:Loc 请输入用户登录密码}"
|
|
|
|
|
- materialDesign:HintAssist.Hint="{lex:Loc 密码}"
|
|
|
|
|
- materialDesign:TextFieldAssist.HasClearButton="True"
|
|
|
|
|
- materialDesign:PasswordBoxAssist.Password="{Binding Path=UserPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}"/>
|
|
|
|
|
- <Grid Grid.Row="3"
|
|
|
|
|
- Height="40"
|
|
|
|
|
- Margin="20,5,20,0">
|
|
|
|
|
|
|
+ <TextBlock
|
|
|
|
|
+ HorizontalAlignment="Center"
|
|
|
|
|
+ FontSize="32"
|
|
|
|
|
+ Text="{lex:Loc 登录}" />
|
|
|
|
|
+ <materialDesign:PackIcon
|
|
|
|
|
+ Grid.Row="1"
|
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
|
+ Kind="User" />
|
|
|
|
|
+ <ComboBox
|
|
|
|
|
+ Grid.Row="1"
|
|
|
|
|
+ Height="50"
|
|
|
|
|
+ Margin="20"
|
|
|
|
|
+ HorizontalContentAlignment="Left"
|
|
|
|
|
+ materialDesign:HintAssist.Hint="{lex:Loc 用户}"
|
|
|
|
|
+ ItemsSource="{Binding UserNameList, Mode=TwoWay}"
|
|
|
|
|
+ SelectedItem="{Binding SelectedUserName}"
|
|
|
|
|
+ Style="{StaticResource MaterialDesignFloatingHintComboBox}" />
|
|
|
|
|
+ <materialDesign:PackIcon
|
|
|
|
|
+ Grid.Row="2"
|
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
|
+ Kind="Password" />
|
|
|
|
|
+ <PasswordBox
|
|
|
|
|
+ Grid.Row="2"
|
|
|
|
|
+ Height="50"
|
|
|
|
|
+ Margin="20,0,20,0"
|
|
|
|
|
+ HorizontalContentAlignment="Left"
|
|
|
|
|
+ materialDesign:HintAssist.HelperText="{lex:Loc 请输入用户登录密码}"
|
|
|
|
|
+ materialDesign:HintAssist.Hint="{lex:Loc 密码}"
|
|
|
|
|
+ materialDesign:PasswordBoxAssist.Password="{Binding Path=UserPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}"
|
|
|
|
|
+ materialDesign:TextFieldAssist.HasClearButton="True"
|
|
|
|
|
+ Style="{StaticResource MaterialDesignFloatingHintPasswordBox}" />
|
|
|
|
|
+ <Grid
|
|
|
|
|
+ Grid.Row="3"
|
|
|
|
|
+ Height="40"
|
|
|
|
|
+ Margin="20,5,20,0">
|
|
|
<!--<CheckBox Content="{lex:Loc 记住用户}"
|
|
<!--<CheckBox Content="{lex:Loc 记住用户}"
|
|
|
Foreground="Black"
|
|
Foreground="Black"
|
|
|
Style="{StaticResource MaterialDesignCheckBox}"
|
|
Style="{StaticResource MaterialDesignCheckBox}"
|
|
@@ -77,29 +84,30 @@
|
|
|
Foreground="Black"
|
|
Foreground="Black"
|
|
|
Command="{Binding SignUpCommand}"/>-->
|
|
Command="{Binding SignUpCommand}"/>-->
|
|
|
</Grid>
|
|
</Grid>
|
|
|
- <Button Grid.Row="4"
|
|
|
|
|
- Margin="20,10"
|
|
|
|
|
- VerticalAlignment="Top"
|
|
|
|
|
- materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
|
|
- Command="{Binding LoginCommand}">
|
|
|
|
|
|
|
+ <Button
|
|
|
|
|
+ Grid.Row="4"
|
|
|
|
|
+ Margin="20,10"
|
|
|
|
|
+ VerticalAlignment="Top"
|
|
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
|
|
+ Command="{Binding LoginCommand}">
|
|
|
<StackPanel Orientation="Horizontal">
|
|
<StackPanel Orientation="Horizontal">
|
|
|
<materialDesign:PackIcon Kind="Login" />
|
|
<materialDesign:PackIcon Kind="Login" />
|
|
|
- <TextBlock Text="{lex:Loc 登录}"
|
|
|
|
|
- Margin="20,0,0,0" />
|
|
|
|
|
|
|
+ <TextBlock Margin="20,0,0,0" Text="{lex:Loc 登录}" />
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
</Button>
|
|
</Button>
|
|
|
- <Button Grid.Row="4"
|
|
|
|
|
- Margin="0,55,0,0"
|
|
|
|
|
- Height="50"
|
|
|
|
|
- Width="50"
|
|
|
|
|
- materialDesign:ButtonAssist.CornerRadius="5"
|
|
|
|
|
- HorizontalAlignment="Center"
|
|
|
|
|
- VerticalAlignment="Center"
|
|
|
|
|
- ToolTip="刷卡登录"
|
|
|
|
|
- Padding="0"
|
|
|
|
|
- Command="{Binding CardLoginCommand}"
|
|
|
|
|
- Visibility="{Binding CardBtnVisibility}"
|
|
|
|
|
- IsEnabled="{Binding IsLogining,Converter={StaticResource InvertBooleanConverter}}">
|
|
|
|
|
|
|
+ <Button
|
|
|
|
|
+ Grid.Row="4"
|
|
|
|
|
+ Width="50"
|
|
|
|
|
+ Height="50"
|
|
|
|
|
+ Margin="0,55,0,0"
|
|
|
|
|
+ Padding="0"
|
|
|
|
|
+ HorizontalAlignment="Center"
|
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="5"
|
|
|
|
|
+ Command="{Binding CardLoginCommand}"
|
|
|
|
|
+ IsEnabled="{Binding IsLogining, Converter={StaticResource InvertBooleanConverter}}"
|
|
|
|
|
+ ToolTip="刷卡登录"
|
|
|
|
|
+ Visibility="{Binding CardBtnVisibility}">
|
|
|
<Button.Content>
|
|
<Button.Content>
|
|
|
<materialDesign:PackIcon Kind="CreditCardScanOutline" />
|
|
<materialDesign:PackIcon Kind="CreditCardScanOutline" />
|
|
|
</Button.Content>
|
|
</Button.Content>
|
|
@@ -107,6 +115,6 @@
|
|
|
</Grid>
|
|
</Grid>
|
|
|
</materialDesign:Card>
|
|
</materialDesign:Card>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</Viewbox>
|
|
</Viewbox>
|
|
|
</UserControl>
|
|
</UserControl>
|