Révision 18f910c6 GES_PAC/ViewModel/MainViewModel.cs

Voir les différences:

GES_PAC/ViewModel/MainViewModel.cs
1
using GES_PAC.Services;
1 2
using GES_PAC.View;
2 3

  
3 4
namespace GES_PAC.ViewModel
4 5
{
5 6
    public class MainViewModel : BaseViewModel
6 7
    {
8
        #region Services
9
        private readonly ConnexionService connService;
10
        #endregion
11

  
12
        #region Commandes
7 13
        public Command GoToCreateDayCommand { get; }
8
        public MainViewModel()
14
        #endregion
15

  
16
        #region Constructeur
17
        public MainViewModel(ConnexionService connService)
9 18
        {
19
            this.connService = connService;
10 20
            GoToCreateDayCommand = new Command(async () => await GoToCreateDayPage());
11 21
        }
22
        #endregion
12 23

  
24
        #region Méthodes
13 25
        private async Task GoToCreateDayPage()
14 26
        {
27
            IsBusy = true;
15 28
            await Shell.Current.GoToAsync(nameof(CreateDayView));
29
            IsBusy = false;
16 30
        }
31
        #endregion
17 32
    }
18 33
}

Formats disponibles : Unified diff