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.Events
{
    /// <summary>
    /// Interaction logic for ChildrensDay.xaml
    /// </summary>
    public partial class ChildrensDay : Window
    {
        InteractiveKioskEntities db = new InteractiveKioskEntities();
        public ChildrensDay()
        {
            InitializeComponent();

            string Children = "День защиты детей";
            var SelectedChildren = db.Events.SingleOrDefault(a => a.EventName == Children);
            DescriptionChildren.Text = SelectedChildren.EventDescription;
            //Beginning.Text = SelectedChildren.BeginningOfEvent;
            //Ending.Text = SelectedChildren.EndingOfEvent;
        }

        private void BackButton_MouseDown(object sender, MouseButtonEventArgs e)
        {
            EventsWindow ew = new EventsWindow();
            ew.Show();
            this.Close();
        }

        private void MinButton_MouseDown(object sender, MouseButtonEventArgs e)
        {
            this.WindowState = WindowState.Minimized;
        }

        private void ExitButton_MouseDown(object sender, MouseButtonEventArgs e)
        {
            this.Close();
        }
    }
}
