mr.solder5 5 vuotta sitten
vanhempi
commit
6f9390f8de

+ 22 - 22
InteractiveKiosk/AuthorizationWindow.xaml

@@ -5,7 +5,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:InteractiveKiosk"
         mc:Ignorable="d"
-        Title="Окно авторизации" Height="300" Width="400" AllowsTransparency="True" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Icon="Logo.png" WindowStyle="None" Background="Transparent">
+        Height="300" Width="400" AllowsTransparency="True" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Icon="Logo.png" WindowStyle="None" Background="Transparent">
     <Window.Resources>
         <Style x:Key="TextBox" TargetType="TextBox">
             <Setter Property="Background" Value="White"/>
@@ -19,7 +19,7 @@
                 <Setter.Value>
                     <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}"/>
+                            <Border x:Name="Background" BorderThickness="1" CornerRadius="15" 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>
@@ -32,7 +32,6 @@
                 </Setter.Value>
             </Setter>
         </Style>
-
         <Style x:Key="Password" TargetType="PasswordBox">
             <Setter Property="Background" Value="White"/>
             <Setter Property="VerticalContentAlignment" Value="Center"/>
@@ -46,7 +45,7 @@
                 <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}"/>
+                            <Border x:Name="Background" BorderThickness="1" CornerRadius="15" 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>
@@ -59,17 +58,16 @@
                 </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="0,0,98,0" HorizontalAlignment="Right" Width="392"></Polygon>
         <Border CornerRadius="20" BorderBrush="Black" BorderThickness="0">
             <Border.Background>
                 <ImageBrush ImageSource="file.jpg"/>
             </Border.Background>
+            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="АВТОРИЗАЦИЯ" VerticalAlignment="Top" Height="29" Width="150" Margin="130,28,0,0" FontSize="20" FontFamily="Segoe UI Semilight"/>
         </Border>
         <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Width="69">
-            <Image Name="MinButton" Height="23" Width="20" Margin="10,-255,-13,0" MouseDown="MinButton_MouseDown">
+            <Image Name="MinButton" Height="23" Width="20" Margin="5,-255,-13,0" MouseDown="MinButton_MouseDown">
                 <Image.Style>
                     <Style TargetType="{x:Type Image}">
                         <Setter Property="Source" Value="Resources/min(inactive).png"/>
@@ -96,8 +94,7 @@
                 </Image.Style>
             </Image>
         </StackPanel>
-
-        <Border Name="LogButton" Height="23" Width="106" BorderThickness="1" Background="Black" Margin="250,201,44,76">
+        <Border Name="LogButton" Width="106" BorderThickness="1" Background="Black" CornerRadius="15" Margin="250,201,44,66">
             <Border.Style>
                 <Style TargetType="{x:Type Border}">
                     <Setter Property="BorderBrush" Value="Black"/>
@@ -120,8 +117,7 @@
                     </Style.Triggers>
                 </Style>
             </Border.Style>
-
-            <Button Content="Войти" FontSize="15" Foreground="Black" >
+            <Button Content="Войти" FontSize="14" Foreground="Black" FontFamily="Segoe UI Semilight">
                 <Button.Style>
                     <Style TargetType="Button">
                         <Setter Property="OverridesDefaultStyle" Value="True"/>
@@ -129,7 +125,7 @@
                         <Setter Property="Template">
                             <Setter.Value>
                                 <ControlTemplate TargetType="Button">
-                                    <Border Name="Border" BorderThickness="0" BorderBrush="Black" Background="{TemplateBinding Background}">
+                                    <Border Name="Border" BorderThickness="0" BorderBrush="Black" CornerRadius="15" Background="{TemplateBinding Background}">
                                         <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                     </Border>
                                     <ControlTemplate.Triggers>
@@ -160,8 +156,8 @@
                 </Button.Style>
             </Button>
         </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">
+        <TextBox x:Name="Login" Style="{StaticResource TextBox}" Margin="173,98,23,169" Height="Auto"/>
+        <TextBlock IsHitTestVisible="False" FontSize="14" Text="Логин" VerticalAlignment="Top" Foreground="Gray" Margin="186,105,35,0" FontFamily="Segoe UI Semilight">
             <TextBlock.Style>
                 <Style TargetType="{x:Type TextBlock}">
                     <Setter Property="Visibility" Value="Collapsed"/>
@@ -173,16 +169,16 @@
                 </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">
+        <PasswordBox x:Name="Password" Style="{StaticResource Password}" Margin="173,136,23,131" Height="Auto"/>
+        <TextBlock Name="Watermark" IsHitTestVisible="False" FontSize="14" Text="Пароль" VerticalAlignment="Top" Foreground="Gray" Margin="186,144,35,0" FontFamily="Segoe UI Semilight">
         </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">
