debut cours

This commit is contained in:
Administrator 2018-10-08 08:23:15 +02:00
parent df56e0405a
commit 63f4d4e3e5
1 changed files with 36 additions and 1 deletions

View File

@ -11,7 +11,7 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.ComponentModel;
namespace ISET2018_WPF
{
/// <summary>
@ -24,4 +24,39 @@ namespace ISET2018_WPF
InitializeComponent();
}
}
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; }
public string Nom { get => nom; set => nom = value; }
public string Pre { get => pre; set => pre = value; }
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;
}
}
}