Statistiques
| Branche: | Révision:

root / GES_PAC / ViewModel / PlaceViewModel.cs @ e837cdf1

Historique | Voir | Annoter | Télécharger (658 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 12ddf7ef lbihannic
            Places.Add(new Lieu("Elevage Langlade", "INRAE", "Mouton")); // Ajout d'un lieu par défaut pour les tests
21 5d673ce0 Lucas Bihannic
        }
22 18f910c6 Lucas Bihannic
        #endregion
23 65ad7e66 Lucas Bihannic
    }
24
}