|
@@ -5,47 +5,71 @@
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:InteractiveKiosk"
|
|
xmlns:local="clr-namespace:InteractiveKiosk"
|
|
mc:Ignorable="d"
|
|
mc:Ignorable="d"
|
|
- Title="Окно авторизации" Height="300" Width="520" AllowsTransparency="True" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Icon="Logo.png" WindowStyle="None" Background="Transparent">
|
|
|
|
|
|
+ Title="Окно авторизации" Height="300" Width="400" AllowsTransparency="True" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Icon="Logo.png" WindowStyle="None" Background="Transparent">
|
|
<Window.Resources>
|
|
<Window.Resources>
|
|
- <Style x:Key="LoginButton" TargetType="Button">
|
|
|
|
- <Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
|
|
|
|
+ <Style x:Key="TextBox" TargetType="TextBox">
|
|
<Setter Property="Background" Value="White"/>
|
|
<Setter Property="Background" Value="White"/>
|
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
|
+ <Setter Property="Height" Value="23"/>
|
|
|
|
+ <Setter Property="Foreground" Value="Black"/>
|
|
|
|
+ <Setter Property="FontSize" Value="13"/>
|
|
|
|
+ <Setter Property="Padding" Value="10,0,0,0"/>
|
|
|
|
+ <Setter Property="BorderBrush" Value="Black"/>
|
|
<Setter Property="Template">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<Setter.Value>
|
|
- <ControlTemplate TargetType="Button">
|
|
|
|
- <Border Name="Border" BorderThickness="0" BorderBrush="Black" Background="{TemplateBinding Background}">
|
|
|
|
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
- </Border>
|
|
|
|
|
|
+ <ControlTemplate TargetType="TextBox">
|
|
|
|
+ <Grid x:Name="root" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" SnapsToDevicePixels="True">
|
|
|
|
+ <Border x:Name="Background" BorderThickness="1" CornerRadius="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"/>
|
|
|
|
+ <ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" Padding="{TemplateBinding Padding}" IsTabStop="False" Background="{x:Null}" TextElement.Foreground="{TemplateBinding Foreground}"/>
|
|
|
|
+ </Grid>
|
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
|
+ <Trigger Property="IsFocused" Value="True">
|
|
|
|
+ <Setter Property="BorderBrush" Value="Black"/>
|
|
|
|
+ <Setter Property="Background" Value="White"/>
|
|
|
|
+ </Trigger>
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+
|
|
|
|
+ <Style x:Key="Password" TargetType="PasswordBox">
|
|
|
|
+ <Setter Property="Background" Value="White"/>
|
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
|
+ <Setter Property="Height" Value="23"/>
|
|
|
|
+ <Setter Property="Foreground" Value="Black"/>
|
|
|
|
+ <Setter Property="FontSize" Value="13"/>
|
|
|
|
+ <Setter Property="BorderBrush" Value="Black"/>
|
|
|
|
+ <Setter Property="Padding" Value="10,0,0,0"/>
|
|
|
|
+ <EventSetter Event="PasswordChanged" Handler="OnPasswordChanged"/>
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="PasswordBox">
|
|
|
|
+ <Grid x:Name="root" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" SnapsToDevicePixels="True">
|
|
|
|
+ <Border x:Name="Background" BorderThickness="1" CornerRadius="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"/>
|
|
|
|
+ <ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" Padding="{TemplateBinding Padding}" IsTabStop="False" Background="{x:Null}" TextElement.Foreground="{TemplateBinding Foreground}"/>
|
|
|
|
+ </Grid>
|
|
<ControlTemplate.Triggers>
|
|
<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>
|
|
|
|
|
|
+ <Trigger Property="IsFocused" Value="True">
|
|
|
|
+ <Setter Property="BorderBrush" Value="Black"/>
|
|
|
|
+ <Setter Property="Background" Value="White"/>
|
|
|
|
+ </Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Setter>
|
|
</Style>
|
|
</Style>
|
|
|
|
+
|
|
</Window.Resources>
|
|
</Window.Resources>
|
|
<Grid Name="Authorization" Background="Transparent" MouseDown="Authorization_MouseDown">
|
|
<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>
|
|
|
|
|
|
+ <Polygon Fill="White" Opacity="0.3" Points="107,0,115,7,249,7,257,0" Margin="0,0,98,0" HorizontalAlignment="Right" Width="392"></Polygon>
|
|
<Border CornerRadius="20" BorderBrush="Black" BorderThickness="0">
|
|
<Border CornerRadius="20" BorderBrush="Black" BorderThickness="0">
|
|
<Border.Background>
|
|
<Border.Background>
|
|
<ImageBrush ImageSource="file.jpg"/>
|
|
<ImageBrush ImageSource="file.jpg"/>
|
|
</Border.Background>
|
|
</Border.Background>
|
|
</Border>
|
|
</Border>
|
|
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
|
|
- <Image Name="MinButton" Height="20" Width="20" Margin="10,-255,-15,0" MouseDown="MinButton_MouseDown">
|
|
|
|
|
|
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Width="69">
|
|
|
|
+ <Image Name="MinButton" Height="23" Width="20" Margin="10,-255,-13,0" MouseDown="MinButton_MouseDown">
|
|
<Image.Style>
|
|
<Image.Style>
|
|
<Style TargetType="{x:Type Image}">
|
|
<Style TargetType="{x:Type Image}">
|
|
<Setter Property="Source" Value="Resources/min(inactive).png"/>
|
|
<Setter Property="Source" Value="Resources/min(inactive).png"/>
|
|
@@ -58,7 +82,7 @@
|
|
</Style>
|
|
</Style>
|
|
</Image.Style>
|
|
</Image.Style>
|
|
</Image>
|
|
</Image>
|
|
- <Image Name="ExitButton" Height="20" Width="20" Margin="20,-255,20,0" MouseDown="ExitButton_MouseDown">
|
|
|
|
|
|
+ <Image Name="ExitButton" Height="23" Width="20" Margin="20,-255,20,0" MouseDown="ExitButton_MouseDown">
|
|
<Image.Style>
|
|
<Image.Style>
|
|
<Style TargetType="{x:Type Image}">
|
|
<Style TargetType="{x:Type Image}">
|
|
<Setter Property="Source" Value="Resources/exit(inactive).png"/>
|
|
<Setter Property="Source" Value="Resources/exit(inactive).png"/>
|
|
@@ -72,25 +96,17 @@
|
|
</Image.Style>
|
|
</Image.Style>
|
|
</Image>
|
|
</Image>
|
|
</StackPanel>
|
|
</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="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"/>
|
|
|
|
- <CheckBox Content="Показать пароль" HorizontalAlignment="Left" Margin="256,122,0,0" VerticalAlignment="Top"/>
|
|
|
|
- <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 Name="LogButton" Height="23" Width="106" BorderThickness="1" Background="Black" Margin="250,201,44,76">
|
|
<Border.Style>
|
|
<Border.Style>
|
|
<Style TargetType="{x:Type Border}">
|
|
<Style TargetType="{x:Type Border}">
|
|
<Setter Property="BorderBrush" Value="Black"/>
|
|
<Setter Property="BorderBrush" Value="Black"/>
|
|
<Style.Triggers>
|
|
<Style.Triggers>
|
|
- <Trigger Property="IsMouseOver" Value="True">
|
|
|
|
- <Setter Property="BorderBrush" Value="Black"/>
|
|
|
|
- </Trigger>
|
|
|
|
|
|
+
|
|
<EventTrigger RoutedEvent="PreviewMouseDown">
|
|
<EventTrigger RoutedEvent="PreviewMouseDown">
|
|
<BeginStoryboard>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<Storyboard>
|
|
- <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" Duration="0:0:0.100" To="Black"/>
|
|
|
|
|
|
+ <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" Duration="0:0:0.100" To="Gray"/>
|
|
</Storyboard>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
</EventTrigger>
|
|
@@ -104,7 +120,110 @@
|
|
</Style.Triggers>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Style>
|
|
</Border.Style>
|
|
</Border.Style>
|
|
- <Button Content="Вход" Click="LoginButton" Style="{StaticResource LoginButton}" FontFamily="Arial Black"></Button>
|
|
|
|
|
|
+
|
|
|
|
+ <Button Content="Войти" FontSize="15" Foreground="Black" >
|
|
|
|
+ <Button.Style>
|
|
|
|
+ <Style 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>
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
|
+ <Setter Property="Background" Value="Gray"/>
|
|
|
|
+ </Trigger>
|
|
|
|
+ <EventTrigger RoutedEvent="PreviewMouseDown">
|
|
|
|
+ <BeginStoryboard>
|
|
|
|
+ <Storyboard>
|
|
|
|
+ <ThicknessAnimation Storyboard.TargetProperty="Margin" Duration="0:0:0.100" To="2, 2, 0, 0"/>
|
|
|
|
+ <ColorAnimation Storyboard.TargetProperty="Background.Color" To="Gray" Duration="0:0:0.0002"/>
|
|
|
|
+ </Storyboard>
|
|
|
|
+ </BeginStoryboard>
|
|
|
|
+ </EventTrigger>
|
|
|
|
+ <EventTrigger RoutedEvent="PreviewMouseUp">
|
|
|
|
+ <BeginStoryboard>
|
|
|
|
+ <Storyboard>
|
|
|
|
+ <ThicknessAnimation Storyboard.TargetProperty="Margin" Duration="0:0:0.100" To="0, 0, 0, 0"/>
|
|
|
|
+ <ColorAnimation Storyboard.TargetProperty="Background.Color" To="White" Duration="0:0:0.0002"/>
|
|
|
|
+ </Storyboard>
|
|
|
|
+ </BeginStoryboard>
|
|
|
|
+ </EventTrigger>
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+ </Button.Style>
|
|
|
|
+ </Button>
|
|
</Border>
|
|
</Border>
|
|
|
|
+ <TextBox x:Name="Login" Style="{StaticResource TextBox}" Margin="173,98,44,179"/>
|
|
|
|
+ <TextBlock IsHitTestVisible="False" FontSize="14" Text="Логин" VerticalAlignment="Top" Foreground="Gray" Margin="183,100,56,0">
|
|
|
|
+ <TextBlock.Style>
|
|
|
|
+ <Style TargetType="{x:Type TextBlock}">
|
|
|
|
+ <Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
+ <Style.Triggers>
|
|
|
|
+ <DataTrigger Binding="{Binding Text, ElementName=Login}" Value="">
|
|
|
|
+ <Setter Property="Visibility" Value="Visible"/>
|
|
|
|
+ </DataTrigger>
|
|
|
|
+ </Style.Triggers>
|
|
|
|
+ </Style>
|
|
|
|
+ </TextBlock.Style>
|
|
|
|
+ </TextBlock>
|
|
|
|
+ <PasswordBox x:Name="Password" Style="{StaticResource Password}" Margin="173,136,44,141"/>
|
|
|
|
+ <TextBlock Name="Watermark" IsHitTestVisible="False" FontSize="14" Text="Пароль" VerticalAlignment="Top" Foreground="Gray" Margin="183,138,56,0">
|
|
|
|
+ </TextBlock>
|
|
|
|
+ <TextBlock HorizontalAlignment="Left" Margin="44,97,0,0" TextWrapping="Wrap" Text="Имя пользователя:" VerticalAlignment="Top" Height="23" Width="106"/>
|
|
|
|
+ <TextBlock HorizontalAlignment="Left" Margin="44,135,0,0" TextWrapping="Wrap" Text="Пароль:" VerticalAlignment="Top" Height="23" Width="106"/>
|
|
|
|
+ <ToggleButton Name="Check" Content="Показать пароль" Height="23" Width="140" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="44,201,0,0" Foreground="Black" Checked="PasswordChecked">
|
|
|
|
+ <ToggleButton.Template>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
|
+ <Border Height="23" Width="25" CornerRadius="2" HorizontalAlignment="Left" BorderThickness="1" Background="Transparent">
|
|
|
|
+ <Border.Style>
|
|
|
|
+ <Style TargetType="{x:Type Border}">
|
|
|
|
+ <Setter Property="BorderBrush" Value="Black"/>
|
|
|
|
+ <Style.Triggers>
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
|
+ <Setter Property="BorderBrush" Value="Gray"/>
|
|
|
|
+ </Trigger>
|
|
|
|
+ <EventTrigger RoutedEvent="PreviewMouseDown">
|
|
|
|
+ <BeginStoryboard>
|
|
|
|
+ <Storyboard>
|
|
|
|
+ <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" To="Black" Duration="0:0:0.100"/>
|
|
|
|
+ </Storyboard>
|
|
|
|
+ </BeginStoryboard>
|
|
|
|
+ </EventTrigger>
|
|
|
|
+ <EventTrigger RoutedEvent="PreviewMouseUp">
|
|
|
|
+ <BeginStoryboard>
|
|
|
|
+ <Storyboard>
|
|
|
|
+ <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" To="White" Duration="0:0:0.100"/>
|
|
|
|
+ </Storyboard>
|
|
|
|
+ </BeginStoryboard>
|
|
|
|
+ </EventTrigger>
|
|
|
|
+ </Style.Triggers>
|
|
|
|
+ </Style>
|
|
|
|
+ </Border.Style>
|
|
|
|
+ <Image Margin="4">
|
|
|
|
+ <Image.Style>
|
|
|
|
+ <Style>
|
|
|
|
+ <Style.Triggers>
|
|
|
|
+ <DataTrigger Binding="{Binding IsChecked, RelativeSource={RelativeSource AncestorType={x:Type ToggleButton}}}" Value="True">
|
|
|
|
+ <Setter Property="Image.Source" Value="Resources/checked.png"/>
|
|
|
|
+ </DataTrigger>
|
|
|
|
+ </Style.Triggers>
|
|
|
|
+ </Style>
|
|
|
|
+ </Image.Style>
|
|
|
|
+ </Image>
|
|
|
|
+ </Border>
|
|
|
|
+ <ContentPresenter Content="{TemplateBinding Content}" Margin="10,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
|
|
+ </StackPanel>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </ToggleButton.Template>
|
|
|
|
+ </ToggleButton>
|
|
|
|
+
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|
|
</Window>
|