Browse Source

Добавил страницу "CustomerMenu", где можно пользоваться переходами на другие страницы

Ethosa 3 years ago
parent
commit
780277bca1

+ 1 - 1
Тураев_БД 11.20.1/Pages/AuthPage.xaml.cs

@@ -36,7 +36,7 @@ namespace Тураев_БД_11._20._1.Pages
 
         private void ButtonRegistration_OnClick(object sender, RoutedEventArgs e)
         {
-            NavigationService?.Navigate(new Page2());
+            NavigationService?.Navigate(new CustomerMenu());
         }
     }
 }

+ 17 - 0
Тураев_БД 11.20.1/Pages/CustomerMenu.xaml

@@ -0,0 +1,17 @@
+<Page x:Class="Тураев_БД_11._20._1.Pages.CustomerMenu"
+      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:Тураев_БД_11._20._1.Pages"
+      mc:Ignorable="d" 
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="CustomerMenu">
+
+    <Grid>
+        <Button Content="Переход 1" Click="ButtonPage1_OnClick" HorizontalAlignment="Left" Margin="247,154,0,0" VerticalAlignment="Top" Width="309" Height="39"/>
+        <Button Content="Переход 2" Click="ButtonPage2_OnClick" HorizontalAlignment="Left" Margin="247,198,0,0" VerticalAlignment="Top" Width="309" Height="39"/>
+        <Button Content="Переход 3" Click="ButtonPage3_OnClick" HorizontalAlignment="Left" Margin="247,242,0,0" VerticalAlignment="Top" Width="309" Height="39"/>
+
+    </Grid>
+</Page>

+ 43 - 0
Тураев_БД 11.20.1/Pages/CustomerMenu.xaml.cs

@@ -0,0 +1,43 @@
+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.Navigation;
+using System.Windows.Shapes;
+
+namespace Тураев_БД_11._20._1.Pages
+{
+    /// <summary>
+    /// Логика взаимодействия для CustomerMenu.xaml
+    /// </summary>
+    public partial class CustomerMenu : Page
+    {
+        public CustomerMenu()
+        {
+            InitializeComponent();
+        }
+
+        private void ButtonPage1_OnClick(object sender, RoutedEventArgs e)
+        {
+            NavigationService?.Navigate(new Page2());
+        }
+
+        private void ButtonPage2_OnClick(object sender, RoutedEventArgs e)
+        {
+            NavigationService?.Navigate(new AuthPage());
+        }
+
+        private void ButtonPage3_OnClick(object sender, RoutedEventArgs e)
+        {
+            NavigationService?.Navigate(new Menu());
+        }
+    }
+}

+ 7 - 0
Тураев_БД 11.20.1/Тураев_БД 11.20.1.csproj

@@ -75,6 +75,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Pages\CustomerMenu.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Pages\Page2.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -84,6 +88,9 @@
     <Compile Include="Pages\AuthPage.xaml.cs">
       <DependentUpon>AuthPage.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Pages\CustomerMenu.xaml.cs">
+      <DependentUpon>CustomerMenu.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Pages\Page2.xaml.cs">
       <DependentUpon>Page2.xaml</DependentUpon>
     </Compile>