|
@@ -0,0 +1,51 @@
|
|
|
+<UserControl x:Class="PLCTool.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:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
+ xmlns:pass="clr-namespace:PLCTool.Common.Extension"
|
|
|
+ xmlns:prism="http://prismlibrary.com/"
|
|
|
+ xmlns:local="clr-namespace:PLCTool.Views"
|
|
|
+ mc:Ignorable="d"
|
|
|
+ Width="600" Height="350">
|
|
|
+<prism:Dialog.WindowStyle>
|
|
|
+ <Style TargetType="Window">
|
|
|
+ <Setter Property="Width" Value="600" />
|
|
|
+ <Setter Property="Height" Value="350" />
|
|
|
+ <Setter Property="SizeToContent" Value="WidthAndHeight" />
|
|
|
+ <Setter Property="ResizeMode" Value="NoResize" />
|
|
|
+ <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
|
|
|
+ </Style>
|
|
|
+</prism:Dialog.WindowStyle>
|
|
|
+<Grid Background="White">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="1.5*" />
|
|
|
+ <ColumnDefinition />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Image Margin="50" Source="../Assets/Images/login.png" />
|
|
|
+ <DockPanel Margin="15" VerticalAlignment="Center" Grid.Column="1" >
|
|
|
+ <TextBlock Margin="0,10" DockPanel.Dock="Top" FontSize="22" FontWeight="Bold" Text="欢迎使用" HorizontalAlignment="Center"/>
|
|
|
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
|
|
|
+ <TextBlock Margin="0,10" Width="80" TextAlignment="Right" FontSize="16" FontWeight="Bold" Text="用户名:" />
|
|
|
+ <TextBox Margin="0,10" Width="120" Height="25" Text="{Binding UserName}" Cursor="IBeam" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
|
|
|
+ <TextBlock Margin="0,10" Width="80" TextAlignment="Right" FontSize="16" FontWeight="Bold" Text="密码:" />
|
|
|
+ <PasswordBox Margin="0,10" Width="120" Height="25" pass:PassWordExtensions.PassWord="{Binding PassWord, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ DockPanel.Dock="Top" Cursor="IBeam">
|
|
|
+ <i:Interaction.Behaviors>
|
|
|
+ <pass:PasswordBehavior/>
|
|
|
+ </i:Interaction.Behaviors>
|
|
|
+ <PasswordBox.InputBindings>
|
|
|
+
|
|
|
+ <KeyBinding Key="Enter" Command="{Binding ExecuteCommand}"
|
|
|
+ CommandParameter="Login"/>
|
|
|
+ </PasswordBox.InputBindings>
|
|
|
+ </PasswordBox>
|
|
|
+ </StackPanel>
|
|
|
+ <Button Command="{Binding ExecuteCommand}" CommandParameter="Login" Content="登录系统" DockPanel.Dock="Top" Style="{StaticResource NormalButtonStyle}" Cursor="Hand" />
|
|
|
+ </DockPanel>
|
|
|
+ <Border BorderBrush="AliceBlue" BorderThickness="0.5" Grid.Column="1"/>
|
|
|
+ </Grid>
|
|
|
+</UserControl>
|