Beispiel #1
0
        public async Task LoadSongsAsync()
        {
            var getSongsResponse = await _songService.GetSongsAsync();

            if (getSongsResponse.HasError)
            {
                await _modalService.ShowAsync("Erreur lors du chargement des musiques", getSongsResponse.ErrorMessage);
            }
            else
            {
                Songs = getSongsResponse.Content;
            }
        }
Beispiel #2
0
        public static async Task <DialogResult> ShowMessageAsync(this IModalService service, string?title, string?text, MessageBoxButtons buttons, bool requireInteraction = true)
        {
            var model = new MessageBoxModel()
            {
                Title              = title,
                Text               = text,
                Buttons            = buttons,
                RequireInteraction = requireInteraction
            };

            await service.ShowAsync(model);

            return(model.DialogResult);
        }