172 lines
10 KiB
Plaintext
172 lines
10 KiB
Plaintext
|
|
<Window x:Class="Cowain.Bake.UI.Home.Views.LoginView"
|
|||
|
|
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:local="clr-namespace:Cowain.Bake.UI.Home.Views"
|
|||
|
|
xmlns:prism="http://prismlibrary.com/"
|
|||
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|||
|
|
xmlns:pwdHelper="clr-namespace:Cowain.Bake.Common;assembly=Cowain.Bake.Common"
|
|||
|
|
mc:Ignorable="d" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
|
|||
|
|
Title="登录" Height="500" Width="830">
|
|||
|
|
<Window.Background>
|
|||
|
|
<ImageBrush ImageSource="pack://application:,,,/Cowain.Bake.Common;component/Images/Cowain.jpg" Stretch="UniformToFill"/>
|
|||
|
|
</Window.Background>
|
|||
|
|
|
|||
|
|
<Window.Resources>
|
|||
|
|
<ResourceDictionary>
|
|||
|
|
<ResourceDictionary.MergedDictionaries>
|
|||
|
|
<ResourceDictionary Source="pack://application:,,,/Cowain.Bake.Common;component/Styles/BaseResources.xaml"/>
|
|||
|
|
<ResourceDictionary Source="pack://application:,,,/Cowain.Bake.Common;component/Styles/ButtonStyles.xaml"/>
|
|||
|
|
|
|||
|
|
<ResourceDictionary>
|
|||
|
|
<ControlTemplate TargetType="TextBox" x:Key="UserNameTextBoxTemplate">
|
|||
|
|
<Border CornerRadius="5" BorderBrush="#DDD" BorderThickness="1">
|
|||
|
|
<Grid>
|
|||
|
|
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="30"/>
|
|||
|
|
<ColumnDefinition/>
|
|||
|
|
<ColumnDefinition Width="10"/>
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Text="" FontFamily="{StaticResource Iconfont}" Margin="0,2,0,0"
|
|||
|
|
FontSize="18" Foreground="#BBB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|||
|
|
<ScrollViewer x:Name="PART_ContentHost" Grid.Column="1" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"
|
|||
|
|
/>
|
|||
|
|
</Grid>
|
|||
|
|
|
|||
|
|
</Border>
|
|||
|
|
</ControlTemplate>
|
|||
|
|
<ControlTemplate TargetType="TextBox" x:Key="Machine2TextBoxTemplate">
|
|||
|
|
<Border CornerRadius="5" BorderBrush="#DDD" BorderThickness="1">
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="14.974"/>
|
|||
|
|
<ColumnDefinition Width="15.026"/>
|
|||
|
|
<ColumnDefinition/>
|
|||
|
|
<ColumnDefinition Width="30"/>
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Text="" FontFamily="{StaticResource Iconfont}" Margin="0,8,0,0"
|
|||
|
|
FontSize="18" Foreground="#BBB" HorizontalAlignment="Center" Grid.ColumnSpan="2"/>
|
|||
|
|
<ScrollViewer x:Name="PART_ContentHost" Grid.Column="2" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"
|
|||
|
|
/>
|
|||
|
|
</Grid>
|
|||
|
|
</Border>
|
|||
|
|
</ControlTemplate>
|
|||
|
|
<ControlTemplate TargetType="TextBox" x:Key="Machine1TextBoxTemplate">
|
|||
|
|
<Border CornerRadius="5" BorderBrush="#DDD" BorderThickness="1">
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="30"/>
|
|||
|
|
<ColumnDefinition/>
|
|||
|
|
<ColumnDefinition Width="30"/>
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Text="" FontFamily="{StaticResource Iconfont}" Margin="0,2,0,0"
|
|||
|
|
FontSize="18" Foreground="#BBB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|||
|
|
<ScrollViewer x:Name="PART_ContentHost" Grid.Column="1" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"
|
|||
|
|
/>
|
|||
|
|
</Grid>
|
|||
|
|
</Border>
|
|||
|
|
</ControlTemplate>
|
|||
|
|
|
|||
|
|
<!--Style 包含 ControlTemplate:Template-->
|
|||
|
|
<ControlTemplate TargetType="PasswordBox" x:Key="PasswordBoxTemplate">
|
|||
|
|
<Border CornerRadius="5" BorderBrush="#DDD" BorderThickness="1">
|
|||
|
|
<Grid>
|
|||
|
|
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="20"/>
|
|||
|
|
<ColumnDefinition/>
|
|||
|
|
<ColumnDefinition Width="10"/>
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Text="" FontFamily="{StaticResource Iconfont}" Margin="0,2,0,0"
|
|||
|
|
FontSize="26" Foreground="#BBB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|||
|
|
|
|||
|
|
<ScrollViewer x:Name="PART_ContentHost" Grid.Column="1" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"
|
|||
|
|
/>
|
|||
|
|
</Grid>
|
|||
|
|
</Border>
|
|||
|
|
</ControlTemplate>
|
|||
|
|
|
|||
|
|
<Style TargetType="Hyperlink">
|
|||
|
|
<Setter Property="Foreground" Value="#AAA"/>
|
|||
|
|
<Setter Property="TextBlock.TextDecorations" Value="{x:Null}"/>
|
|||
|
|
<Style.Triggers>
|
|||
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|||
|
|
<Setter Property="Foreground" Value="#999"/>
|
|||
|
|
</Trigger>
|
|||
|
|
</Style.Triggers>
|
|||
|
|
</Style>
|
|||
|
|
|
|||
|
|
<ControlTemplate TargetType="Button" x:Key="LoginButtonTemplate">
|
|||
|
|
<Grid>
|
|||
|
|
<Border CornerRadius="5">
|
|||
|
|
<Border.Background>
|
|||
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
|||
|
|
<GradientStop Color="#FF0ABEFF" Offset="0"/>
|
|||
|
|
<GradientStop Color="#FF00B4FA" Offset="1"/>
|
|||
|
|
</LinearGradientBrush>
|
|||
|
|
</Border.Background>
|
|||
|
|
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|||
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|||
|
|
/>
|
|||
|
|
</Border>
|
|||
|
|
<Border CornerRadius="3" Name="mask"/>
|
|||
|
|
</Grid>
|
|||
|
|
<ControlTemplate.Triggers>
|
|||
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|||
|
|
<Setter Property="Background" Value="#22FFFFFF" TargetName="mask"/>
|
|||
|
|
</Trigger>
|
|||
|
|
<Trigger Property="IsPressed" Value="True">
|
|||
|
|
<Setter Property="Background" Value="#11000000" TargetName="mask"/>
|
|||
|
|
</Trigger>
|
|||
|
|
</ControlTemplate.Triggers>
|
|||
|
|
</ControlTemplate>
|
|||
|
|
</ResourceDictionary>
|
|||
|
|
</ResourceDictionary.MergedDictionaries>
|
|||
|
|
</ResourceDictionary>
|
|||
|
|
|
|||
|
|
</Window.Resources>
|
|||
|
|
<WindowChrome.WindowChrome>
|
|||
|
|
<WindowChrome NonClientFrameEdges="None" GlassFrameThickness="-1" ResizeBorderThickness="1"/>
|
|||
|
|
</WindowChrome.WindowChrome>
|
|||
|
|
<Grid>
|
|||
|
|
<Viewbox Stretch="Uniform">
|
|||
|
|
<Canvas Width="830" Height="500">
|
|||
|
|
|
|||
|
|
<TextBlock Text="得壹二期自动真空烘烤系统" Width="830" Height="500" Margin="0,39,0,0" TextAlignment="Center"
|
|||
|
|
HorizontalAlignment="Center" Foreground="White" FontSize="32">
|
|||
|
|
<TextBlock.Effect>
|
|||
|
|
<DropShadowEffect BlurRadius="15" ShadowDepth="10" Direction="265" Opacity="0.5" Color="Gray"/>
|
|||
|
|
</TextBlock.Effect>
|
|||
|
|
</TextBlock>
|
|||
|
|
|
|||
|
|
<Image Source="pack://application:,,,/Cowain.Bake.Common;component/Images/CowainLogo.png" Width="194" Height="28"
|
|||
|
|
Canvas.Left="320" Canvas.Top="0" />
|
|||
|
|
|
|||
|
|
|
|||
|
|
<Button Content="" Style="{StaticResource IconButtonStyle}"
|
|||
|
|
Height="28" Background="Transparent" Click="Min_Button_Click" Margin="770,0,0.2,0"/>
|
|||
|
|
<Button Content="" Style="{StaticResource IconButtonStyle}"
|
|||
|
|
Height="28" Background="Transparent" Click="Button_Click" Margin="800,0,0.2,0"/>
|
|||
|
|
|
|||
|
|
<TextBox Text="{Binding UserName,UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
Height="25" FontSize="14" Background="Transparent" Foreground="White"
|
|||
|
|
Template="{StaticResource UserNameTextBoxTemplate}" Canvas.Left="600" Canvas.Top="201" Width="171"/>
|
|||
|
|
<PasswordBox pwdHelper:PasswordHelper.Password="{Binding Password,Mode=TwoWay}"
|
|||
|
|
pwdHelper:PasswordHelper.Attach="True" Foreground="White"
|
|||
|
|
Height="25" FontSize="14"
|
|||
|
|
Template="{StaticResource PasswordBoxTemplate}" Canvas.Left="600" Canvas.Top="264" Width="171"/>
|
|||
|
|
<Button Content="" Height="30" Width="176" Foreground="White" FontSize="14"
|
|||
|
|
Background="Transparent"
|
|||
|
|
Command="{Binding LoginCommand}"
|
|||
|
|
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}" Canvas.Left="600" Canvas.Top="331"
|
|||
|
|
/>
|
|||
|
|
|
|||
|
|
<TextBlock Text="{Binding ErrorMsg}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16" Width="245" Foreground="Red" Canvas.Left="575" Canvas.Top="455"
|
|||
|
|
/>
|
|||
|
|
</Canvas>
|
|||
|
|
</Viewbox>
|
|||
|
|
</Grid>
|
|||
|
|
</Window>
|