parent
8afe78a16f
commit
e0a010692a
@ -0,0 +1,83 @@
|
||||
<Window x:Class="SocketExample.LoginWindow"
|
||||
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:SocketExample"
|
||||
mc:Ignorable="d"
|
||||
Height="350"
|
||||
Width="400"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ResizeMode="NoResize"
|
||||
WindowStyle="None">
|
||||
<Grid Margin="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 标题 -->
|
||||
<TextBlock Text="用户登录"
|
||||
Grid.Row="0"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="24"
|
||||
FontWeight="Bold"
|
||||
Margin="0,0,0,30"/>
|
||||
|
||||
<!-- 用户名 -->
|
||||
<TextBlock Text="用户名:"
|
||||
Grid.Row="1"
|
||||
Margin="0,0,0,5"/>
|
||||
<TextBox x:Name="txtUsername"
|
||||
Grid.Row="1"
|
||||
Height="30"
|
||||
Margin="0,25,0,5"
|
||||
Padding="5"/>
|
||||
|
||||
<!-- 密码 -->
|
||||
<TextBlock Text="密码:"
|
||||
Grid.Row="2"
|
||||
Margin="0,0,0,5"/>
|
||||
<PasswordBox x:Name="txtPassword"
|
||||
Grid.Row="2"
|
||||
Height="30"
|
||||
Margin="0,25,0,5"
|
||||
Padding="5"/>
|
||||
|
||||
<!-- 错误提示 -->
|
||||
<TextBlock x:Name="lblError"
|
||||
Grid.Row="3"
|
||||
Foreground="Red"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,10,0,10"
|
||||
Visibility="Collapsed"/>
|
||||
|
||||
<!-- 剩余尝试次数 -->
|
||||
<TextBlock x:Name="lblAttempts"
|
||||
Grid.Row="4"
|
||||
Foreground="DarkOrange"
|
||||
VerticalAlignment="Bottom"
|
||||
Margin="0,0,0,10"/>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<StackPanel Grid.Row="5"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Right">
|
||||
<Button x:Name="btnLogin"
|
||||
Content="登录"
|
||||
Width="80"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
Click="btnLogin_Click"/>
|
||||
<Button Content="取消"
|
||||
Width="80"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
Click="btnCancel_Click"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
Loading…
Reference in New Issue