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 WPFYifis2
{
    /// <summary>
    /// Логика взаимодействия для JumpWindow.xaml
    /// </summary>
    public partial class JumpWindow : Window
    {
        public JumpWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Label1.Content = Presenter.Singleton.LoggedUser.Name;
            Label2.Content = Presenter.Singleton.LoggedUser.MiddleName;
            Label3.Content = Presenter.Singleton.LoggedUser.Surname;

            Parachute parachute = Presenter.Singleton.GetParachute();
            
            if (parachute != null) 
            {
                Label4.Content = parachute.NomerParashuta;
                Label5.Content = Presenter.Singleton.GetParachuteType();
            }

            Jump jump = Presenter.Singleton.GetJump();

            if (jump != null) 
            {
                Label6.Content = jump.DataJump;
                Label7.Content = jump.TimeJump;
            }

            User instructor = Presenter.Singleton.GetInstructor();

            if (instructor != null) 
            {
                Label8.Content = instructor.Name;
                Label9.Content = instructor.MiddleName;
                Label10.Content = instructor.Surname;
            }
        }
    }
}
