mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-10-31 07:26:09 +00:00 
			
		
		
		
	LauchFileAsync uwp pour le pdf
This commit is contained in:
		
							parent
							
								
									78427093e4
								
							
						
					
					
						commit
						69091936b6
					
				
					 1 changed files with 19 additions and 4 deletions
				
			
		|  | @ -1,8 +1,13 @@ | ||||||
| using AideDeJeu.Tools; | using AideDeJeu.Tools; | ||||||
|  | using System.Collections.Generic; | ||||||
| using System.IO; | using System.IO; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| using System.Threading.Tasks; | using System.Threading.Tasks; | ||||||
| using Windows.ApplicationModel; | using Windows.ApplicationModel; | ||||||
|  | using Windows.ApplicationModel.DataTransfer; | ||||||
|  | using Windows.Foundation; | ||||||
|  | using Windows.Storage; | ||||||
|  | using System; | ||||||
| 
 | 
 | ||||||
| [assembly: Xamarin.Forms.Dependency(typeof(AideDeJeu.UWP.Version_UWP))] | [assembly: Xamarin.Forms.Dependency(typeof(AideDeJeu.UWP.Version_UWP))] | ||||||
| namespace AideDeJeu.UWP | namespace AideDeJeu.UWP | ||||||
|  | @ -103,10 +108,20 @@ namespace AideDeJeu.UWP | ||||||
|             return new FileStream(filepath, FileMode.Create); |             return new FileStream(filepath, FileMode.Create); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         //public void OpenFileExternal(string filename) |         public async Task LaunchFileAsync(string title, string message, string filePath) | ||||||
|         //{ |         { | ||||||
| 
 |             try | ||||||
|         //} |             { | ||||||
|  |                 if (!string.IsNullOrWhiteSpace(filePath)) | ||||||
|  |                 { | ||||||
|  |                     StorageFile attachment = await StorageFile.GetFileFromPathAsync(filePath); | ||||||
|  |                     var success = await Windows.System.Launcher.LaunchFileAsync(attachment); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             finally | ||||||
|  |             { | ||||||
|  |             } | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yan Maniez
						Yan Maniez