diff --git a/AideDeJeu/AideDeJeu/Views/PlayerCharacter/PdfViewPage.xaml.cs b/AideDeJeu/AideDeJeu/Views/PlayerCharacter/PdfViewPage.xaml.cs index 7a2e3572..0569ae25 100644 --- a/AideDeJeu/AideDeJeu/Views/PlayerCharacter/PdfViewPage.xaml.cs +++ b/AideDeJeu/AideDeJeu/Views/PlayerCharacter/PdfViewPage.xaml.cs @@ -53,6 +53,16 @@ namespace AideDeJeu.Views.PlayerCharacter await DependencyService.Get().OpenPdfAsync(filePath); } + if(result == "Envoyer vers...") + { + string filePath = Path.Combine(Xamarin.Essentials.FileSystem.CacheDirectory, Path.Combine("pdf", WebUtility.UrlEncode(PdfFile.Result))); + + await Xamarin.Essentials.Share.RequestAsync(new Xamarin.Essentials.ShareFileRequest + { + Title = PdfFile.Result, + File = new Xamarin.Essentials.ShareFile(filePath) + }); + } } } } \ No newline at end of file