Statistiques
| Branche: | Révision:

root / GES_PAC / ViewModel / ChambersViewModel.cs @ 09d4a0de

Historique | Voir | Annoter | Télécharger (823 octets)

1
using GES_PAC.Model;
2
using GES_PAC.View;
3
using System.Windows.Input;
4

    
5
namespace GES_PAC.ViewModel
6
{
7
    public class ChambersViewModel : BaseViewModel
8
    {
9

    
10
        #region Attributs
11
        #endregion
12

    
13
        #region Commandes
14
        public ICommand OnClickChamberCommand { get; }
15
        #endregion
16

    
17
        #region Propriétés
18

    
19
        #endregion
20

    
21
        #region Constructeurs
22
        public ChambersViewModel()
23
        {
24
            OnClickChamberCommand = new Command<int>(async (id) => await GoToEnterAnimal(id));
25

    
26
        }
27
        #endregion
28

    
29
        #region Méthodes
30
        private async Task GoToEnterAnimal(int id)
31
        {
32
            IsBusy = true;
33
            await Shell.Current.GoToAsync($"{nameof(EnterAnimalView)}?chamberId={id}");
34
            IsBusy = false;
35
        }
36
        #endregion
37
    }
38
}