Skip to content

Commit

Permalink
Added some form close logic to subforms
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyeao committed Nov 27, 2023
1 parent fc4dc1c commit fe84ef6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions HA-Game-SPy/GameAddWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ private async Task SaveGamesAsync(List<GameInfo> games)

string json = JsonConvert.SerializeObject(games, Formatting.Indented); // Using Formatting.Indented for readability
await File.WriteAllTextAsync(gamesFilePath, json);
this.Close(); // Close the window after saving
}

#endregion Private Methods
Expand Down
1 change: 1 addition & 0 deletions HA-Game-SPy/GameListWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private async Task SaveGamesAsync(List<GameInfo> games)

string json = JsonConvert.SerializeObject(validGames, Formatting.Indented); // Serialize the valid games into JSON
await File.WriteAllTextAsync(gamesFilePath, json); // Write the JSON to the file
this.Close(); // Close the window after saving
}


Expand Down
4 changes: 2 additions & 2 deletions HA-Game-SPy/HA-Game-SPy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<RootNamespace>HA_Game_SPy</RootNamespace>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<AssemblyVersion>1.0.0.104</AssemblyVersion>
<FileVersion>1.0.0.104</FileVersion>
<AssemblyVersion>1.0.0.106</AssemblyVersion>
<FileVersion>1.0.0.106</FileVersion>
<ApplicationIcon>trans.ico</ApplicationIcon>
<PackageIcon>download.png</PackageIcon>
</PropertyGroup>
Expand Down

0 comments on commit fe84ef6

Please sign in to comment.