diff --git a/source/Trek-12/Trek-12/App.xaml.cs b/source/Trek-12/Trek-12/App.xaml.cs
index 08757e4..35a7a0c 100644
--- a/source/Trek-12/Trek-12/App.xaml.cs
+++ b/source/Trek-12/Trek-12/App.xaml.cs
@@ -1,10 +1,26 @@
-namespace Trek_12
+using DataContractPersistence;
+using Models.Game;
+
+namespace Trek_12
{
public partial class App : Application
{
+ public string FileName { get; set; } = "data.json";
+
+ public string FilePath { get; set; } = Path.Combine(AppDomain.CurrentDomain.BaseDirectory);
+
+ public Game Manager { get; private set; }
+
public App()
{
InitializeComponent();
+
+ if(File.Exists(Path.Combine(FilePath, FileName)))
+ {
+ Manager = new Game(new DataContractJson());
+ }
+
+ Manager.LoadData();
MainPage = new AppShell();
}
diff --git a/source/Trek-12/Trek-12/Trek-12.csproj b/source/Trek-12/Trek-12/Trek-12.csproj
index 58891bc..8048ee5 100644
--- a/source/Trek-12/Trek-12/Trek-12.csproj
+++ b/source/Trek-12/Trek-12/Trek-12.csproj
@@ -56,9 +56,9 @@
-
-
-
+
+
+
@@ -68,32 +68,33 @@
-
-
-
+
+
+
+
-
-
- PageLeaderBoard.xaml
-
-
- PageProfils.xaml
-
-
- PageRegles.xaml
-
+
+
+ PageLeaderBoard.xaml
+
+
+ PageProfils.xaml
+
+
+ PageRegles.xaml
+
-
- MSBuild:Compile
+
+ MSBuild:Compile
-
- MSBuild:Compile
+
+ MSBuild:Compile
-
- MSBuild:Compile
+
+ MSBuild:Compile