Statistiques
| Branche: | Révision:

root / GES_PAC / ViewModel / AppShellViewModel.cs @ 4e39035b

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

1
using System.Windows.Input;
2

    
3
namespace GES_PAC.ViewModel
4
{
5
    public class AppShellViewModel : BaseViewModel
6
    {
7

    
8
        public ICommand QuitterCommand { get; private set; }
9
        public AppShellViewModel()
10
        {
11
            QuitterCommand = new Command(async () => await Quitter());
12
        }
13

    
14
        private async Task Quitter()
15
        {
16
            await Task.Delay(100);
17
            bool quitter = await App.Current.MainPage.DisplayAlert("Voulez-vous vraiment quitter l'application ?", "", "Oui", "Non");
18
            if (quitter.Equals(true)) Application.Current.Quit();
19
        }
20

    
21
    }
22
}