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