mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-30 22:49:53 +08:00
[GUI] Upgrade Avalonia to 12.1.0 and enable compiled bindings (#666)
* [GUI] bump to avalonia 12 * [GUI] add compiled bindings for cards/console logs/game metas * [GUI] enable compiled bindings across launcher XAML
This commit is contained in:
@@ -5,6 +5,8 @@ using System.Text.Json;
|
||||
|
||||
namespace SharpEmu.GUI;
|
||||
|
||||
public sealed record LanguageInfo(string Code, string NativeName);
|
||||
|
||||
/// <summary>
|
||||
/// Loads UI strings for the launcher. Every language ships embedded in the
|
||||
/// assembly (see SharpEmu.GUI.csproj) so a release build is fully
|
||||
@@ -16,8 +18,6 @@ public sealed class Localization
|
||||
{
|
||||
public static Localization Instance { get; } = new();
|
||||
|
||||
public sealed record LanguageInfo(string Code, string NativeName);
|
||||
|
||||
private const string EmbeddedResourcePrefix = "Languages.";
|
||||
private const string EmbeddedResourceSuffix = ".json";
|
||||
|
||||
@@ -242,7 +242,7 @@ public sealed class Localization
|
||||
result = loaded;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private bool TryLoad(string code, string json)
|
||||
{
|
||||
if (TryLoad(json, out var dict))
|
||||
|
||||
Reference in New Issue
Block a user