+        <TextBlock HorizontalAlignment="Left" Margin="23,105,0,0" TextWrapping="Wrap" Text="Имя пользователя:" VerticalAlignment="Top" Height="23" Width="145" FontSize="14" FontFamily="Segoe UI Semilight"/>
+        <TextBlock HorizontalAlignment="Left" Margin="23,144,0,0" TextWrapping="Wrap" Text="Пароль:" VerticalAlignment="Top" Height="23" Width="127" FontSize="14" FontFamily="Segoe UI Semilight"/>
+        <ToggleButton Name="Check" Content="Показать пароль" Height="33" Width="164" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="44,203,0,0" Foreground="Black" Checked="PasswordChecked" FontSize="14" FontFamily="Segoe UI Semilight">
             <ToggleButton.Template>
                 <ControlTemplate TargetType="{x:Type ToggleButton}">
                     <StackPanel Orientation="Horizontal">
-                        <Border Height="23" Width="25" CornerRadius="2" HorizontalAlignment="Left" BorderThickness="1" Background="Transparent">
+                        <Border Height="28" Width="30" CornerRadius="15" HorizontalAlignment="Left" BorderThickness="1" Background="Transparent">
                             <Border.Style>
                                 <Style TargetType="{x:Type Border}">
                                     <Setter Property="BorderBrush" Value="Black"/>
@@ -207,7 +203,7 @@
                                     </Style.Triggers>
                                 </Style>
                             </Border.Style>
-                            <Image Margin="4">
+                            <Image Margin="2">
                                 <Image.Style>
                                     <Style>
                                         <Style.Triggers>
@@ -224,6 +220,10 @@
                 </ControlTemplate>
             </ToggleButton.Template>
         </ToggleButton>
-
+        <Image x:Name="man" Margin="60,24,300,236">
+            <Image.Source>
+                <FormatConvertedBitmap Source="C:\Users\locadm\Source\Repos\InteractiveKiosk9\InteractiveKiosk\Resources\people.png"/>
+            </Image.Source>
+        </Image>
     </Grid>
 </Window>

+ 9 - 0
InteractiveKiosk/InteractiveKiosk.csproj

@@ -137,6 +137,9 @@
     <Compile Include="Places.cs">
       <DependentUpon>DataBase.tt</DependentUpon>
     </Compile>
+    <Compile Include="Profile.xaml.cs">
+      <DependentUpon>Profile.xaml</DependentUpon>
+    </Compile>
     <Compile Include="ScheduleForAttraction.cs">
       <DependentUpon>DataBase.tt</DependentUpon>
     </Compile>
@@ -184,6 +187,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Profile.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
   </ItemGroup>
   <ItemGroup>
     <EntityDeploy Include="DataBase.edmx">
@@ -227,6 +234,8 @@
       <LastGenOutput>DataBase.cs</LastGenOutput>
     </Content>
     <Resource Include="Resources\checked.png" />
+    <Resource Include="Resources\people.png" />
+    <Resource Include="Resources\man.png" />
     <Resource Include="Resources\exit%28inactive%29.png" />
     <Resource Include="Resources\exit.png" />
     <Resource Include="Resources\min%28inactive%29.png" />

+ 174 - 0
InteractiveKiosk/Profile.xaml

