diff --git a/MCTG/Views/App.xaml.cs b/MCTG/Views/App.xaml.cs index a36e2a5..0dd959c 100644 --- a/MCTG/Views/App.xaml.cs +++ b/MCTG/Views/App.xaml.cs @@ -73,7 +73,6 @@ namespace Views base.OnSleep(); } - /// /// Load XML raw assets from data. diff --git a/MCTG/Views/ContentPages/AddRecipe.xaml.cs b/MCTG/Views/ContentPages/AddRecipe.xaml.cs index fa62bdb..c6ca924 100644 --- a/MCTG/Views/ContentPages/AddRecipe.xaml.cs +++ b/MCTG/Views/ContentPages/AddRecipe.xaml.cs @@ -82,6 +82,14 @@ namespace Views newRecipe.Ingredients.AddRange(IngredientList); bool isRecipeSave = Master.Recipe.AddRecipeToData(newRecipe); + + // Save data. + Debug.Write($"[ {DateTime.Now:H:mm:ss} ] Saving...\t"); + Master.Data.SaveData(); + + Debug.WriteLine("Done."); + Debug.WriteLine(FileSystem.Current.AppDataDirectory); + if (isRecipeSave) { await DisplayAlert("Succès", "La recette a été ajoutée avec succès", "OK"); diff --git a/MCTG/Views/ContentPages/Login.xaml.cs b/MCTG/Views/ContentPages/Login.xaml.cs index ac40aa2..4bdb2c6 100644 --- a/MCTG/Views/ContentPages/Login.xaml.cs +++ b/MCTG/Views/ContentPages/Login.xaml.cs @@ -1,5 +1,6 @@ using AppException; using Model; +using System.Diagnostics; namespace Views; @@ -24,6 +25,13 @@ public partial class Login : ContentPage try { usermgr.AddUserToData(usermgr.CreateUser(mail, password)); + + // Save data. + Debug.Write($"[ {DateTime.Now:H:mm:ss} ] Saving...\t"); + Master.Data.SaveData(); + + Debug.WriteLine("Done."); + Debug.WriteLine(FileSystem.Current.AppDataDirectory); } catch (BadMailFormatException) {