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.ComponentModel;
namespace ISET2018_WPF
{
    /// <summary>
    /// Logique d'interaction pour Fen3.xaml
    /// </summary>
    public partial class Fen3 : Window
    {
        Personne p;
        public Fen3()
        {
            InitializeComponent();
        }

        private void btnVerif_Click(object sender, RoutedEventArgs e)
        {

        }
    }
    public class Data : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void onPropertyChanged(string PropertyName)
        {
            PropertyChangedEventHandler Handler = PropertyChanged;
            if (Handler != null)
                Handler(this, new PropertyChangedEventArgs(PropertyName));
        }
    }
    public class Personne : Data
    {
        private int id;
        private string nom, pre;

        public int ID { get => id; set { id = value; onPropertyChanged("ID"); } }
        public string Nom { get => nom; set { nom = value; onPropertyChanged("Nom"); } }
        public string Pre { get => pre; set { pre = value; onPropertyChanged("Pre"); } }

        public Personne()
        {

        }
        public Personne(string nom, string pre)
        {
            ID = -1;
            Nom = nom; Pre = pre;
        }
        public Personne(int id, string nom, string pre)
        {
            ID = id;Nom = nom;Pre = pre;
        }
 
    }
    public class CMDAssigner : ICommand
    {
        public event EventHandler CanExecuteChanged;
        private Action _Action;
        public CMDAssigner(Action action_)
        {
            _Action = action_;
        }

        public bool CanExecute(object parameter)
        {
            throw new NotImplementedException();
        }

        public void Execute(object parameter)
        {
            if (_Action != null) _Action();
        }
    }
}
