pull/66/head
Alexandre AGOSTINHO 2 years ago
parent 9536f0614e
commit b00cee2d3e

@ -74,7 +74,6 @@ namespace Views
} }
/// <summary> /// <summary>
/// Load XML raw assets from data. /// Load XML raw assets from data.
/// </summary> /// </summary>

@ -82,6 +82,14 @@ namespace Views
newRecipe.Ingredients.AddRange(IngredientList); newRecipe.Ingredients.AddRange(IngredientList);
bool isRecipeSave = Master.Recipe.AddRecipeToData(newRecipe); 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) if (isRecipeSave)
{ {
await DisplayAlert("Succès", "La recette a été ajoutée avec succès", "OK"); await DisplayAlert("Succès", "La recette a été ajoutée avec succès", "OK");

@ -1,5 +1,6 @@
using AppException; using AppException;
using Model; using Model;
using System.Diagnostics;
namespace Views; namespace Views;
@ -24,6 +25,13 @@ public partial class Login : ContentPage
try try
{ {
usermgr.AddUserToData(usermgr.CreateUser(mail, password)); 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) catch (BadMailFormatException)
{ {

Loading…
Cancel
Save