root / GES_PAC / ViewModel / PlaceViewModel.cs @ 5d673ce0
Historique | Voir | Annoter | Télécharger (660 octets)
1 | 65ad7e66 | Lucas Bihannic | using GES_PAC.Model; |
---|---|---|---|
2 | using System.Collections.ObjectModel; |
||
3 | |||
4 | |||
5 | namespace GES_PAC.ViewModel |
||
6 | { |
||
7 | public class PlaceViewModel |
||
8 | { |
||
9 | 18f910c6 | Lucas Bihannic | #region Attributs |
10 | 65ad7e66 | Lucas Bihannic | private static PlaceViewModel _instance; |
11 | 18f910c6 | Lucas Bihannic | #endregion |
12 | 65ad7e66 | Lucas Bihannic | |
13 | 18f910c6 | Lucas Bihannic | #region Propriétés |
14 | public ObservableCollection<Lieu> Places { get; set; } = new(); |
||
15 | public static PlaceViewModel Instance => _instance ??= new PlaceViewModel(); |
||
16 | #endregion |
||
17 | |||
18 | #region Constructeur |
||
19 | 5d673ce0 | Lucas Bihannic | private PlaceViewModel() { |
20 | Places.Add(new Lieu("Ferme du soleil", "Dupont", "Chèvres")); // Ajout d'un lieu par défaut pour les tests |
||
21 | } |
||
22 | 18f910c6 | Lucas Bihannic | #endregion |
23 | 65ad7e66 | Lucas Bihannic | } |
24 | } |