diff --git a/Sources/Stim/AddGamePage.xaml b/Sources/Stim/AddGamePage.xaml
index 4d1680c..ab1becb 100644
--- a/Sources/Stim/AddGamePage.xaml
+++ b/Sources/Stim/AddGamePage.xaml
@@ -32,17 +32,18 @@
-
+
-
+
-
+
+
-
+
diff --git a/Sources/Stim/App.xaml.cs b/Sources/Stim/App.xaml.cs
index 592efd6..1bfe84d 100644
--- a/Sources/Stim/App.xaml.cs
+++ b/Sources/Stim/App.xaml.cs
@@ -11,6 +11,20 @@ public partial class App : Application
{
InitializeComponent();
MainPage = new AppShell();
- Manager = new(new Stub());
+ if (File.Exists(Path.Combine(FileSystem.Current.AppDataDirectory, "games.xml"))) Manager = new Manager(new Persistance(FileSystem.Current.AppDataDirectory));
+ else Manager = new(new Stub());
}
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ Window window = base.CreateWindow(activationState);
+
+ window.Stopped += (s, e) =>
+ {
+ Manager._persistance = new Persistance(FileSystem.Current.AppDataDirectory);
+ var test = Manager;
+ Manager.SaveGames();
+ };
+
+ return window;
+ }
}
diff --git a/Sources/Stim/MainPage.xaml b/Sources/Stim/MainPage.xaml
index f8d814f..60b038e 100644
--- a/Sources/Stim/MainPage.xaml
+++ b/Sources/Stim/MainPage.xaml
@@ -53,7 +53,7 @@
-
+
diff --git a/Sources/Stim/Resources/Styles/Styles.xaml b/Sources/Stim/Resources/Styles/Styles.xaml
index 43284fa..785c236 100644
--- a/Sources/Stim/Resources/Styles/Styles.xaml
+++ b/Sources/Stim/Resources/Styles/Styles.xaml
@@ -82,7 +82,7 @@