packServer/desktop/LoginWindow.xaml

82 lines
4.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<Window x:Class="YuncangTrace.LocalService.LoginWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="登录 · 云仓视频溯源软件"
Height="580" Width="440"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
Background="{StaticResource BgBrush}"
FontFamily="Microsoft YaHei UI, Segoe UI"
FontSize="13">
<Border Background="White" BorderBrush="{StaticResource LineBrush}" BorderThickness="1"
CornerRadius="10" Margin="26" Padding="22">
<StackPanel>
<TextBlock Text="云仓视频溯源软件" FontSize="18" FontWeight="SemiBold" HorizontalAlignment="Center" />
<TextBlock Text="登录后使用本机打印与溯源服务"
FontSize="12" Foreground="{StaticResource MutedBrush}"
HorizontalAlignment="Center" Margin="0,6,0,16" />
<Grid>
<!-- ① 账号密码登录 -->
<StackPanel x:Name="AccountPanel">
<Grid Margin="0,0,0,4">
<TextBlock Text="服务地址" FontSize="12" Foreground="{StaticResource MutedBrush}" />
<!-- 开发 / 生产由构建决定(csproj 注入),这里只展示,不让用户选 -->
<TextBlock x:Name="EnvText" FontSize="12" Foreground="{StaticResource MutedBrush}"
HorizontalAlignment="Right" />
</Grid>
<TextBox x:Name="ServerBox" Padding="6,5" />
<TextBlock Text="账号(用户名 / 手机号 / 邮箱)" FontSize="12" Foreground="{StaticResource MutedBrush}" Margin="0,12,0,4" />
<TextBox x:Name="AccountBox" Padding="6,5" />
<TextBlock Text="密码" FontSize="12" Foreground="{StaticResource MutedBrush}" Margin="0,12,0,4" />
<PasswordBox x:Name="PasswordBox" Padding="6,5" KeyDown="PasswordBox_KeyDown" />
<CheckBox x:Name="RememberBox" Content="记住账号" Margin="0,12,0,0" />
<Button x:Name="LoginButton" Content="登录" Margin="0,16,0,0" Padding="0,9" FontSize="14"
Background="{StaticResource BrandBrush}" Foreground="White" BorderThickness="0"
Cursor="Hand" Click="Login_Click" />
<Button x:Name="WechatButton" Content="微信扫码登录" Margin="0,8,0,0" Padding="0,6"
Background="Transparent" BorderThickness="1" BorderBrush="{StaticResource LineBrush}"
Foreground="{StaticResource BrandBrush}" Cursor="Hand" Click="Wechat_Click" />
</StackPanel>
<!-- ② 微信扫码登录 -->
<StackPanel x:Name="WechatPanel" Visibility="Collapsed">
<Border Background="#F8FAFC" BorderBrush="{StaticResource LineBrush}" BorderThickness="1"
CornerRadius="8" Padding="12" Height="232">
<Grid>
<Image x:Name="QrImage" Width="200" Height="200" Stretch="Uniform" />
<TextBlock x:Name="QrPlaceholder" Text="正在生成二维码…"
Foreground="{StaticResource MutedBrush}" FontSize="12"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</Border>
<TextBlock x:Name="QrTip" Text="请用手机扫码,确认后自动登录"
FontSize="12" Foreground="{StaticResource MutedBrush}"
TextWrapping="Wrap" HorizontalAlignment="Center" Margin="0,12,0,0" />
<Button x:Name="WechatRefreshButton" Content="刷新二维码" Margin="0,12,0,0" Padding="0,6"
Background="Transparent" BorderThickness="1" BorderBrush="{StaticResource LineBrush}"
Cursor="Hand" Click="WechatRefresh_Click" />
<Button x:Name="BackButton" Content="返回账号登录" Margin="0,8,0,0" Padding="0,6"
Background="Transparent" BorderThickness="0" Foreground="{StaticResource MutedBrush}"
Cursor="Hand" Click="Back_Click" />
</StackPanel>
</Grid>
<TextBlock x:Name="ErrorText" Foreground="{StaticResource BadBrush}" TextWrapping="Wrap"
Margin="0,10,0,0" Visibility="Collapsed" />
<Button x:Name="ExitButton" Content="退出" Margin="0,10,0,0" Padding="0,6"
Background="Transparent" BorderThickness="0" Foreground="{StaticResource MutedBrush}"
Cursor="Hand" Click="Exit_Click" />
</StackPanel>
</Border>
</Window>