root / GES_PAC / ViewModel / PersonViewModel.cs @ 957b1f34
Historique | Voir | Annoter | Télécharger (669 octets)
1 | 65ad7e66 | Lucas Bihannic | using GES_PAC.Model; |
---|---|---|---|
2 | using System.Collections.ObjectModel; |
||
3 | |||
4 | namespace GES_PAC.ViewModel |
||
5 | { |
||
6 | public class PersonViewModel |
||
7 | { |
||
8 | 18f910c6 | Lucas Bihannic | #region Attributs |
9 | 65ad7e66 | Lucas Bihannic | private static PersonViewModel _instance; |
10 | 18f910c6 | Lucas Bihannic | #endregion |
11 | |||
12 | #region Propriétés |
||
13 | public ObservableCollection<Personne> Persons { get; set; } = new(); |
||
14 | 65ad7e66 | Lucas Bihannic | public static PersonViewModel Instance => _instance ??= new PersonViewModel(); |
15 | 18f910c6 | Lucas Bihannic | #endregion |
16 | 65ad7e66 | Lucas Bihannic | |
17 | 18f910c6 | Lucas Bihannic | #region Constructeur |
18 | 5d673ce0 | Lucas Bihannic | private PersonViewModel() { |
19 | Persons.Add(new Personne("Bond", "James", "jamesbond@inrae.fr")); // Ajout d'une personne par défaut pour les tests |
||
20 | } |
||
21 | 18f910c6 | Lucas Bihannic | #endregion |
22 | 65ad7e66 | Lucas Bihannic | } |
23 | } |