예제 #1
0
 private async Task CreateProfileAsync()
 {
     try
     {
         await Button.SpinAsync(async() =>
         {
             await HardwareVaultService.CreateProfileAsync(AccessProfile);
             await ToastService.ShowToastAsync("Hardware vault profile created.", ToastType.Success);
             await ModalDialogClose();
         });
     }
     catch (Exception ex)
     {
         Logger.LogError(ex.Message);
         await ToastService.ShowToastAsync(ex.Message, ToastType.Error);
         await ModalDialogCancel();
     }
 }
예제 #2
0
        private async Task CreateProfileAsync()
        {
            try
            {
                await ButtonSpinner.SpinAsync(async() =>
                {
                    await HardwareVaultService.CreateProfileAsync(AccessProfile);
                    await ToastService.ShowToastAsync("Hardware vault profile created.", ToastType.Success);
                    await SynchronizationService.UpdateHardwareVaultProfiles(ExceptPageId);
                    await ModalDialogService.CloseAsync();
                });
            }
            catch (Exception ex)
            {
                Logger.LogError(ex.Message);
                await ToastService.ShowToastAsync(ex.Message, ToastType.Error);

                await ModalDialogService.CancelAsync();
            }
        }