diff --git a/.vs/UWPHook/v14/.suo b/.vs/UWPHook/v14/.suo index 2164a2c..963230a 100644 Binary files a/.vs/UWPHook/v14/.suo and b/.vs/UWPHook/v14/.suo differ diff --git a/UWPHook/GameModel.cs b/UWPHook/GameModel.cs index f0803bf..9132eb5 100644 --- a/UWPHook/GameModel.cs +++ b/UWPHook/GameModel.cs @@ -18,7 +18,10 @@ namespace UWPHook public GameModel() { games = new ObservableCollection(); - var y = JsonConvert.DeserializeObject("games.json"); + using (StreamReader read = new StreamReader("games.json")) + { + games = JsonConvert.DeserializeObject>(read.ReadToEnd()); + } } private ObservableCollection _games; @@ -37,8 +40,10 @@ namespace UWPHook public void Store() { JsonSerializer serializer = new JsonSerializer(); - using (StreamWriter sw = new StreamWriter(@"games.json")) { - using (JsonWriter writer = new JsonTextWriter(sw)){ + using (StreamWriter sw = new StreamWriter(@"games.json")) + { + using (JsonWriter writer = new JsonTextWriter(sw)) + { serializer.Serialize(writer, _games); } } diff --git a/UWPHook/bin/Debug/UWPHook.exe b/UWPHook/bin/Debug/UWPHook.exe index ab3d49e..83afebc 100644 Binary files a/UWPHook/bin/Debug/UWPHook.exe and b/UWPHook/bin/Debug/UWPHook.exe differ diff --git a/UWPHook/bin/Debug/UWPHook.pdb b/UWPHook/bin/Debug/UWPHook.pdb index 789cd27..9474841 100644 Binary files a/UWPHook/bin/Debug/UWPHook.pdb and b/UWPHook/bin/Debug/UWPHook.pdb differ diff --git a/UWPHook/bin/Debug/games.json b/UWPHook/bin/Debug/games.json index 60c1836..8950874 100644 --- a/UWPHook/bin/Debug/games.json +++ b/UWPHook/bin/Debug/games.json @@ -1,15 +1 @@ -[ - - { - "game_alias": "teste", - "game_path": "teste" - }, - { - "game_alias": "teste", - "game_path": "teste" - }, - { - "game_alias": "teste", - "game_path": "teste" - } -] \ No newline at end of file +[{"game_alias":"teste","game_path":"teste"},{"game_alias":"teste","game_path":"teste"},{"game_alias":"teste","game_path":"teste"},{"game_alias":"teste","game_path":"teste"},{"game_alias":"teste","game_path":"teste"}] \ No newline at end of file diff --git a/UWPHook/games.json b/UWPHook/games.json index d177980..8950874 100644 --- a/UWPHook/games.json +++ b/UWPHook/games.json @@ -1,3 +1 @@ -{ - -} +[{"game_alias":"teste","game_path":"teste"},{"game_alias":"teste","game_path":"teste"},{"game_alias":"teste","game_path":"teste"},{"game_alias":"teste","game_path":"teste"},{"game_alias":"teste","game_path":"teste"}] \ No newline at end of file diff --git a/UWPHook/obj/Debug/UWPHook.exe b/UWPHook/obj/Debug/UWPHook.exe index ab3d49e..83afebc 100644 Binary files a/UWPHook/obj/Debug/UWPHook.exe and b/UWPHook/obj/Debug/UWPHook.exe differ diff --git a/UWPHook/obj/Debug/UWPHook.pdb b/UWPHook/obj/Debug/UWPHook.pdb index 789cd27..9474841 100644 Binary files a/UWPHook/obj/Debug/UWPHook.pdb and b/UWPHook/obj/Debug/UWPHook.pdb differ