213 lines
13 KiB
Plaintext
213 lines
13 KiB
Plaintext
|
|
<Window x:Class="StandardDesign.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:StandardDesign.Views"
|
||
|
|
xmlns:c="clr-namespace:StandardDesign.Common;assembly=StandardDesign.Common"
|
||
|
|
DataContext="{Binding Source={StaticResource locator},Path=LoginViewModel}"
|
||
|
|
mc:Ignorable="d" Name="win" FontFamily="Microsoft YaHei"
|
||
|
|
ResizeMode="NoResize" Background="#f1f5fd" WindowStartupLocation="CenterScreen"
|
||
|
|
Title="系统登录" Height="540" Width="900">
|
||
|
|
|
||
|
|
<!--Win7下的效果不一样-->
|
||
|
|
<WindowChrome.WindowChrome>
|
||
|
|
<WindowChrome GlassFrameThickness="1"/>
|
||
|
|
</WindowChrome.WindowChrome>
|
||
|
|
|
||
|
|
<Window.Resources>
|
||
|
|
<ResourceDictionary>
|
||
|
|
<ResourceDictionary.MergedDictionaries>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/StandardDesign.Assets;component/Styles/ButtonStyles.xaml"/>
|
||
|
|
|
||
|
|
<ResourceDictionary>
|
||
|
|
<Style TargetType="TextBox" x:Key="UserNameTextBoxStyle">
|
||
|
|
<Setter Property="FontSize" Value="13"/>
|
||
|
|
<Setter Property="Template">
|
||
|
|
<Setter.Value>
|
||
|
|
<ControlTemplate TargetType="TextBox">
|
||
|
|
<Border BorderBrush="#DDD"
|
||
|
|
BorderThickness="0,0,0,1" Height="40"
|
||
|
|
SnapsToDevicePixels="True" Name="border">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="30"/>
|
||
|
|
<ColumnDefinition/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<TextBlock Text=""
|
||
|
|
FontFamily="{DynamicResource Iconfont}"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
FontSize="15">
|
||
|
|
<TextBlock.Foreground>
|
||
|
|
<LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
|
||
|
|
<GradientStop Color="#16a1ff" Offset="0"/>
|
||
|
|
<GradientStop Color="#b4fee7" Offset="0.65"/>
|
||
|
|
<GradientStop Color="#16a1ff" Offset="1"/>
|
||
|
|
</LinearGradientBrush>
|
||
|
|
</TextBlock.Foreground>
|
||
|
|
</TextBlock>
|
||
|
|
<TextBlock Text="请输入工号/手机号/用户名" Grid.Column="1" VerticalAlignment="Center"
|
||
|
|
Foreground="#DDD" Name="markText" Visibility="Collapsed"/>
|
||
|
|
<ScrollViewer Name="PART_ContentHost" Grid.Column="1"/>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<ControlTemplate.Triggers>
|
||
|
|
<Trigger Property="IsMouseOver" Value="true">
|
||
|
|
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
||
|
|
</Trigger>
|
||
|
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
||
|
|
<Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
|
||
|
|
</Trigger>
|
||
|
|
<DataTrigger Binding="{Binding Path=Text,RelativeSource={RelativeSource Mode=Self}}" Value="">
|
||
|
|
<Setter Property="Visibility" TargetName="markText" Value="Visible"/>
|
||
|
|
</DataTrigger>
|
||
|
|
</ControlTemplate.Triggers>
|
||
|
|
</ControlTemplate>
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
</Style>
|
||
|
|
|
||
|
|
<Style TargetType="PasswordBox" x:Key="PasswordBoxStyle">
|
||
|
|
<Setter Property="FontSize" Value="13"/>
|
||
|
|
<Setter Property="Template">
|
||
|
|
<Setter.Value>
|
||
|
|
<ControlTemplate TargetType="PasswordBox">
|
||
|
|
<Border BorderBrush="#DDD" BorderThickness="0,0,0,1" Height="40" SnapsToDevicePixels="True" Name="border">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="30"/>
|
||
|
|
<ColumnDefinition/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<TextBlock Text="" FontFamily="{DynamicResource Iconfont}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="15">
|
||
|
|
<TextBlock.Foreground>
|
||
|
|
<LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
|
||
|
|
<GradientStop Color="#16a1ff" Offset="0"/>
|
||
|
|
<GradientStop Color="#b4fee7" Offset="0.65"/>
|
||
|
|
<GradientStop Color="#16a1ff" Offset="1"/>
|
||
|
|
</LinearGradientBrush>
|
||
|
|
</TextBlock.Foreground>
|
||
|
|
</TextBlock>
|
||
|
|
<TextBlock Text="请输入登录密码" Grid.Column="1" VerticalAlignment="Center" Foreground="#DDD" Name="markText"
|
||
|
|
Visibility="Collapsed"/>
|
||
|
|
<ScrollViewer Name="PART_ContentHost" Grid.Column="1"/>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
<ControlTemplate.Triggers>
|
||
|
|
<Trigger Property="IsMouseOver" Value="true">
|
||
|
|
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
||
|
|
</Trigger>
|
||
|
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
||
|
|
<Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
|
||
|
|
</Trigger>
|
||
|
|
<DataTrigger Binding="{Binding Path=User.Password}" Value="">
|
||
|
|
<Setter Property="Visibility" TargetName="markText" Value="Visible"/>
|
||
|
|
</DataTrigger>
|
||
|
|
</ControlTemplate.Triggers>
|
||
|
|
</ControlTemplate>
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
</Style>
|
||
|
|
</ResourceDictionary>
|
||
|
|
</ResourceDictionary.MergedDictionaries>
|
||
|
|
</ResourceDictionary>
|
||
|
|
|
||
|
|
</Window.Resources>
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition/>
|
||
|
|
<ColumnDefinition/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
|
||
|
|
<!--左侧区域-->
|
||
|
|
<Grid Grid.Column="0" Background="#000A7B">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="70"/>
|
||
|
|
<RowDefinition Height="20"/>
|
||
|
|
<RowDefinition Height="120"/>
|
||
|
|
<RowDefinition Height="20"/>
|
||
|
|
<RowDefinition Height="70"/>
|
||
|
|
<RowDefinition Height="26"/>
|
||
|
|
<RowDefinition Height="26"/>
|
||
|
|
<RowDefinition Height="26" />
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<!--左上角Logo图标-->
|
||
|
|
<Border CornerRadius="10,0,0,10" BorderThickness="2" Width="100" Height="50" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10.0">
|
||
|
|
<Border.Background>
|
||
|
|
<ImageBrush ImageSource="pack://application:,,,/StandardDesign.Assets;component/Images/Login/logo.png" />
|
||
|
|
</Border.Background>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<!--右上角鸟图标-->
|
||
|
|
<Border CornerRadius="10" BorderThickness="2" Width="240" Height="50" VerticalAlignment="Top" HorizontalAlignment="Right" >
|
||
|
|
<Border.Background>
|
||
|
|
<ImageBrush ImageSource="pack://application:,,,/StandardDesign.Assets;component/Images/Login/bird.png" />
|
||
|
|
</Border.Background>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<!--正中间Logo图标-->
|
||
|
|
<Border Grid.Row="2" CornerRadius="10" BorderThickness="2" Width="100" Height="100" VerticalAlignment="Center" HorizontalAlignment="Stretch" >
|
||
|
|
<Border.Background>
|
||
|
|
<ImageBrush ImageSource="pack://application:,,,/StandardDesign.Assets;component/Images/Login/Trademark.png" />
|
||
|
|
</Border.Background>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<TextBlock Grid.Row="4" Text="岛礁观测系统" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="30"/>
|
||
|
|
<TextBlock Grid.Row="5" Text="集成水质、水文监测和水下成像技术" HorizontalAlignment="Center" VerticalAlignment="Bottom" Foreground="White" FontSize="15"/>
|
||
|
|
<TextBlock Grid.Row="6" Text="实现对珊瑚礁附近海域温度、盐度、深度、叶绿素、" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="15"/>
|
||
|
|
<TextBlock Grid.Row="7" Text="CO2、流速等多参数要素及水下高清视频的长期在线观测" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="15"/>
|
||
|
|
<TextBlock Grid.Row="8" Text="2024 - ZTMS" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="20" />
|
||
|
|
|
||
|
|
<!--左下角船图标-->
|
||
|
|
<Border Grid.Row="9" CornerRadius="10" BorderThickness="2" Width="170" Height="70" VerticalAlignment="Bottom" HorizontalAlignment="Left" >
|
||
|
|
<Border.Background>
|
||
|
|
<ImageBrush ImageSource="pack://application:,,,/StandardDesign.Assets;component/Images/Login/ship.png" />
|
||
|
|
</Border.Background>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<!--右下角波浪线图标-->
|
||
|
|
<Border Grid.Row="9" CornerRadius="10" BorderThickness="2" Width="286" Height="20" VerticalAlignment="Bottom" HorizontalAlignment="Right" >
|
||
|
|
<Border.Background>
|
||
|
|
<ImageBrush ImageSource="pack://application:,,,/StandardDesign.Assets;component/Images/Login/wave.png" />
|
||
|
|
</Border.Background>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<!--右侧区域-->
|
||
|
|
<Grid Grid.Column="1" Background="#000A7B" >
|
||
|
|
<Border CornerRadius="60,0,0,60" Background="White">
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="40"/>
|
||
|
|
<RowDefinition Height="30"/>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<!--窗口控制按钮-->
|
||
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="20,10">
|
||
|
|
<Button Content="" FontFamily="{DynamicResource Iconfont}" FontSize="14" Click="Button_MinClick" Style="{StaticResource WindowControlButtonStyle}" WindowChrome.IsHitTestVisibleInChrome="True"/>
|
||
|
|
<Button Content="" FontFamily="{DynamicResource Iconfont}" FontSize="14" Click="Button_MaxClick" Style="{StaticResource WindowControlButtonStyle}" WindowChrome.IsHitTestVisibleInChrome="True" Margin="10,0"/>
|
||
|
|
<Button Content="" FontFamily="{DynamicResource Iconfont}" FontSize="14" Click="Button_CloseClick" Style="{StaticResource WindowControlButtonStyle}" WindowChrome.IsHitTestVisibleInChrome="True" />
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<TextBlock Text="Socket连接" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="30"/>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
</Grid>
|
||
|
|
</Window>
|