Ethosa 3 years ago
parent
commit
7551e66fd4

+ 1 - 1
Project_Shilkina1/App.xaml

@@ -9,7 +9,7 @@
                 <ResourceDictionary Source="Dictionary.xaml"/>
             </ResourceDictionary.MergedDictionaries>
             <Style TargetType="{x:Type Label}">
-                <Setter Property="Background" Value="AntiqueWhite"/>
+                <Setter Property="Background" Value="Bisque"/>
                 <Setter Property="Padding" Value="0"/>
             </Style>
         </ResourceDictionary>

+ 20 - 5
Project_Shilkina1/MainWindow.xaml

@@ -8,8 +8,8 @@
         Title="MainWindow" Height="450" Width="800">
     <Grid Margin="0,0,0,-6" RenderTransformOrigin="0.795,0.508">
         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="157*"/>
-            <ColumnDefinition Width="643*"/>
+            <ColumnDefinition Width="333*"/>
+            <ColumnDefinition Width="67*"/>
         </Grid.ColumnDefinitions>
         <Grid HorizontalAlignment="Left" Width="790" Grid.ColumnSpan="2" Margin="10,0,0,0" RenderTransformOrigin="0.502,0.896">
             <Grid.RowDefinitions>
@@ -18,10 +18,25 @@
                 <RowDefinition Height="*"/>
             </Grid.RowDefinitions>
             <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="*"/>
-                <ColumnDefinition/>
-                <ColumnDefinition Width="*"/>
+                <ColumnDefinition Width="11*"/>
+                <ColumnDefinition Width="745*"/>
+                <ColumnDefinition Width="0*"/>
+                <ColumnDefinition Width="34*"/>
             </Grid.ColumnDefinitions>
+            <Button x:Name="ButtonBack" Content="Назад" HorizontalAlignment="Left" Margin="10,23,0,0" Grid.Row="1" VerticalAlignment="Top" Width="39" Height="19" Grid.ColumnSpan="2"/>
+            <Rectangle HorizontalAlignment="Left" Height="259" Margin="10,60,0,0" Grid.Row="1" Stroke="Black" VerticalAlignment="Top" Width="438" Grid.ColumnSpan="2" RenderTransformOrigin="0.5,0.5">
+                <Rectangle.RenderTransform>
+                    <TransformGroup>
+                        <ScaleTransform/>
+                        <SkewTransform AngleY="-0.356"/>
+                        <RotateTransform/>
+                        <TranslateTransform Y="-1.362"/>
+                    </TransformGroup>
+                </Rectangle.RenderTransform>
+            </Rectangle>
+            <Rectangle Fill="Bisque" Grid.Row="2" StrokeThickness="0"/>
+            <Frame x:Name="MainFrame" Source="PAGES/Page1.xaml" Grid.Row="1" Navigated="MainFrame_OnNavigated" Margin="10,61,308,118" Grid.ColumnSpan="2"/>
+
         </Grid>
     </Grid>
 </Window>

+ 25 - 0
Project_Shilkina1/MainWindow.xaml.cs

@@ -24,5 +24,30 @@ namespace Project_Shilkina1
         {
             InitializeComponent();
         }
+
+        private void MainFrame_Navigated(object sender, NavigationEventArgs e)
+        {
+
+        }
+
+        private void MainFrame_Navigated_1(object sender, NavigationEventArgs e)
+        {
+
+        }
+
+        private void MainFrame_OnNavigated(object sender, NavigationEventArgs e)
+        {
+            if (!(e.Content is Page page)) return;
+            this.Title = $"LESSON - {page.Title}";
+
+            if (page is Page)
+            {
+                ButtonBack.Visibility = Visibility.Hidden;
+            }
+            else
+            {
+                ButtonBack.Visibility = Visibility.Visible;
+            }
+        }
     }
 }

+ 32 - 0
Project_Shilkina1/PAGES/Page1.xaml

@@ -0,0 +1,32 @@
+<Page x:Class="Project_Shilkina1.PAGES.Page1"
+      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+      xmlns:local="clr-namespace:Project_Shilkina1.PAGES"
+      mc:Ignorable="d" 
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="Page1">
+
+    <Grid Background="#FFE4C3C3">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="55*"/>
+            <RowDefinition Height="102*"/>
+            <RowDefinition Height="80*"/>
+            <RowDefinition Height="213*"/>
+        </Grid.RowDefinitions>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="*"/>
+            <ColumnDefinition Width="92*"/>
+            <ColumnDefinition Width="211*"/>
+            <ColumnDefinition Width="*"/>
+        </Grid.ColumnDefinitions>
+        <Label Content="Логин" Margin="0,0,30,10" Grid.Column="1" Grid.Row="1"/>
+        <Label Content="Пароль" Margin="0,33,30,10" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2"/>
+        <TextBox x:Name="TextBoxLogin" Text="" TextWrapping="Wrap" Grid.Column="2" Margin="0,4,10,10" Grid.Row="1"/>
+        <TextBox x:Name="TextBoxPassword" Text="" TextWrapping="Wrap" Grid.Column="2" Margin="0,0,10,8" Grid.Row="2"/>
+        <Button Content="Вход" Grid.Column="2" HorizontalAlignment="Left" Margin="59,10,0,0" Grid.Row="3" VerticalAlignment="Top" Click="Button_Click" Height="20" Width="30"/>
+        <Button Content="Регистрация" Grid.Column="2" HorizontalAlignment="Left" Margin="38,35,0,0" Grid.Row="3" VerticalAlignment="Top" Height="20" Width="72"/>
+
+    </Grid>
+</Page>

+ 38 - 0
Project_Shilkina1/PAGES/Page1.xaml.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+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.Navigation;
+using System.Windows.Shapes;
+
+namespace Project_Shilkina1.PAGES
+{
+    /// <summary>
+    /// Логика взаимодействия для Page1.xaml
+    /// </summary>
+    public partial class Page1 : Page
+    {
+        public Page1()
+        {
+            InitializeComponent();
+        }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+            if (string.IsNullOrEmpty(TextBoxLogin.Text) || string.IsNullOrEmpty(TextBoxPassword.Text)){ 
+                    
+                MessageBox.Show("Введите логин или пароль!");
+            return;
+        }
+        }
+
+         
+     }
+}
+

+ 14 - 0
Project_Shilkina1/PAGES/Page2.xaml

@@ -0,0 +1,14 @@
+<Page x:Class="Project_Shilkina1.PAGES.Page2"
+      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+      xmlns:local="clr-namespace:Project_Shilkina1.PAGES"
+      mc:Ignorable="d" 
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="Page2">
+
+    <Grid Background="White">
+        
+    </Grid>
+</Page>

+ 26 - 0
Project_Shilkina1/PAGES/Page2.xaml.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+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.Navigation;
+using System.Windows.Shapes;
+
+namespace Project_Shilkina1.PAGES
+{
+    /// <summary>
+    /// Логика взаимодействия для Page2.xaml
+    /// </summary>
+    public partial class Page2 : Page
+    {
+        public Page2()
+        {
+            InitializeComponent();
+        }
+    }
+}