1 5 سال پیش
والد
کامیت
e3d93e973d

+ 32 - 0
InteractiveKiosk/Construction.xaml

@@ -0,0 +1,32 @@
+<Window x:Class="InteractiveKiosk.Construction"
+        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"
+        Title="Кафе и рестораны" Height="600" Width="800" Loaded="Window_Loaded">
+    <Grid>
+        <ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Disabled">
+            <TabControl HorizontalAlignment="Left" Height="549" VerticalAlignment="Top" Width="5000">
+                <TabItem Header="Кафе">
+                    <DataGrid Name="RP" AutoGenerateColumns="False">
+                        <DataGrid.Columns>
+                            <DataGridTextColumn Header="Наименование" Binding="{Binding ConstructionName}" Width="0.04*"></DataGridTextColumn>
+                            <DataGridTextColumn Header="Описание" Binding="{Binding DescriptionOfTheConstruction}" Width="0.05*"></DataGridTextColumn>
+                            <DataGridTextColumn Header="Статус" Binding="{Binding StatusOfTheConstruction}" Width="0.2*"></DataGridTextColumn>
+                            <DataGridTextColumn Header="Изображение" Binding="{Binding ImageConstruction}" Width="0.5*"></DataGridTextColumn>
+                            <DataGridTextColumn Header="Тип сооружения" Binding="{Binding IDTypeOfConstruction}" Width="0.1*"></DataGridTextColumn>
+                        </DataGrid.Columns>
+                    </DataGrid>
+                </TabItem>
+                <TabItem Header="Киоски">
+                    <Grid Background="#FFE5E5E5"/>
+                </TabItem>
+                <TabItem Header="Прочее">
+                    <Grid Background="#FFE5E5E5"/>
+                </TabItem>
+            </TabControl>
+        </ScrollViewer>
+    </Grid>
+</Window>

+ 33 - 0
InteractiveKiosk/Construction.xaml.cs

@@ -0,0 +1,33 @@
+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>
+    /// Логика взаимодействия для Construction.xaml
+    /// </summary>
+    public partial class Construction : Window
+    {
+        InteractiveKioskEntities db = new InteractiveKioskEntities();
+        public Construction()
+        {
+            InitializeComponent();
+        }
+
+        public void Window_Loaded(object sender, RoutedEventArgs e)
+        {
+            RP.ItemsSource = db.Constructions.ToList();
+        }
+    }
+}

+ 7 - 0
InteractiveKiosk/InteractiveKiosk.csproj

@@ -80,6 +80,9 @@
     <Compile Include="AttractionSchedule.cs">
       <DependentUpon>DataBase.tt</DependentUpon>
     </Compile>
+    <Compile Include="Construction.xaml.cs">
+      <DependentUpon>Construction.xaml</DependentUpon>
+    </Compile>
     <Compile Include="ConstructionInPlace.cs">
       <DependentUpon>DataBase.tt</DependentUpon>
     </Compile>
@@ -158,6 +161,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Construction.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="MainWindow.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 1 - 1
InteractiveKiosk/MainWindow.xaml

@@ -12,7 +12,7 @@
         </Button>
         <Button Content="ДОСТОПРИМЕЧАТЕЛЬНОСТИ" HorizontalAlignment="Left" Margin="291,633,0,0" VerticalAlignment="Top" Width="242" Height="110" FontSize="11" FontFamily="Century Gothic" Background="#00000000">
         </Button>
-        <Button Content="КАФЕ И РЕСТОРАНЫ" HorizontalAlignment="Left" Margin="291,748,0,0" VerticalAlignment="Top" Width="242" Height="110" FontSize="11" Background="#00000000" FontFamily="Century Gothic"/>
+        <Button Content="КАФЕ И РЕСТОРАНЫ" HorizontalAlignment="Left" Margin="291,748,0,0" VerticalAlignment="Top" Width="242" Height="110" FontSize="11" Background="#00000000" FontFamily="Century Gothic" Click="Constructions"/>
         <Button Content="АТТРАКЦИОНЫ" HorizontalAlignment="Left" Margin="538,633,0,0" VerticalAlignment="Top" Width="99" Height="225" FontSize="11" FontFamily="Century Gothic" Background="#00000000" Click="Attractions"/>
         <Button Content="АФИША ПАРКА" HorizontalAlignment="Left" Margin="476,342,0,0" VerticalAlignment="Top" Width="194" Height="42" FontFamily="Century Gothic" Background="#00000000"/>
         <Button Content="ПОДРОБНЕЕ" HorizontalAlignment="Left" Margin="253,195,0,0" VerticalAlignment="Top" Width="180" Height="40" FontFamily="Century Gothic" Background="#00000000" Click="More"/>

+ 15 - 0
InteractiveKiosk/MainWindow.xaml.cs

@@ -94,5 +94,20 @@ namespace InteractiveKiosk
             this.Opacity = 1;
             this.Effect = null;
         }
+
+        private void Constructions(object sender, RoutedEventArgs e)
+        {
+            this.Opacity = 0.5;
+            this.Effect = new BlurEffect();
+            Construction c = new Construction()
+            {
+                Owner = this,
+                ShowInTaskbar = false,
+                Topmost = true
+            };
+            c.ShowDialog();
+            this.Opacity = 1;
+            this.Effect = null;
+        }
     }
 }