Артем Гавриленко 3 年之前
父節點
當前提交
1cf611fad9

二進制
TerminalKFC/Images/img4.jpg


二進制
TerminalKFC/Images/img5.jpg


+ 6 - 1
TerminalKFC/MainWindow.xaml.cs

@@ -13,7 +13,12 @@ namespace TerminalKFC
 
         private void MakeAnOrderButton(object sender, RoutedEventArgs e)
         {
-            //Window1 ow = new Window1();
+            Windows.SeatSelectionWindow ssw = new Windows.SeatSelectionWindow();
+            ssw.ShowDialog();
+            this.Hide();
+
+            Windows.OrderWindow ow = new Windows.OrderWindow();
+            ow.Show();
         }
     }
 }

+ 11 - 1
TerminalKFC/TerminalKFC.csproj

@@ -58,6 +58,9 @@
     <Compile Include="Windows\OrderWindow.xaml.cs">
       <DependentUpon>OrderWindow.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Windows\SeatSelectionWindow.xaml.cs">
+      <DependentUpon>SeatSelectionWindow.xaml</DependentUpon>
+    </Compile>
     <Page Include="MainWindow.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -74,6 +77,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Windows\SeatSelectionWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs">
@@ -101,7 +108,10 @@
   <ItemGroup>
     <None Include="App.config" />
   </ItemGroup>
-  <ItemGroup />
+  <ItemGroup>
+    <Resource Include="Images\img4.jpg" />
+    <Resource Include="Images\img5.jpg" />
+  </ItemGroup>
   <ItemGroup>
     <Resource Include="Images\img1.jpg" />
   </ItemGroup>

+ 6 - 1
TerminalKFC/Windows/OrderWindow.xaml

@@ -5,7 +5,12 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:TerminalKFC.Windows"
         mc:Ignorable="d"
-        Title="OrderWindow" Height="450" Width="800">
+        Title="OrderWindow" 
+        Height="450" 
+        Width="800"
+        WindowStartupLocation="CenterScreen"
+        ResizeMode="NoResize" 
+        WindowStyle="None">
     <Grid>
         
     </Grid>

+ 1 - 13
TerminalKFC/Windows/OrderWindow.xaml.cs

@@ -1,16 +1,4 @@
-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;
+using System.Windows;
 
 namespace TerminalKFC.Windows
 {

+ 49 - 0
TerminalKFC/Windows/SeatSelectionWindow.xaml

@@ -0,0 +1,49 @@
+<Window x:Class="TerminalKFC.Windows.SeatSelectionWindow"
+        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:TerminalKFC.Windows"
+        mc:Ignorable="d"
+        Title="SeatSelectionWindow" 
+        Height="250" 
+        Width="400"
+        WindowStartupLocation="CenterScreen"
+        WindowStyle="None"
+        ResizeMode="NoResize">
+    <Grid Background="#FFCFE9FF">
+        <Image
+            HorizontalAlignment="Left" 
+            Height="100"
+            Width="150"
+            Margin="40,60,0,0" 
+            VerticalAlignment="Top"
+            Source="../Images/img4.jpg"
+            Stretch="Fill"
+            MouseDown="Button"/>
+        <Image
+            HorizontalAlignment="Left" 
+            Height="100"
+            Width="150"
+            Margin="217,60,0,0" 
+            VerticalAlignment="Top"
+            Source="../Images/img5.jpg"
+            Stretch="Fill"
+            MouseDown="Button">
+        </Image>
+        <Label
+            Content="Здесь" 
+            HorizontalAlignment="Left" 
+            Margin="80,160,0,0"
+            VerticalAlignment="Top"
+            FontWeight="Bold"
+            FontSize="16"/>
+        <Label
+            Content="С собой" 
+            HorizontalAlignment="Left" 
+            Margin="262,160,0,0" 
+            VerticalAlignment="Top" 
+            FontWeight="Bold"
+            FontSize="16"/>
+    </Grid>
+</Window>

+ 19 - 0
TerminalKFC/Windows/SeatSelectionWindow.xaml.cs

@@ -0,0 +1,19 @@
+using System.Windows;
+
+namespace TerminalKFC.Windows
+{
+    /// <summary>
+    /// Логика взаимодействия для SeatSelectionWindow.xaml
+    /// </summary>
+    public partial class SeatSelectionWindow : Window
+    {
+        public SeatSelectionWindow()
+        {
+            InitializeComponent();
+        }
+        private void Button(object sender, RoutedEventArgs e)
+        {
+            this.Close();
+        }
+    }
+}