|
@@ -5,15 +5,106 @@
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
xmlns:local="clr-namespace:InteractiveKiosk"
|
|
|
mc:Ignorable="d"
|
|
|
- Title="Окно авторизации" Height="400" Width="600" WindowStartupLocation="CenterScreen" Icon="Logo.png">
|
|
|
- <Grid>
|
|
|
+ Title="Окно авторизации" Height="300" Width="520" AllowsTransparency="True" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Icon="Logo.png" WindowStyle="None" Background="Transparent">
|
|
|
+ <Window.Resources>
|
|
|
+ <Style x:Key="LoginButton" TargetType="Button">
|
|
|
+ <Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
|
+ <Setter Property="Background" Value="White"/>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="Button">
|
|
|
+ <Border Name="Border" BorderThickness="0" BorderBrush="Black" Background="{TemplateBinding Background}">
|
|
|
+ <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <EventTrigger RoutedEvent="PreviewMouseDown">
|
|
|
+ <BeginStoryboard>
|
|
|
+ <Storyboard>
|
|
|
+ <ThicknessAnimation Storyboard.TargetProperty="Margin" Duration="0:0:0.100" To="2, 2, 0, 0"/>
|
|
|
+ </Storyboard>
|
|
|
+ </BeginStoryboard>
|
|
|
+ </EventTrigger>
|
|
|
+ <EventTrigger RoutedEvent="PreviewMouseUp">
|
|
|
+ <BeginStoryboard>
|
|
|
+ <Storyboard>
|
|
|
+ <ThicknessAnimation Storyboard.TargetProperty="Margin" Duration="0:0:0.100" To="0, 0, 0, 0"/>
|
|
|
+ </Storyboard>
|
|
|
+ </BeginStoryboard>
|
|
|
+ </EventTrigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ </Window.Resources>
|
|
|
+ <Grid Name="Authorization" Background="Transparent" MouseDown="Authorization_MouseDown">
|
|
|
+ <Polygon Fill="White" Opacity="0.3" Points="107,0,115,7,249,7,257,0" Margin="80,0,0,0"></Polygon>
|
|
|
+ <Border CornerRadius="20" BorderBrush="Black" BorderThickness="0">
|
|
|
+ <Border.Background>
|
|
|
+ <ImageBrush ImageSource="file.jpg"/>
|
|
|
+ </Border.Background>
|
|
|
+ </Border>
|
|
|
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
|
+ <Image Name="MinButton" Height="20" Width="20" Margin="10,-255,-15,0" MouseDown="MinButton_MouseDown">
|
|
|
+ <Image.Style>
|
|
|
+ <Style TargetType="{x:Type Image}">
|
|
|
+ <Setter Property="Source" Value="Resources/min(inactive).png"/>
|
|
|
+ <Style.Triggers>
|
|
|
+ <DataTrigger Binding="{Binding IsMouseOver, ElementName=MinButton}"
|
|
|
+ Value="True">
|
|
|
+ <Setter Property="Source" Value="Resources/min.png"/>
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </Image.Style>
|
|
|
+ </Image>
|
|
|
+ <Image Name="ExitButton" Height="20" Width="20" Margin="20,-255,20,0" MouseDown="ExitButton_MouseDown">
|
|
|
+ <Image.Style>
|
|
|
+ <Style TargetType="{x:Type Image}">
|
|
|
+ <Setter Property="Source" Value="Resources/exit(inactive).png"/>
|
|
|
+ <Style.Triggers>
|
|
|
+ <DataTrigger Binding="{Binding IsMouseOver, ElementName=ExitButton}"
|
|
|
+ Value="True">
|
|
|
+ <Setter Property="Source" Value="Resources/exit.png"/>
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </Image.Style>
|
|
|
+ </Image>
|
|
|
+ </StackPanel>
|
|
|
<TextBox Name="username" GotFocus="Username_GotFocus" LostFocus="Username_LostFocus" HorizontalAlignment="Left" Height="23" Margin="256,27,0,0" TextWrapping="Wrap" Text="Логин" VerticalAlignment="Top" Width="120" TextChanged="username_TextChanged"/>
|
|
|
<TextBlock HorizontalAlignment="Left" Margin="122,27,0,0" TextWrapping="Wrap" Text="Имя пользователя:" VerticalAlignment="Top" Height="23" Width="106"/>
|
|
|
- <PasswordBox Name="password2" HorizontalAlignment="Left" Margin="394,54,0,0" VerticalAlignment="Top" Width="120" Height="23"/>
|
|
|
- <TextBox Name="password" GotFocus="Password_GotFocus" LostFocus="Password_LostFocus" HorizontalAlignment="Left" Height="23" Margin="256,75,0,0" TextWrapping="Wrap" Text="Пароль" VerticalAlignment="Top" Width="120" TextChanged="password_TextChanged"/>
|
|
|
+ <PasswordBox Name="password2" HorizontalAlignment="Left" Margin="90,244,0,0" VerticalAlignment="Top" Width="120" Height="23"/>
|
|
|
+ <TextBox Name="password" GotFocus="Password_GotFocus" LostFocus="Password_LostFocus" HorizontalAlignment="Left" Height="23" Margin="256,75,0,0" TextWrapping="Wrap" Text="Пароль" VerticalAlignment="Top" Width="120" TextChanged="password_TextChanged" />
|
|
|
<TextBlock HorizontalAlignment="Left" Margin="122,75,0,0" TextWrapping="Wrap" Text="Пароль:" VerticalAlignment="Top" Height="23" Width="106"/>
|
|
|
- <Button Content="Вход" Click = "LoginButton" HorizontalAlignment="Left" Margin="122,122,0,0" VerticalAlignment="Top" Width="75" />
|
|
|
<CheckBox Content="Показать пароль" HorizontalAlignment="Left" Margin="256,122,0,0" VerticalAlignment="Top"/>
|
|
|
- <ListBox Name="listbox" HorizontalAlignment="Left" Height="100" Margin="10,10,0,0" VerticalAlignment="Top" Width="100"/>
|
|
|
+ <ListBox Name="listbox" HorizontalAlignment="Left" Height="100" Margin="10,65,0,0" VerticalAlignment="Top" Width="100"/>
|
|
|
+ <Border Height="30" Width="100" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="256, 230, 0, 0" CornerRadius="2" BorderThickness="1" Background="Black">
|
|
|
+ <Border.Style>
|
|
|
+ <Style TargetType="{x:Type Border}">
|
|
|
+ <Setter Property="BorderBrush" Value="Black"/>
|
|
|
+ <Style.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter Property="BorderBrush" Value="Black"/>
|
|
|
+ </Trigger>
|
|
|
+ <EventTrigger RoutedEvent="PreviewMouseDown">
|
|
|
+ <BeginStoryboard>
|
|
|
+ <Storyboard>
|
|
|
+ <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" Duration="0:0:0.100" To="Black"/>
|
|
|
+ </Storyboard>
|
|
|
+ </BeginStoryboard>
|
|
|
+ </EventTrigger>
|
|
|
+ <EventTrigger RoutedEvent="PreviewMouseUp">
|
|
|
+ <BeginStoryboard>
|
|
|
+ <Storyboard>
|
|
|
+ <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" Duration="0:0:0.100" To="Black"/>
|
|
|
+ </Storyboard>
|
|
|
+ </BeginStoryboard>
|
|
|
+ </EventTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </Border.Style>
|
|
|
+ <Button Content="Вход" Click="LoginButton" Style="{StaticResource LoginButton}" FontFamily="Arial Black"></Button>
|
|
|
+ </Border>
|
|
|
</Grid>
|
|
|
</Window>
|