From 0b3df7e82838738558250c37d493e6dd2ce0da6c Mon Sep 17 00:00:00 2001 From: Anthony RICHARD Date: Mon, 5 Jun 2023 10:45:54 +0200 Subject: [PATCH] suppression des vertical stack layout dans les popups --- Sources/AppConsole/Program.cs | 7 +++---- Sources/Stim/App.xaml.cs | 17 ++++++++++++++--- Sources/Stim/EntryPopup.xaml | 3 +-- Sources/Stim/MessagePopup.xaml | 10 ++++------ 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/Sources/AppConsole/Program.cs b/Sources/AppConsole/Program.cs index 82354c2..ef64994 100644 --- a/Sources/AppConsole/Program.cs +++ b/Sources/AppConsole/Program.cs @@ -1,4 +1,5 @@ -using Model; +using Microsoft.VisualBasic; +using Model; using StimPersistance; using StimStub; using System.Diagnostics.CodeAnalysis; @@ -10,9 +11,7 @@ namespace AppConsole { static void Main(string[] args) { - Manager stub = new(new Stub()); - Manager persistance = new(new Persistance("../../../../")); - persistance.Mgrpersistance.SaveGame(stub.GameList); + Console.WriteLine(""); } } } \ No newline at end of file diff --git a/Sources/Stim/App.xaml.cs b/Sources/Stim/App.xaml.cs index 6d9c550..c1d580b 100644 --- a/Sources/Stim/App.xaml.cs +++ b/Sources/Stim/App.xaml.cs @@ -1,6 +1,7 @@ using Model; using StimPersistance; using StimStub; +using System.Diagnostics; namespace Stim; @@ -20,9 +21,19 @@ public partial class App : Application window.Stopped += (s, e) => { - Manager.Mgrpersistance = new Persistance(FileSystem.Current.AppDataDirectory); - Manager.SaveGames(); - Manager.SaveUser(); + if (!(File.Exists(Path.Combine(FileSystem.Current.AppDataDirectory, "games.xml")))) + { + Manager Manager2 = new(new Persistance(FileSystem.Current.AppDataDirectory)); + Manager2.GameList = Manager.GameList; + Manager2.Users = Manager2.Users; + Manager2.SaveGames(); + Manager2.SaveUser(); + } + else + { + Manager.SaveGames(); + Manager.SaveUser(); + } }; return window; diff --git a/Sources/Stim/EntryPopup.xaml b/Sources/Stim/EntryPopup.xaml index 2a0b30b..d01b91c 100644 --- a/Sources/Stim/EntryPopup.xaml +++ b/Sources/Stim/EntryPopup.xaml @@ -4,11 +4,10 @@ xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit" x:Class="Stim.EntryPopup" CanBeDismissedByTappingOutsideOfPopup="False"> - +