mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-10-31 07:26:09 +00:00 
			
		
		
		
	MaJ GTK
This commit is contained in:
		
							parent
							
								
									02062c8b9c
								
							
						
					
					
						commit
						a304207ad5
					
				
					 2 changed files with 5 additions and 28 deletions
				
			
		|  | @ -198,6 +198,7 @@ | |||
|   <ItemGroup> | ||||
|     <Content Include="..\..\Data\library.db"> | ||||
|       <Link>library.db</Link> | ||||
|       <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||||
|     </Content> | ||||
|     <None Include="app.config" /> | ||||
|     <None Include="OpenTK.dll.config" /> | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| using AideDeJeu.Tools; | ||||
| using System; | ||||
| using System.IO; | ||||
| using System.Reflection; | ||||
| using System.Threading.Tasks; | ||||
| 
 | ||||
| [assembly: Xamarin.Forms.Dependency(typeof(AideDeJeu.GTK.Version_GTK))] | ||||
|  | @ -31,34 +32,9 @@ namespace AideDeJeu.GTK | |||
| 
 | ||||
|         public async Task<string> GetDatabasePathAsync(string databaseName) | ||||
|         { | ||||
|             return null; | ||||
|             //var documentsDirectoryPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); | ||||
|             //var path = Path.Combine(documentsDirectoryPath, databaseName); | ||||
| 
 | ||||
|             //// This is where we copy in our pre-created database | ||||
|             //if (!File.Exists(path)) | ||||
|             //{ | ||||
|             //    using (var inStream = Android.App.Application.Context.Assets.Open(databaseName)) | ||||
|             //    { | ||||
|             //        using (var outStream = new FileStream(path, FileMode.Create)) | ||||
|             //        { | ||||
|             //            inStream.CopyTo(outStream); | ||||
|             //        } | ||||
|             //    } | ||||
|             //    //using (var binaryReader = new BinaryReader(Android.App.Application.Context.Assets.Open(databaseName))) | ||||
|             //    //{ | ||||
|             //    //    using (var binaryWriter = new BinaryWriter(new FileStream(path, FileMode.Create))) | ||||
|             //    //    { | ||||
|             //    //        byte[] buffer = new byte[2048]; | ||||
|             //    //        int length = 0; | ||||
|             //    //        while ((length = binaryReader.Read(buffer, 0, buffer.Length)) > 0) | ||||
|             //    //        { | ||||
|             //    //            binaryWriter.Write(buffer, 0, length); | ||||
|             //    //        } | ||||
|             //    //    } | ||||
|             //    //} | ||||
|             //} | ||||
|             //return path; | ||||
|             var assembly = typeof(Version_GTK).GetTypeInfo().Assembly; | ||||
|             var path = AppDomain.CurrentDomain.BaseDirectory; // System.Reflection.Assembly.GetExecutingAssembly().CodeBase; | ||||
|             return Path.Combine(path, $"{databaseName}.db"); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yan Maniez
						Yan Maniez