Prechádzať zdrojové kódy

add personal account

Katya 5 mesiacov pred
rodič
commit
71b3acadcd

BIN
Assets/icon.png


+ 2 - 2
ViewModels/MainWindowViewModel.cs

@@ -44,11 +44,11 @@ namespace YtYtAvalonia.ViewModels
             User? currentUser = myConnection.Users.FirstOrDefault(x => x.Login == LoginVM.Login && x.Password == LoginVM.Password);
             if(currentUser == null)
             {
-                LoginVM.Message = "Пользователя с такими данными не существует.";
+                LoginVM.Message = "Пользователя с такими данными не существует!";
             }
             else
             {
-                LoginVM.Message = "Ecgt[!";
+                LoginVM.Message = "Успех!";
                 UC = new PersonalAccount();
             }
         }

+ 4 - 4
Views/LoginView.axaml

@@ -4,9 +4,9 @@
 			 xmlns:vm="using:YtYtAvalonia.ViewModels"
 			 x:DataType="vm:MainWindowViewModel"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+             mc:Ignorable="d" d:DesignWidth="1920" d:DesignHeight="1080"
              x:Class="YtYtAvalonia.View.LoginView">
-	<Grid>
+	<Grid Margin="0 230 0 0 ">
 		<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
 			<StackPanel.Styles>
 				<Style Selector="TextBox">
@@ -37,8 +37,8 @@
 
 			<TextBlock HorizontalAlignment="Center" Margin="0 0 0 30" FontFamily="Roboto" FontSize="25" FontWeight="Bold">Авторизация</TextBlock>
 			<TextBox Text="{Binding LoginVM.Login}" Watermark="Логин" Width="360" FontSize="13" Margin="0 0 0 10" ></TextBox>
-			<TextBox Text="{Binding LoginVM.Password}" Watermark="Пароль" PasswordChar="•" Width="360" ></TextBox>
-			<TextBlock Text="{Binding LoginVM.Message}"/>
+			<TextBox Text="{Binding LoginVM.Password}" Watermark="Пароль" PasswordChar="•" Width="360"></TextBox>
+			<TextBlock Text="{Binding LoginVM.Message}" Margin="0 5 0 0" HorizontalAlignment="Center" FontFamily="Roboto" FontSize="13" Foreground="#A52C2C"></TextBlock>
 			<Button HorizontalAlignment="Center" Margin="0 20 0 10" Width="230" Height="45" CornerRadius="10" Background="#38BFF2" Command="{Binding LoadPersonalAccount}">
 				<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Roboto" FontSize="16" FontWeight="DemiBold" Foreground="White">Войти</TextBlock>
 			</Button>

+ 2 - 2
Views/MainWindow.axaml

@@ -4,7 +4,7 @@
         xmlns:v="using:YtYtAvalonia.Views"
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+        mc:Ignorable="d" d:DesignWidth="1920" d:DesignHeight="1080"
         x:Class="YtYtAvalonia.Views.MainWindow"
         x:DataType="vm:MainWindowViewModel"
         Icon="/Assets/avalonia-logo.ico"
@@ -19,7 +19,7 @@
 
 	<Grid >
 		<ScrollViewer>
-			<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
+			<StackPanel>
 				<ContentControl Content="{Binding UC}"></ContentControl>
 			</StackPanel>
 		</ScrollViewer>

+ 19 - 2
Views/PersonalAccount.axaml

@@ -4,7 +4,24 @@
 			 xmlns:vm="using:YtYtAvalonia.ViewModels"
 			 x:DataType="vm:MainWindowViewModel"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+             mc:Ignorable="d" d:DesignWidth="1920" d:DesignHeight="1080"
              x:Class="YtYtAvalonia.Views.PersonalAccount">
-  Welcome to Avalonia!
+	<Grid>
+		<StackPanel>
+			<StackPanel Height="70" Background="#B8E0EE" VerticalAlignment="Top" >
+				<StackPanel HorizontalAlignment="Center">
+					<TextBlock Margin="0 8 0 0" FontFamily="Roboto" FontSize="35" FontWeight="Medium" >Личный кабинет</TextBlock>
+				</StackPanel>
+			</StackPanel>
+			<StackPanel Margin="0 60" Orientation="Horizontal" HorizontalAlignment="Center">
+				<Image Source="/Assets/icon.png" Height="80"></Image>
+				<TextBlock Margin="50 0 150 0" VerticalAlignment="Center" FontFamily="Roboto" FontSize="24">UserLogin</TextBlock>
+				<Button Height="40" Width="250" CornerRadius="8" Background="#38BFF2">
+					<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Roboto" FontSize="20" Foreground="White">Пройти тестирование</TextBlock>
+				</Button>
+			</StackPanel>
+			
+			
+		</StackPanel>
+	</Grid>
 </UserControl>

+ 5 - 0
YtYtAvalonia.csproj

@@ -13,6 +13,11 @@
     <AvaloniaResource Include="Assets\**" />
   </ItemGroup>
 
+	
+	<ItemGroup>
+		<AvaloniaResource Include="Assets\icon.png"/>
+	</ItemGroup>
+
   <ItemGroup>
     <PackageReference Include="Avalonia" Version="11.0.10" />
     <PackageReference Include="Avalonia.Desktop" Version="11.0.10" />