using CanYouBuildIt.Model;
using System.Diagnostics;

namespace CanYouBuildIt;

public partial class App : Application
{
	public Manager manager { get; private set; } = new Manager(new Stub());
	public App()
	{
		string appDirectory = AppContext.BaseDirectory;
		int sousDossier = 53;
		appDirectory = appDirectory.Substring(0, appDirectory.Length - sousDossier);
		Directory.SetCurrentDirectory(appDirectory);
		Debug.WriteLine("Directory");
        Debug.WriteLine(Directory.GetCurrentDirectory());
        manager.chargeDonne();
		manager.Persi = new DataContractPersistance.DataContractPers();
		manager.sauvegardeDonnee();
		Debug.WriteLine(manager.listUtil[0]);
		InitializeComponent();

		MainPage = new AppShell();
	}
}
