debut cours
This commit is contained in:
@@ -11,7 +11,7 @@ using System.Windows.Input;
|
|||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
using System.ComponentModel;
|
||||||
namespace ISET2018_WPF
|
namespace ISET2018_WPF
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -24,4 +24,39 @@ namespace ISET2018_WPF
|
|||||||
InitializeComponent();
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user