166 lines
6.7 KiB
XML
166 lines
6.7 KiB
XML
<Window x:Class="CheckersSpielBot.LoginWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="Checkers" Height="420" Width="360"
|
|
WindowStartupLocation="CenterScreen"
|
|
ResizeMode="NoResize"
|
|
Background="#222">
|
|
|
|
<Window.Resources>
|
|
<Style x:Key="InputStyle" TargetType="TextBox">
|
|
<Setter Property="Background" Value="#333"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="BorderBrush" Value="#555"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="8,6"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="Height" Value="36"/>
|
|
<Setter Property="CaretBrush" Value="White"/>
|
|
</Style>
|
|
|
|
<Style x:Key="PasswordStyle" TargetType="PasswordBox">
|
|
<Setter Property="Background" Value="#333"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="BorderBrush" Value="#555"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="8,6"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="Height" Value="36"/>
|
|
</Style>
|
|
|
|
<Style x:Key="PrimaryBtn" TargetType="Button">
|
|
<Setter Property="Background" Value="#CC2222"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Height" Value="42"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="{TemplateBinding Background}" CornerRadius="5">
|
|
<ContentPresenter HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="#AA1111"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Background" Value="#880000"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="TabBtn" TargetType="Button">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="#888"/>
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="Transparent"
|
|
BorderBrush="#555"
|
|
BorderThickness="0,0,0,2"
|
|
Padding="0,0,0,4">
|
|
<ContentPresenter HorizontalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Grid Margin="30">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="24"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="20"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="10"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="10"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="10"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="14"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Title -->
|
|
<TextBlock Grid.Row="0"
|
|
Text="CHECKERS"
|
|
Foreground="White"
|
|
FontSize="24"
|
|
FontWeight="Bold"
|
|
HorizontalAlignment="Center"/>
|
|
|
|
<!-- Tab switcher -->
|
|
<Grid Grid.Row="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button Grid.Column="0"
|
|
x:Name="TabLoginBtn"
|
|
Content="Login"
|
|
Style="{StaticResource TabBtn}"
|
|
Click="SwitchToLogin"/>
|
|
|
|
<Button Grid.Column="1"
|
|
x:Name="TabRegisterBtn"
|
|
Content="Register"
|
|
Style="{StaticResource TabBtn}"
|
|
Click="SwitchToRegister"/>
|
|
</Grid>
|
|
|
|
<!-- Username -->
|
|
<TextBlock Grid.Row="4"
|
|
Text="Username"
|
|
Foreground="#AAA"
|
|
FontSize="12"/>
|
|
|
|
<TextBox Grid.Row="6"
|
|
x:Name="UsernameBox"
|
|
Style="{StaticResource InputStyle}"/>
|
|
|
|
<!-- Password -->
|
|
<TextBlock Grid.Row="8"
|
|
Text="Password"
|
|
Foreground="#AAA"
|
|
FontSize="12"/>
|
|
|
|
<PasswordBox Grid.Row="10"
|
|
x:Name="PwdBox"
|
|
Style="{StaticResource PasswordStyle}"/>
|
|
|
|
<!-- Error / success -->
|
|
<TextBlock Grid.Row="12"
|
|
x:Name="ErrorText"
|
|
Foreground="#FF6666"
|
|
FontSize="12"
|
|
TextWrapping="Wrap"
|
|
HorizontalAlignment="Center"/>
|
|
|
|
<Button Grid.Row="12"
|
|
x:Name="ActionBtn"
|
|
Content="Login"
|
|
Style="{StaticResource PrimaryBtn}"
|
|
Margin="0,24,0,0"
|
|
Click="ActionBtn_Click"/>
|
|
</Grid>
|
|
</Window> |