private async void ReadCodeExecute(object obj)
        {
            await GrantPermissions();

            if (CamPermission != PermissionStatus.Granted)
            {
                AlertService.DisplayAlert("Permission denied",
                                          "We need camera permission for scan your code, please check your permissions",
                                          "Got it");
            }
            else
            {
                await NavigationService.NavigateToCodeScanner();
            }
        }
        private async Task SendAsync()
        {
            try
            {
                Email email = new Email
                {
                    From    = From,
                    Subject = Subject,
                    Body    = Body
                };

                await Repo.PostAsync <Email>(email).SetIsBusy(this);

                await AlertService.DisplayAlert("Envoyé avec succès", "Votre message a bien été envoyé.", "OK").SetIsBusy(this);

                From    = string.Empty;
                Subject = string.Empty;
                Body    = string.Empty;
            }
            catch (Exception)
            {
                await AlertService.DisplayAlert("Erreur lors de l'envoi", "Une erreur est survenue pendant l'envoi de votre message, veuillez réessayer plus tard.", "OK").SetIsBusy(this);
            }
        }
Пример #3
0
 public async Task <bool> DisplayAlert(string title, string message, string accept, string cancel)
 {
     return(await AlertService.DisplayAlert(title, message, accept, cancel));
 }
Пример #4
0
 public async Task DisplayAlert(string title, string message, string cancel = "OK")
 {
     await AlertService.DisplayAlert(title, message, cancel);
 }