mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 06:56:10 +00:00
Version iOS fonctionnelle
This commit is contained in:
parent
a6a1c53e9b
commit
bfe8f0d81f
1 changed files with 19 additions and 20 deletions
|
|
@ -6,27 +6,26 @@ using Foundation;
|
||||||
[assembly: Xamarin.Forms.Dependency(typeof(AideDeJeu.Droid.Version_Android))]
|
[assembly: Xamarin.Forms.Dependency(typeof(AideDeJeu.Droid.Version_Android))]
|
||||||
namespace AideDeJeu.Droid
|
namespace AideDeJeu.Droid
|
||||||
{
|
{
|
||||||
public class Version_Android : INativeAPI
|
public class Version_Android : INativeAPI
|
||||||
{
|
{
|
||||||
public string GetVersion()
|
public string GetVersion()
|
||||||
{
|
{
|
||||||
|
|
||||||
return NSBundle.MainBundle.InfoDictionary[new NSString("CFBundleShortVersionString")].ToString();
|
return NSBundle.MainBundle.InfoDictionary[new NSString("CFBundleShortVersionString")].ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetBuild()
|
public int GetBuild()
|
||||||
{
|
{
|
||||||
var buildVersion = NSBundle.MainBundle.InfoDictionary[new NSString("CFBundleVersion")].ToString();
|
var buildVersion = NSBundle.MainBundle.InfoDictionary[new NSString("CFBundleVersion")].ToString();
|
||||||
int build = 0;
|
int build = 0;
|
||||||
var res = int.TryParse(buildVersion, out build);
|
var res = int.TryParse(buildVersion, out build);
|
||||||
return res ? build : 0;
|
return res ? build : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetDatabasePath(string databaseName)
|
public string GetDatabasePath(string databaseName)
|
||||||
{
|
{
|
||||||
SQLitePCL.Batteries_V2.Init();
|
var databasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "..", "Library", databaseName);
|
||||||
var databasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "..", "Library", databaseName);
|
return databasePath;
|
||||||
return databasePath;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue