Fix path issue

old_branch_before_remy
Jules LASCRET 1 year ago
parent ce7a3a57e0
commit 472cb85796

@ -12,7 +12,9 @@ namespace Qwirkle
{ {
public App() public App()
{ {
Directory.SetCurrentDirectory(Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\Files")); string appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
string targetPath = Path.Combine(appDataPath, "Programs", "Files");
Directory.SetCurrentDirectory(targetPath);
InitializeComponent(); InitializeComponent();
MainPage = new AppShell(); MainPage = new AppShell();
@ -24,6 +26,7 @@ namespace Qwirkle
Routing.RegisterRoute(nameof(Qwirkle.Pages.Leaderboard), typeof(Qwirkle.Pages.Leaderboard)); Routing.RegisterRoute(nameof(Qwirkle.Pages.Leaderboard), typeof(Qwirkle.Pages.Leaderboard));
ILeaderboardPersistence leaderboardLoad = new LeaderboardPersistenceJson(); ILeaderboardPersistence leaderboardLoad = new LeaderboardPersistenceJson();
Ld = leaderboardLoad.LoadLeaderboard(); Ld = leaderboardLoad.LoadLeaderboard();
} }

Loading…
Cancel
Save