using Business;
using Modèle;
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 WpfApp1
{
    /// <summary>
    /// Logique d'interaction pour UserControlEdit.xaml
    /// </summary>
    public partial class UserControlEdit : UserControl
    {
        public UserControlEdit()
        {
            InitializeComponent();

        }

        public Manager Manager => (Application.Current as App).LeManager;


        private Requin _requin;
        public Requin requin
        {
            get { return _requin; }
            set
            {
                _requin = value;
                UptadeUi(_requin);
            }
        }




     
        public void UptadeUi(Requin requin)
        {
            leNom.Contenu = requin.Nom;
            nomSci.Contenu = requin.NomSci;
            desc.Contenu = requin.Description;
            LienPhoto.Contenu = requin.Photo;
            LienVid.Contenu = requin.Video;
            LienMap.Contenu = requin.PhotoCarte;
            funFact.Contenu = requin.FunFact;
        }

        private void exit_Click(object sender, RoutedEventArgs e)
        {
            ((MainWindow)System.Windows.Application.Current.MainWindow).ContentControlSwapAcc();
        }


    }
}
