Statistiques
| Branche: | Révision:

root / GES_PAC / ViewModel / MainViewModel.cs @ fff89fc5

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

1 18f910c6 Lucas Bihannic
using GES_PAC.Services;
2 65ad7e66 Lucas Bihannic
using GES_PAC.View;
3
4
namespace GES_PAC.ViewModel
5
{
6
    public class MainViewModel : BaseViewModel
7
    {
8 18f910c6 Lucas Bihannic
        #region Services
9
        private readonly ConnexionService connService;
10
        #endregion
11
12
        #region Commandes
13 65ad7e66 Lucas Bihannic
        public Command GoToCreateDayCommand { get; }
14 18f910c6 Lucas Bihannic
        #endregion
15
16
        #region Constructeur
17
        public MainViewModel(ConnexionService connService)
18 65ad7e66 Lucas Bihannic
        {
19 18f910c6 Lucas Bihannic
            this.connService = connService;
20 65ad7e66 Lucas Bihannic
            GoToCreateDayCommand = new Command(async () => await GoToCreateDayPage());
21
        }
22 18f910c6 Lucas Bihannic
        #endregion
23 65ad7e66 Lucas Bihannic
24 18f910c6 Lucas Bihannic
        #region Méthodes
25 65ad7e66 Lucas Bihannic
        private async Task GoToCreateDayPage()
26
        {
27 18f910c6 Lucas Bihannic
            IsBusy = true;
28 65ad7e66 Lucas Bihannic
            await Shell.Current.GoToAsync(nameof(CreateDayView));
29 18f910c6 Lucas Bihannic
            IsBusy = false;
30 65ad7e66 Lucas Bihannic
        }
31 18f910c6 Lucas Bihannic
        #endregion
32 65ad7e66 Lucas Bihannic
    }
33
}