mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-10-31 15:36:07 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			55 lines
		
	
	
		
			No EOL
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			No EOL
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using AideDeJeu.Tools;
 | |
| using System;
 | |
| using System.IO;
 | |
| using System.Reflection;
 | |
| using System.Threading.Tasks;
 | |
| 
 | |
| [assembly: Xamarin.Forms.Dependency(typeof(AideDeJeu.GTK.Version_GTK))]
 | |
| namespace AideDeJeu.GTK
 | |
| {
 | |
|     public class Version_GTK : INativeAPI
 | |
|     {
 | |
|         public string GetVersion()
 | |
|         {
 | |
|             return "";
 | |
|             //var context = global::Android.App.Application.Context;
 | |
| 
 | |
|             //PackageManager manager = context.PackageManager;
 | |
|             //PackageInfo info = manager.GetPackageInfo(context.PackageName, 0);
 | |
| 
 | |
|             //return info.VersionName;
 | |
|         }
 | |
| 
 | |
|         public int GetBuild()
 | |
|         {
 | |
|             return 0;
 | |
|             //var context = global::Android.App.Application.Context;
 | |
|             //PackageManager manager = context.PackageManager;
 | |
|             //PackageInfo info = manager.GetPackageInfo(context.PackageName, 0);
 | |
| 
 | |
|             //return info.VersionCode;
 | |
|         }
 | |
| 
 | |
|         public async Task<string> GetDatabasePathAsync(string databaseName)
 | |
|         {
 | |
|             var assembly = typeof(Version_GTK).GetTypeInfo().Assembly;
 | |
|             var path = AppDomain.CurrentDomain.BaseDirectory; // System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
 | |
|             return Path.Combine(path, $"{databaseName}.db");
 | |
|         }
 | |
| 
 | |
|         public Task SaveStreamAsync(string filename, Stream stream)
 | |
|         {
 | |
|             throw new NotImplementedException();
 | |
|         }
 | |
| 
 | |
|         public Stream CreateStream(string filename)
 | |
|         {
 | |
|             throw new NotImplementedException();
 | |
|         }
 | |
| 
 | |
|         public Task LaunchFileAsync(string title, string message, string filePath)
 | |
|         {
 | |
|             throw new NotImplementedException();
 | |
|         }
 | |
|     }
 | |
| } | 