@@ -0,0 +1,174 @@
+<Window x:Class="InteractiveKiosk.Profile"
+        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:InteractiveKiosk"
+        mc:Ignorable="d"
+        Height="320" Width="600" AllowsTransparency="True" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Icon="Logo.png" WindowStyle="None" Background="Transparent">
+    <Grid Name="Authorization" Background="Transparent" MouseDown="Authorization_MouseDown">
+        <Border CornerRadius="20" BorderBrush="Black" BorderThickness="0">
+            <Border.Background>
+                <ImageBrush ImageSource="file.jpg"/>
+            </Border.Background>
+            <Border x:Name="SaveButton" BorderThickness="1" Background="Black" CornerRadius="15" Margin="336,265,100,19">
+                <Border.Style>
+                    <Style TargetType="{x:Type Border}">
+                        <Setter Property="BorderBrush" Value="Black"/>
+                        <Style.Triggers>
+                            <EventTrigger RoutedEvent="UIElement.PreviewMouseDown">
+                                <BeginStoryboard>
+                                    <Storyboard>
+                                        <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" Duration="0:0:0.100" To="Gray"/>
+                                    </Storyboard>
+                                </BeginStoryboard>
+                            </EventTrigger>
+                            <EventTrigger RoutedEvent="UIElement.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="Сохранить" FontSize="14" Foreground="Black" FontFamily="Segoe UI Semilight">
+                    <Button.Style>
+                        <Style TargetType="{x:Type Button}">
+                            <Setter Property="OverridesDefaultStyle" Value="True"/>
+                            <Setter Property="Background" Value="White"/>
+                            <Setter Property="Template">
+                                <Setter.Value>
+                                    <ControlTemplate TargetType="{x:Type Button}">
+                                        <Border x:Name="Border" BorderThickness="0" BorderBrush="Black" CornerRadius="15" Background="{TemplateBinding Background}">
+                                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                                        </Border>
+                                        <ControlTemplate.Triggers>
+                                            <Trigger Property="IsMouseOver" Value="True">
+                                                <Setter Property="Background" Value="Gray"/>
+                                            </Trigger>
+                                            <EventTrigger RoutedEvent="UIElement.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="UIElement.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>
+        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Width="89">
+            <Image Name="MinButton" Height="23" Width="20" Margin="25,-275,-13,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="23" Width="20" Margin="20,-275,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>
+        <Border Name="EditButton" BorderThickness="1" Background="Black" CornerRadius="15" Margin="100,265,336,19">
+            <Border.Style>
+                <Style TargetType="{x:Type Border}">
+                    <Setter Property="BorderBrush" Value="Black"/>
+                    <Style.Triggers>
+                        <EventTrigger RoutedEvent="PreviewMouseDown">
+                            <BeginStoryboard>
+                                <Storyboard>
+                                    <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" Duration="0:0:0.100" To="Gray"/>
+                                </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="Изменить данные" FontSize="14" Foreground="Black" FontFamily="Segoe UI Semilight">
+                <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" CornerRadius="15" 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>
+        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="ПРОФИЛЬ" VerticalAlignment="Top" Height="29" Width="105" Margin="245,28,0,0" FontSize="20" FontFamily="Segoe UI Semilight"/>
+        <TextBlock HorizontalAlignment="Left" Margin="23,105,0,0" TextWrapping="Wrap" Text="Имя пользователя:" VerticalAlignment="Top" Height="23" Width="145" FontSize="14" FontFamily="Segoe UI Semilight"/>
+        <TextBlock HorizontalAlignment="Left" Margin="23,144,0,0" TextWrapping="Wrap" Text="Пароль:" VerticalAlignment="Top" Height="23" Width="127" FontSize="14" FontFamily="Segoe UI Semilight"/>
+        <TextBlock HorizontalAlignment="Left" Margin="23,183,0,0" TextWrapping="Wrap" Text="Полное имя:" VerticalAlignment="Top" Height="23" Width="127" FontSize="14" FontFamily="Segoe UI Semilight"/>
+        <TextBlock HorizontalAlignment="Left" Margin="23,222,0,0" TextWrapping="Wrap" Text="E-mail адрес:" VerticalAlignment="Top" Height="23" Width="127" FontSize="14" FontFamily="Segoe UI Semilight"/>
+        <TextBlock HorizontalAlignment="Left" Margin="379,105,0,0" TextWrapping="Wrap" Text="Телефон:" VerticalAlignment="Top" Height="23" Width="127" FontSize="14" FontFamily="Segoe UI Semilight"/>
+        <TextBlock HorizontalAlignment="Left" Margin="379,144,0,0" TextWrapping="Wrap" Text="Дата рождения:" VerticalAlignment="Top" Height="23" Width="127" FontSize="14" FontFamily="Segoe UI Semilight"/>
+        <TextBlock HorizontalAlignment="Left" Margin="379,183,0,0" TextWrapping="Wrap" Text="Аватар:" VerticalAlignment="Top" Height="23" Width="127" FontSize="14" FontFamily="Segoe UI Semilight"/>
+    </Grid>
+</Window>

+ 37 - 0
InteractiveKiosk/Profile.xaml.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace InteractiveKiosk
+{
+    /// <summary>
+    /// Interaction logic for Profile.xaml
+    /// </summary>
+    public partial class Profile : Window
+    {
+        public Profile()
+        {
+            InitializeComponent();
+        }
+
+        private void MinButton_MouseDown(object sender, MouseButtonEventArgs e)
+        {
+            this.WindowState = WindowState.Minimized;
+        }
+
+        private void ExitButton_MouseDown(object sender, MouseButtonEventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

BIN
InteractiveKiosk/Resources/checked.png


BIN
InteractiveKiosk/Resources/man.png


BIN
InteractiveKiosk/Resources/people.png