diff --git a/src/ColorMC.Core/Asm/NettyServer.cs b/src/ColorMC.Core/Asm/NettyServer.cs
index 00ecac98f..c2d9839f2 100644
--- a/src/ColorMC.Core/Asm/NettyServer.cs
+++ b/src/ColorMC.Core/Asm/NettyServer.cs
@@ -14,8 +14,15 @@ public static class NettyServer
private static ServerBootstrap s_bootstrap;
private static IChannel s_channel;
+ ///
+ /// 客户端信道
+ ///
private static readonly List s_channels = [];
+ ///
+ /// 获取所有正在使用的端口
+ ///
+ /// 端口列表
private static List PortIsUsed()
{
var ipGlobalProperties = IPGlobalProperties.GetIPGlobalProperties();
@@ -31,10 +38,14 @@ private static List PortIsUsed()
return allPorts;
}
+ ///
+ /// 获取一个没有使用的端口
+ ///
+ /// 端口
private static int GetFirstAvailablePort()
{
var portUsed = PortIsUsed();
- if (portUsed.Count > 50000)
+ if (portUsed.Count > 5000)
{
return -1;
}
@@ -50,6 +61,10 @@ private static int GetFirstAvailablePort()
while (true);
}
+ ///
+ /// 启动游戏端口服务器
+ ///
+ ///
public static async Task RunServerAsync()
{
if (s_channel != null)
@@ -66,8 +81,7 @@ public static async Task RunServerAsync()
s_bootstrap
.ChildHandler(new ActionChannelInitializer(channel =>
{
- IChannelPipeline pipeline = channel.Pipeline;
- pipeline.AddLast("echo", new EchoServerHandler());
+ channel.Pipeline.AddLast("colormc", new EchoServerHandler());
}));
int port = GetFirstAvailablePort();
@@ -82,6 +96,9 @@ public static async Task RunServerAsync()
}
}
+ ///
+ /// 停止游戏端口服务器
+ ///
private static async void Stop()
{
await s_channel.CloseAsync();
@@ -128,7 +145,7 @@ public override void ChannelRead(IChannelHandlerContext context, object message)
{
if (message is IByteBuffer buffer)
{
- ColorMCCore.NettyPack?.Invoke(context.Channel, buffer);
+ ColorMCCore.OnNettyPack(context.Channel, buffer);
}
}
diff --git a/src/ColorMC.Core/Config/ConfigUtils.cs b/src/ColorMC.Core/Config/ConfigUtils.cs
index 7dd8b0eca..c861c6c8d 100644
--- a/src/ColorMC.Core/Config/ConfigUtils.cs
+++ b/src/ColorMC.Core/Config/ConfigUtils.cs
@@ -47,7 +47,7 @@ public static bool Load(string local, bool quit = false)
}
catch (Exception e)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Config.Error1"), e, true);
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Config.Error1"), e, true);
}
}
else if (!quit)
diff --git a/src/ColorMC.Core/CoreMain.cs b/src/ColorMC.Core/CoreMain.cs
index eedab0a7f..487617fe2 100644
--- a/src/ColorMC.Core/CoreMain.cs
+++ b/src/ColorMC.Core/CoreMain.cs
@@ -50,42 +50,88 @@ public static class ColorMCCore
///
/// 消息
public delegate void UpdateState(string? text);
- public delegate Task UpdateSelect(string? text);
+ ///
+ /// 启动选择框
+ ///
+ /// 消息
+ /// 是否确定
+ public delegate Task ChoiseCall(string? text);
+ ///
+ /// 没有Java
+ ///
public delegate void NoJava();
+ ///
+ /// Java解压
+ ///
public delegate void JavaUnzip();
- public delegate Task LoginFail(LoginObj obj);
+ ///
+ /// 登录失败是否继续运行
+ ///
+ /// 账户
+ /// 是否继续运行
+ public delegate Task LoginFailRun(LoginObj obj);
+ ///
+ /// OAuth登录
+ ///
+ /// 网址
+ /// 登陆码
public delegate void LoginOAuthCode(string url, string code);
+ ///
+ /// 游戏复写
+ ///
+ /// 游戏实例
+ /// 是否复写
public delegate Task GameOverwirte(GameSettingObj obj);
+ ///
+ /// 整合包进度更新
+ ///
+ /// 总进度
+ /// 目前进度
public delegate void PackUpdate(int size, int now);
+ ///
+ /// 下载器状态更新
+ ///
+ /// 状态
public delegate void DownloaderUpdate(DownloadState state);
+ ///
+ /// 下载项目状态更新
+ ///
+ /// 项目
+ public delegate void DownloadItemUpdate(DownloadItemObj obj);
+ ///
+ /// 压缩包导入状态改变
+ ///
+ /// 状态
public delegate void PackState(CoreRunState state);
+ ///
+ /// 游戏启动信息更新
+ ///
+ /// 游戏实例
+ /// 当前状态
public delegate void GameLaunch(GameSettingObj obj, LaunchState state);
- public delegate void DownloadItemUpdate(DownloadItemObj obj);
///
- /// 开始下载
+ /// 下载用的回调
///
- public static Func, Task>? OnStartDownload;
+ public static Func, Task>? TopDownload;
///
/// 错误显示回调
/// 标题 错误 关闭程序
///
- public static event Action? OnError;
+ public static event Action? Error;
///
/// 游戏日志回调
///
- public static event Action? OnGameLog;
+ public static event Action? GameLog;
///
/// 语言重载
///
- public static event Action? OnLanguageReload;
-
+ public static event Action? LanguageReload;
///
/// 收到游戏数据包
///
- public static Action? NettyPack;
-
+ public static event Action? NettyPack;
///
/// 游戏退出事件
///
@@ -132,7 +178,6 @@ public static class ColorMCCore
internal static ConcurrentDictionary Games = [];
-
///
/// 初始化阶段1
///
@@ -176,34 +221,34 @@ public static void Close()
Stop?.Invoke();
}
- public static void Error(string text, Exception? e, bool close)
+ public static void KillGame(string uuid)
{
- OnError?.Invoke(text, e, close);
- Logs.Error(text, e);
+ if (Games.TryGetValue(uuid, out var handel))
+ {
+ handel.Kill();
+ }
}
- public static void GameLog(GameSettingObj obj, string? text)
+ internal static void OnError(string text, Exception? e, bool close)
{
- OnGameLog?.Invoke(obj, text);
+ Error?.Invoke(text, e, close);
+ Logs.Error(text, e);
}
- public static void LanguageReload(LanguageType type)
+ internal static void OnGameLog(GameSettingObj obj, string? text)
{
- OnLanguageReload?.Invoke(type);
+ GameLog?.Invoke(obj, text);
}
- public static void OnGameExit(GameSettingObj obj, LoginObj obj1, int code)
+ internal static void OnLanguageReload(LanguageType type)
{
- Games.TryRemove(obj.UUID, out _);
- GameExit?.Invoke(obj, obj1, code);
+ LanguageReload?.Invoke(type);
}
- public static void KillGame(string uuid)
+ internal static void OnGameExit(GameSettingObj obj, LoginObj obj1, int code)
{
- if (Games.TryGetValue(uuid, out var handel))
- {
- handel.Kill();
- }
+ Games.TryRemove(obj.UUID, out _);
+ GameExit?.Invoke(obj, obj1, code);
}
internal static void AddGame(string uuid, IGameHandel handel)
@@ -213,4 +258,9 @@ internal static void AddGame(string uuid, IGameHandel handel)
Games[uuid] = handel;
}
}
+
+ internal static void OnNettyPack(IChannel channel, IByteBuffer buffer)
+ {
+ NettyPack?.Invoke(channel, buffer);
+ }
}
\ No newline at end of file
diff --git a/src/ColorMC.Core/Downloader/DownloadManager.cs b/src/ColorMC.Core/Downloader/DownloadManager.cs
index a1855ec43..43fa87236 100644
--- a/src/ColorMC.Core/Downloader/DownloadManager.cs
+++ b/src/ColorMC.Core/Downloader/DownloadManager.cs
@@ -125,13 +125,13 @@ private static void Clear()
public static Task StartAsync(ICollection list)
{
- if (ColorMCCore.OnStartDownload == null)
+ if (ColorMCCore.TopDownload == null)
{
return StartAsync(list, null, null);
}
else
{
- return ColorMCCore.OnStartDownload(list);
+ return ColorMCCore.TopDownload(list);
}
}
@@ -141,8 +141,7 @@ public static Task StartAsync(ICollection list)
/// 下载列表
/// 结果
public static async Task StartAsync(ICollection list,
- ColorMCCore.DownloaderUpdate? update,
- ColorMCCore.DownloadItemUpdate? update1)
+ ColorMCCore.DownloaderUpdate? update, ColorMCCore.DownloadItemUpdate? update1)
{
var names = new List();
//下载器是否在运行
diff --git a/src/ColorMC.Core/Game/GameLaunch.cs b/src/ColorMC.Core/Game/GameLaunch.cs
index 329d5c506..f7fe7f40b 100644
--- a/src/ColorMC.Core/Game/GameLaunch.cs
+++ b/src/ColorMC.Core/Game/GameLaunch.cs
@@ -62,7 +62,7 @@ public static List MakeInstallForgeArg(this GameSettingObj obj, bool v2)
var libraries = new List(list.Values);
var classpath = new StringBuilder();
var sep = SystemInfo.Os == OsType.Windows ? ';' : ':';
- ColorMCCore.GameLog(obj, LanguageHelper.Get("Core.Launch.Info2"));
+ ColorMCCore.OnGameLog(obj, LanguageHelper.Get("Core.Launch.Info2"));
//添加lib路径到classpath
foreach (var item in libraries)
@@ -149,11 +149,11 @@ public static void CmdRun(GameSettingObj obj, string cmd, Dictionary
{
- ColorMCCore.GameLog(obj, b.Data);
+ ColorMCCore.OnGameLog(obj, b.Data);
};
p.ErrorDataReceived += (a, b) =>
{
- ColorMCCore.GameLog(obj, b.Data);
+ ColorMCCore.OnGameLog(obj, b.Data);
};
p.Start();
@@ -829,7 +829,7 @@ private static async Task MakeClassPathAsync(GameSettingObj obj, bool v2
var libraries = await GetLibsAsync(obj, v2);
var classpath = new StringBuilder();
var sep = SystemInfo.Os == OsType.Windows ? ';' : ':';
- ColorMCCore.GameLog(obj, LanguageHelper.Get("Core.Launch.Info2"));
+ ColorMCCore.OnGameLog(obj, LanguageHelper.Get("Core.Launch.Info2"));
if (enableasm)
{
@@ -860,7 +860,7 @@ private static async Task MakeClassPathAsync(GameSettingObj obj, bool v2
foreach (var item in libraries)
{
classpath.Append($"{item}{sep}");
- ColorMCCore.GameLog(obj, $" {item}");
+ ColorMCCore.OnGameLog(obj, $" {item}");
}
classpath.Remove(classpath.Length - 1, 1);
@@ -1011,8 +1011,8 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
///
public static async Task StartGameAsync(this GameSettingObj obj, LoginObj login,
WorldObj? world, ColorMCCore.Request request, ColorMCCore.LaunchP pre,
- ColorMCCore.UpdateState state, ColorMCCore.UpdateSelect select,
- ColorMCCore.NoJava nojava, ColorMCCore.LoginFail loginfail,
+ ColorMCCore.UpdateState state, ColorMCCore.ChoiseCall select,
+ ColorMCCore.NoJava nojava, ColorMCCore.LoginFailRun loginfail,
ColorMCCore.GameLaunch update2, int? mixinport,
CancellationToken token)
{
@@ -1067,7 +1067,7 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
stopwatch.Stop();
string temp = string.Format(LanguageHelper.Get("Core.Launch.Info4"),
obj.Name, stopwatch.Elapsed.ToString());
- ColorMCCore.GameLog(obj, temp);
+ ColorMCCore.OnGameLog(obj, temp);
Logs.Info(temp);
if (obj.ModPackType == SourceType.ColorMC && !string.IsNullOrWhiteSpace(obj.ServerUrl))
@@ -1078,7 +1078,7 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
stopwatch.Stop();
temp = string.Format(LanguageHelper.Get("Core.Launch.Info14"),
obj.Name, stopwatch.Elapsed.ToString());
- ColorMCCore.GameLog(obj, temp);
+ ColorMCCore.OnGameLog(obj, temp);
Logs.Info(temp);
if (pack == false)
{
@@ -1098,7 +1098,7 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
stopwatch.Stop();
temp = string.Format(LanguageHelper.Get("Core.Launch.Info5"),
obj.Name, stopwatch.Elapsed.ToString());
- ColorMCCore.GameLog(obj, temp);
+ ColorMCCore.OnGameLog(obj, temp);
Logs.Info(temp);
if (obj.GetModeFast() && obj.Loader == Loaders.Normal)
@@ -1136,7 +1136,7 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
stopwatch.Stop();
temp = string.Format(LanguageHelper.Get("Core.Launch.Info7"),
obj.Name, stopwatch.Elapsed.ToString());
- ColorMCCore.GameLog(obj, temp);
+ ColorMCCore.OnGameLog(obj, temp);
Logs.Info(temp);
}
}
@@ -1169,7 +1169,7 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
//准备Jvm参数
update2(obj, LaunchState.JvmPrepare);
var arg = await MakeArgAsync(obj, login, world, jvm!, mixinport);
- ColorMCCore.GameLog(obj, LanguageHelper.Get("Core.Launch.Info1"));
+ ColorMCCore.OnGameLog(obj, LanguageHelper.Get("Core.Launch.Info1"));
bool hidenext = false;
if (SystemInfo.Os != OsType.Android)
{
@@ -1178,11 +1178,11 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
if (hidenext)
{
hidenext = false;
- ColorMCCore.GameLog(obj, "******");
+ ColorMCCore.OnGameLog(obj, "******");
}
else
{
- ColorMCCore.GameLog(obj, item);
+ ColorMCCore.OnGameLog(obj, item);
}
var low = item.ToLower();
if (low.StartsWith("--uuid") || low.StartsWith("--accesstoken"))
@@ -1192,8 +1192,8 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
}
}
- ColorMCCore.GameLog(obj, LanguageHelper.Get("Core.Launch.Info3"));
- ColorMCCore.GameLog(obj, path);
+ ColorMCCore.OnGameLog(obj, LanguageHelper.Get("Core.Launch.Info3"));
+ ColorMCCore.OnGameLog(obj, path);
if (token.IsCancellationRequested)
{
@@ -1282,11 +1282,11 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
res1.StartInfo.RedirectStandardOutput = true;
res1.OutputDataReceived += (a, b) =>
{
- ColorMCCore.GameLog(obj, b.Data);
+ ColorMCCore.OnGameLog(obj, b.Data);
};
res1.ErrorDataReceived += (a, b) =>
{
- ColorMCCore.GameLog(obj, b.Data);
+ ColorMCCore.OnGameLog(obj, b.Data);
};
res1.Start();
res1.BeginOutputReadLine();
@@ -1296,7 +1296,7 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
stopwatch.Stop();
string temp1 = string.Format(LanguageHelper.Get("Core.Launch.Info8"),
obj.Name, stopwatch.Elapsed.ToString());
- ColorMCCore.GameLog(obj, temp1);
+ ColorMCCore.OnGameLog(obj, temp1);
Logs.Info(temp1);
}
}
@@ -1309,7 +1309,7 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
stopwatch.Stop();
string temp1 = string.Format(LanguageHelper.Get("Core.Launch.Info8"),
obj.Name, stopwatch.Elapsed.ToString());
- ColorMCCore.GameLog(obj, temp1);
+ ColorMCCore.OnGameLog(obj, temp1);
Logs.Info(temp1);
}
}
@@ -1317,7 +1317,7 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
{
string temp2 = string.Format(LanguageHelper.Get("Core.Launch.Info10"),
obj.Name);
- ColorMCCore.GameLog(obj, temp2);
+ ColorMCCore.OnGameLog(obj, temp2);
Logs.Info(temp2);
}
}
@@ -1351,11 +1351,11 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
res1.StartInfo.RedirectStandardOutput = true;
res1.OutputDataReceived += (a, b) =>
{
- ColorMCCore.GameLog(obj, b.Data);
+ ColorMCCore.OnGameLog(obj, b.Data);
};
res1.ErrorDataReceived += (a, b) =>
{
- ColorMCCore.GameLog(obj, b.Data);
+ ColorMCCore.OnGameLog(obj, b.Data);
};
res1.Start();
res1.BeginOutputReadLine();
@@ -1413,11 +1413,11 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
process.OutputDataReceived += (a, b) =>
{
- ColorMCCore.GameLog(obj, b.Data);
+ ColorMCCore.OnGameLog(obj, b.Data);
};
process.ErrorDataReceived += (a, b) =>
{
- ColorMCCore.GameLog(obj, b.Data);
+ ColorMCCore.OnGameLog(obj, b.Data);
};
process.Exited += (a, b) =>
{
@@ -1431,7 +1431,7 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
stopwatch.Stop();
temp = string.Format(LanguageHelper.Get("Core.Launch.Info6"),
obj.Name, stopwatch.Elapsed.ToString());
- ColorMCCore.GameLog(obj, temp);
+ ColorMCCore.OnGameLog(obj, temp);
Logs.Info(temp);
var handel = new DesktopGameHandel(process, obj.UUID);
@@ -1459,14 +1459,14 @@ private static async Task> MakeArgAsync(GameSettingObj obj, LoginOb
start = ReplaceArg(obj, path!, arg, start);
CmdRun(obj, start, env);
stopwatch.Stop();
- ColorMCCore.GameLog(obj, string.Format(LanguageHelper.Get("Core.Launch.Info9"),
+ ColorMCCore.OnGameLog(obj, string.Format(LanguageHelper.Get("Core.Launch.Info9"),
obj.Name, stopwatch.Elapsed.ToString()));
}
}
}
else
{
- ColorMCCore.GameLog(obj, string.Format(LanguageHelper.Get("Core.Launch.Info11"),
+ ColorMCCore.OnGameLog(obj, string.Format(LanguageHelper.Get("Core.Launch.Info11"),
obj.Name));
}
}
diff --git a/src/ColorMC.Core/Game/ServerPack.cs b/src/ColorMC.Core/Game/ServerPack.cs
index 5e1053a05..43f18a25c 100644
--- a/src/ColorMC.Core/Game/ServerPack.cs
+++ b/src/ColorMC.Core/Game/ServerPack.cs
@@ -465,7 +465,7 @@ public static async Task GenServerPackAsync(this ServerPackObj obj, string
/// 网址
/// 结果
public static async Task ServerPackCheckAsync(this GameSettingObj obj,
- ColorMCCore.UpdateState state, ColorMCCore.UpdateSelect select)
+ ColorMCCore.UpdateState state, ColorMCCore.ChoiseCall select)
{
var obj2 = obj.GetServerPack();
var res = await BaseClient.GetStringAsync(obj.ServerUrl + "sha1");
diff --git a/src/ColorMC.Core/Game/Worlds.cs b/src/ColorMC.Core/Game/Worlds.cs
index 25bff9c30..e865d2aff 100644
--- a/src/ColorMC.Core/Game/Worlds.cs
+++ b/src/ColorMC.Core/Game/Worlds.cs
@@ -269,7 +269,7 @@ public static async Task UnzipBackupWorldAsync(this GameSettingObj obj, Fi
}
catch (Exception e)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Game.Error11"), e, false);
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Game.Error11"), e, false);
return false;
}
}
diff --git a/src/ColorMC.Core/Helpers/DownloadItemHelper.cs b/src/ColorMC.Core/Helpers/DownloadItemHelper.cs
index bbebdabff..9f9d109e4 100644
--- a/src/ColorMC.Core/Helpers/DownloadItemHelper.cs
+++ b/src/ColorMC.Core/Helpers/DownloadItemHelper.cs
@@ -558,7 +558,7 @@ public static async Task> BuildGameLibsAsync(Game
}
catch (Exception e)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Forge.Error4"), e, false);
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Forge.Error4"), e, false);
return (GetDownloadState.Init, null);
}
diff --git a/src/ColorMC.Core/Helpers/InstallGameHelper.cs b/src/ColorMC.Core/Helpers/InstallGameHelper.cs
index 6087cf01a..1b7b6140a 100644
--- a/src/ColorMC.Core/Helpers/InstallGameHelper.cs
+++ b/src/ColorMC.Core/Helpers/InstallGameHelper.cs
@@ -301,7 +301,7 @@ public static class InstallGameHelper
}
catch (Exception e)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Pack.Error2"), e, false);
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Pack.Error2"), e, false);
}
finally
{
diff --git a/src/ColorMC.Core/Helpers/LanguageHelper.cs b/src/ColorMC.Core/Helpers/LanguageHelper.cs
index c2d7d55d2..5d28324fa 100644
--- a/src/ColorMC.Core/Helpers/LanguageHelper.cs
+++ b/src/ColorMC.Core/Helpers/LanguageHelper.cs
@@ -45,7 +45,7 @@ public static void Change(LanguageType type)
s_nowType = type;
Load(type);
- ColorMCCore.LanguageReload(type);
+ ColorMCCore.OnLanguageReload(type);
}
///
@@ -62,13 +62,13 @@ public static string GetName(this AuthType type)
{
return type switch
{
- AuthType.Offline => Get("AuthType.Offline"),
- AuthType.OAuth => Get("AuthType.OAuth"),
- AuthType.Nide8 => Get("AuthType.Nide8"),
- AuthType.AuthlibInjector => Get("AuthType.AuthlibInjector"),
- AuthType.LittleSkin => Get("AuthType.LittleSkin"),
- AuthType.SelfLittleSkin => Get("AuthType.SelfLittleSkin"),
- _ => Get("AuthType.Other")
+ AuthType.Offline => Get("Type.AuthType.Offline"),
+ AuthType.OAuth => Get("Type.AuthType.OAuth"),
+ AuthType.Nide8 => Get("Type.AuthType.Nide8"),
+ AuthType.AuthlibInjector => Get("Type.AuthType.AuthlibInjector"),
+ AuthType.LittleSkin => Get("Type.AuthType.LittleSkin"),
+ AuthType.SelfLittleSkin => Get("Type.AuthType.SelfLittleSkin"),
+ _ => Get("Type.AuthType.Other")
};
}
@@ -76,12 +76,12 @@ public static string GetName(this AuthState state)
{
return state switch
{
- AuthState.OAuth => Get("AuthType.Other"),
- AuthState.XBox => Get("AuthType.XBox"),
- AuthState.XSTS => Get("AuthType.XSTS"),
- AuthState.Token => Get("AuthType.Token"),
- AuthState.Profile => Get("AuthType.Profile"),
- _ => Get("AuthType.Other")
+ AuthState.OAuth => Get("Type.AuthType.Other"),
+ AuthState.XBox => Get("Type.AuthType.XBox"),
+ AuthState.XSTS => Get("Type.AuthType.XSTS"),
+ AuthState.Token => Get("Type.AuthType.Token"),
+ AuthState.Profile => Get("Type.AuthType.Profile"),
+ _ => Get("Type.AuthType.Other")
};
}
@@ -89,12 +89,12 @@ public static string GetName(this LoginState state)
{
return state switch
{
- LoginState.Done => Get("LoginState.Done"),
- LoginState.TimeOut => Get("LoginState.TimeOut"),
- LoginState.JsonError => Get("LoginState.JsonError"),
- LoginState.Error => Get("LoginState.Error"),
- LoginState.Crash => Get("LoginState.Crash"),
- _ => Get("LoginState.Other")
+ LoginState.Done => Get("Type.LoginState.Done"),
+ LoginState.TimeOut => Get("Type.LoginState.TimeOut"),
+ LoginState.JsonError => Get("Type.LoginState.JsonError"),
+ LoginState.Error => Get("Type.LoginState.Error"),
+ LoginState.Crash => Get("Type.LoginState.Crash"),
+ _ => Get("Type.LoginState.Other")
};
}
@@ -102,27 +102,27 @@ public static string GetName(this LaunchState state)
{
return state switch
{
- LaunchState.Check => Get("LaunchState.Check"),
- LaunchState.CheckVersion => Get("LaunchState.CheckVersion"),
- LaunchState.CheckLib => Get("LaunchState.CheckLib"),
- LaunchState.CheckAssets => Get("LaunchState.CheckAssets"),
- LaunchState.CheckLoader => Get("LaunchState.CheckLoader"),
- LaunchState.CheckLoginCore => Get("LaunchState.CheckLoginCore"),
- LaunchState.LostVersion => Get("LaunchState.LostVersion"),
- LaunchState.LostLib => Get("LaunchState.LostLib"),
- LaunchState.LostLoader => Get("LaunchState.LostLoader"),
- LaunchState.LostLoginCore => Get("LaunchState.LostLoginCore"),
- LaunchState.Download => Get("LaunchState.Download"),
- LaunchState.JvmPrepare => Get("LaunchState.JvmPrepare"),
- LaunchState.VersionError => Get("LaunchState.VersionError"),
- LaunchState.AssetsError => Get("LaunchState.AssetsError"),
- LaunchState.LoaderError => Get("LaunchState.LoaderError"),
- LaunchState.LostFile => Get("LaunchState.LostFile"),
- LaunchState.DownloadFail => Get("LaunchState.DownloadFail"),
- LaunchState.JavaError => Get("LaunchState.JvmError"),
- LaunchState.LaunchPre => Get("LaunchState.LaunchPre"),
- LaunchState.LaunchPost => Get("LaunchState.LaunchPost"),
- _ => Get("LaunchState.Other")
+ LaunchState.Check => Get("Type.LaunchState.Check"),
+ LaunchState.CheckVersion => Get("Type.LaunchState.CheckVersion"),
+ LaunchState.CheckLib => Get("Type.LaunchState.CheckLib"),
+ LaunchState.CheckAssets => Get("Type.LaunchState.CheckAssets"),
+ LaunchState.CheckLoader => Get("Type.LaunchState.CheckLoader"),
+ LaunchState.CheckLoginCore => Get("Type.LaunchState.CheckLoginCore"),
+ LaunchState.LostVersion => Get("Type.LaunchState.LostVersion"),
+ LaunchState.LostLib => Get("Type.LaunchState.LostLib"),
+ LaunchState.LostLoader => Get("Type.LaunchState.LostLoader"),
+ LaunchState.LostLoginCore => Get("Type.LaunchState.LostLoginCore"),
+ LaunchState.Download => Get("Type.LaunchState.Download"),
+ LaunchState.JvmPrepare => Get("Type.LaunchState.JvmPrepare"),
+ LaunchState.VersionError => Get("Type.LaunchState.VersionError"),
+ LaunchState.AssetsError => Get("Type.LaunchState.AssetsError"),
+ LaunchState.LoaderError => Get("Type.LaunchState.LoaderError"),
+ LaunchState.LostFile => Get("Type.LaunchState.LostFile"),
+ LaunchState.DownloadFail => Get("Type.LaunchState.DownloadFail"),
+ LaunchState.JavaError => Get("Type.LaunchState.JvmError"),
+ LaunchState.LaunchPre => Get("Type.LaunchState.LaunchPre"),
+ LaunchState.LaunchPost => Get("Type.LaunchState.LaunchPost"),
+ _ => Get("Type.LaunchState.Other")
};
}
@@ -130,10 +130,10 @@ public static string GetName(this GetDownloadState state)
{
return state switch
{
- GetDownloadState.Init => Get("DownloadState.Init"),
- GetDownloadState.GetInfo => Get("DownloadState.GetInfo"),
- GetDownloadState.End => Get("DownloadState.End"),
- _ => Get("DownloadState.Other")
+ GetDownloadState.Init => Get("Type.DownloadState.Init"),
+ GetDownloadState.GetInfo => Get("Type.DownloadState.GetInfo"),
+ GetDownloadState.End => Get("Type.DownloadState.End"),
+ _ => Get("Type.DownloadState.Other")
};
}
@@ -141,15 +141,15 @@ public static string GetName(this DownloadItemState state)
{
return state switch
{
- DownloadItemState.Wait => Get("DownloadItemState.Wait"),
- DownloadItemState.GetInfo => Get("DownloadItemState.GetInfo"),
- DownloadItemState.Download => Get("DownloadItemState.Download"),
- DownloadItemState.Init => Get("DownloadItemState.Init"),
- DownloadItemState.Pause => Get("DownloadItemState.Pause"),
- DownloadItemState.Action => Get("DownloadItemState.Action"),
- DownloadItemState.Done => Get("DownloadItemState.Done"),
- DownloadItemState.Error => Get("DownloadItemState.Error"),
- _ => Get("DownloadItemState.Other")
+ DownloadItemState.Wait => Get("Type.DownloadItemState.Wait"),
+ DownloadItemState.GetInfo => Get("Type.DownloadItemState.GetInfo"),
+ DownloadItemState.Download => Get("Type.DownloadItemState.Download"),
+ DownloadItemState.Init => Get("Type.DownloadItemState.Init"),
+ DownloadItemState.Pause => Get("Type.DownloadItemState.Pause"),
+ DownloadItemState.Action => Get("Type.DownloadItemState.Action"),
+ DownloadItemState.Done => Get("Type.DownloadItemState.Done"),
+ DownloadItemState.Error => Get("Type.DownloadItemState.Error"),
+ _ => Get("Type.DownloadItemState.Other")
};
}
@@ -157,15 +157,15 @@ public static string GetName(this CurseForgeSortField state)
{
return state switch
{
- CurseForgeSortField.Featured => Get("CurseForgeSortField.Featured"),
- CurseForgeSortField.Popularity => Get("CurseForgeSortField.Popularity"),
- CurseForgeSortField.LastUpdated => Get("CurseForgeSortField.LastUpdated"),
- CurseForgeSortField.Name => Get("CurseForgeSortField.Name"),
- CurseForgeSortField.Author => Get("CurseForgeSortField.Author"),
- CurseForgeSortField.TotalDownloads => Get("CurseForgeSortField.TotalDownloads"),
- CurseForgeSortField.Category => Get("CurseForgeSortField.Category"),
- CurseForgeSortField.GameVersion => Get("CurseForgeSortField.GameVersion"),
- _ => Get("CurseForgeSortField.Other")
+ CurseForgeSortField.Featured => Get("Type.CurseForge.SortField.Featured"),
+ CurseForgeSortField.Popularity => Get("Type.CurseForge.SortField.Popularity"),
+ CurseForgeSortField.LastUpdated => Get("Type.CurseForge.SortField.LastUpdated"),
+ CurseForgeSortField.Name => Get("Type.CurseForge.SortField.Name"),
+ CurseForgeSortField.Author => Get("Type.CurseForge.SortField.Author"),
+ CurseForgeSortField.TotalDownloads => Get("Type.CurseForge.SortField.TotalDownloads"),
+ CurseForgeSortField.Category => Get("Type.CurseForge.SortField.Category"),
+ CurseForgeSortField.GameVersion => Get("Type.CurseForge.SortField.GameVersion"),
+ _ => Get("Type.CurseForge.SortField.Other")
};
}
@@ -173,10 +173,10 @@ public static string GetNameWithRelease(int type)
{
return type switch
{
- 1 => Get("Release.Release"),
- 2 => Get("Release.Beta"),
- 3 => Get("Release.Alpha"),
- _ => Get("Release.Other")
+ 1 => Get("Type.Release.Release"),
+ 2 => Get("Type.Release.Beta"),
+ 3 => Get("Type.Release.Alpha"),
+ _ => Get("Type.Release.Other")
};
}
@@ -184,9 +184,9 @@ public static string GetName(this SourceLocal state)
{
return state switch
{
- SourceLocal.Offical => Get("SourceLocal.Offical"),
- SourceLocal.BMCLAPI => Get("SourceLocal.BMCLAPI"),
- _ => Get("SourceLocal.Other")
+ SourceLocal.Offical => Get("Type.SourceLocal.Offical"),
+ SourceLocal.BMCLAPI => Get("Type.SourceLocal.BMCLAPI"),
+ _ => Get("Type.SourceLocal.Other")
};
}
@@ -194,12 +194,12 @@ public static string GetName(this GCType state)
{
return state switch
{
- GCType.G1GC => Get("GCType.G1GC"),
- GCType.SerialGC => Get("GCType.SerialGC"),
- GCType.ParallelGC => Get("GCType.ParallelGC"),
- GCType.CMSGC => Get("GCType.CMSGC"),
- GCType.User => Get("GCType.User"),
- _ => Get("GCType.Other")
+ GCType.G1GC => Get("Type.GCType.G1GC"),
+ GCType.SerialGC => Get("Type.GCType.SerialGC"),
+ GCType.ParallelGC => Get("Type.GCType.ParallelGC"),
+ GCType.CMSGC => Get("Type.GCType.CMSGC"),
+ GCType.User => Get("Type.GCType.User"),
+ _ => Get("Type.GCType.Other")
};
}
@@ -207,11 +207,11 @@ public static string GetName(this ArchEnum arch)
{
return arch switch
{
- ArchEnum.x86_64 => Get("ArchEnum.x64"),
- ArchEnum.x86 => Get("ArchEnum.x32"),
- ArchEnum.aarch64 => Get("ArchEnum.aarch64"),
- ArchEnum.arm => Get("ArchEnum.armV7"),
- _ => Get("ArchEnum.Other")
+ ArchEnum.x86_64 => Get("Type.ArchEnum.x64"),
+ ArchEnum.x86 => Get("Type.ArchEnum.x32"),
+ ArchEnum.aarch64 => Get("Type.ArchEnum.aarch64"),
+ ArchEnum.arm => Get("Type.ArchEnum.armV7"),
+ _ => Get("Type.ArchEnum.Other")
};
}
@@ -219,10 +219,10 @@ public static string GetName(this OsType arch)
{
return arch switch
{
- OsType.Windows => Get("OsType.Windows"),
- OsType.Linux => Get("OsType.Linux"),
- OsType.MacOS => Get("OsType.MacOS"),
- _ => Get("OsType.Other")
+ OsType.Windows => Get("Type.OsType.Windows"),
+ OsType.Linux => Get("Type.OsType.Linux"),
+ OsType.MacOS => Get("Type.OsType.MacOS"),
+ _ => Get("Type.OsType.Other")
};
}
@@ -240,13 +240,13 @@ public static string GetName(this Loaders type)
{
return type switch
{
- Loaders.Normal => Get("Loaders.Normal"),
+ Loaders.Normal => Get("Type.Loaders.Normal"),
Loaders.Forge => "Forge",
Loaders.NeoForge => "NeoForge",
Loaders.Fabric => "Fabric",
Loaders.Quilt => "Quilt",
Loaders.OptiFine => "OptiFine",
- Loaders.Custom => Get("Loaders.Custom"),
+ Loaders.Custom => Get("Type.Loaders.Custom"),
_ => "Unkown"
};
}
@@ -255,11 +255,11 @@ public static string GetNameWithGameType(int type)
{
return type switch
{
- 0 => Get("GameType.Survival"),
- 1 => Get("GameType.Creative"),
- 2 => Get("GameType.Adventure"),
- 3 => Get("GameType.Spectator"),
- _ => Get("GameType.Other")
+ 0 => Get("Type.GameType.Survival"),
+ 1 => Get("Type.GameType.Creative"),
+ 2 => Get("Type.GameType.Adventure"),
+ 3 => Get("Type.GameType.Spectator"),
+ _ => Get("Type.GameType.Other")
};
}
@@ -267,11 +267,11 @@ public static string GetNameWithDifficulty(int type)
{
return type switch
{
- 0 => Get("Difficulty.Peaceful"),
- 1 => Get("Difficulty.Easy"),
- 2 => Get("Difficulty.Normal"),
- 3 => Get("Difficulty.Hard"),
- _ => Get("Difficulty.Other")
+ 0 => Get("Type.Difficulty.Peaceful"),
+ 1 => Get("Type.Difficulty.Easy"),
+ 2 => Get("Type.Difficulty.Normal"),
+ 3 => Get("Type.Difficulty.Hard"),
+ _ => Get("Type.Difficulty.Other")
};
}
@@ -279,10 +279,10 @@ public static string GetName(this SourceType type)
{
return type switch
{
- SourceType.CurseForge => Get("SourceType.CurseForge"),
- SourceType.Modrinth => Get("SourceType.Modrinth"),
- SourceType.McMod => Get("SourceType.McMod"),
- _ => Get("SourceType.Other")
+ SourceType.CurseForge => Get("Type.SourceType.CurseForge"),
+ SourceType.Modrinth => Get("Type.SourceType.Modrinth"),
+ SourceType.McMod => Get("Type.SourceType.McMod"),
+ _ => Get("Type.SourceType.Other")
};
}
@@ -290,13 +290,13 @@ public static string GetName(this PackType type)
{
return type switch
{
- PackType.ColorMC => Get("PackType.ColorMC"),
- PackType.CurseForge => Get("PackType.CurseForge"),
- PackType.Modrinth => Get("PackType.Modrinth"),
- PackType.MMC => Get("PackType.MMC"),
- PackType.HMCL => Get("PackType.HMCL"),
- PackType.ZipPack => Get("PackType.ZipPack"),
- _ => Get("PackType.Other")
+ PackType.ColorMC => Get("Type.PackType.ColorMC"),
+ PackType.CurseForge => Get("Type.PackType.CurseForge"),
+ PackType.Modrinth => Get("Type.PackType.Modrinth"),
+ PackType.MMC => Get("Type.PackType.MMC"),
+ PackType.HMCL => Get("Type.PackType.HMCL"),
+ PackType.ZipPack => Get("Type.PackType.ZipPack"),
+ _ => Get("Type.PackType.Other")
};
}
@@ -304,14 +304,14 @@ public static string GetName(this FileType type)
{
return type switch
{
- FileType.ModPack => Get("FileType.ModPack"),
- FileType.Mod => Get("FileType.Mod"),
- FileType.World => Get("FileType.World"),
- FileType.Shaderpack => Get("FileType.Shaderpack"),
- FileType.Resourcepack => Get("FileType.Resourcepack"),
- FileType.DataPacks => Get("FileType.DataPacks"),
- FileType.Optifne => Get("FileType.Optifne"),
- _ => Get("FileType.Other")
+ FileType.ModPack => Get("Type.FileType.ModPack"),
+ FileType.Mod => Get("Type.FileType.Mod"),
+ FileType.World => Get("Type.FileType.World"),
+ FileType.Shaderpack => Get("Type.FileType.Shaderpack"),
+ FileType.Resourcepack => Get("Type.FileType.Resourcepack"),
+ FileType.DataPacks => Get("Type.FileType.DataPacks"),
+ FileType.Optifne => Get("Type.FileType.Optifne"),
+ _ => Get("Type.FileType.Other")
};
}
}
diff --git a/src/ColorMC.Core/Net/Apis/FabricAPI.cs b/src/ColorMC.Core/Net/Apis/FabricAPI.cs
index d023afe5e..251cf9b09 100644
--- a/src/ColorMC.Core/Net/Apis/FabricAPI.cs
+++ b/src/ColorMC.Core/Net/Apis/FabricAPI.cs
@@ -24,7 +24,7 @@ public static class FabricAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return null;
}
@@ -50,7 +50,7 @@ public static class FabricAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return null;
}
@@ -75,7 +75,7 @@ public static class FabricAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return null;
}
@@ -115,7 +115,7 @@ public static class FabricAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return null;
}
diff --git a/src/ColorMC.Core/Net/Apis/ForgeAPI.cs b/src/ColorMC.Core/Net/Apis/ForgeAPI.cs
index f1f95347b..ca4d1b1c0 100644
--- a/src/ColorMC.Core/Net/Apis/ForgeAPI.cs
+++ b/src/ColorMC.Core/Net/Apis/ForgeAPI.cs
@@ -43,7 +43,7 @@ public static class ForgeAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return null;
}
@@ -94,7 +94,7 @@ public static class ForgeAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return null;
}
@@ -196,7 +196,7 @@ public static async Task LoadFromSource(string mc, bool neo)
var html = await BaseClient.GetStringAsync(url);
if (html.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return;
}
@@ -287,7 +287,7 @@ public static async Task LoadFromSource(string mc, bool neo)
html = await BaseClient.GetStringAsync(url);
if (html.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return;
}
diff --git a/src/ColorMC.Core/Net/Apis/GameAPI.cs b/src/ColorMC.Core/Net/Apis/GameAPI.cs
index 08252d406..856ebcbd6 100644
--- a/src/ColorMC.Core/Net/Apis/GameAPI.cs
+++ b/src/ColorMC.Core/Net/Apis/GameAPI.cs
@@ -23,7 +23,7 @@ public static class GameAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return (null, null);
}
@@ -47,7 +47,7 @@ public static class GameAPI
var data = await BaseClient.GetBytesAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return (null, null);
}
@@ -73,7 +73,7 @@ public static class GameAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return (null, null);
}
diff --git a/src/ColorMC.Core/Net/Apis/OptifineAPI.cs b/src/ColorMC.Core/Net/Apis/OptifineAPI.cs
index e3045ff93..840d8765c 100644
--- a/src/ColorMC.Core/Net/Apis/OptifineAPI.cs
+++ b/src/ColorMC.Core/Net/Apis/OptifineAPI.cs
@@ -28,7 +28,7 @@ public static class OptifineAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return (null, null);
}
@@ -127,7 +127,7 @@ public static class OptifineAPI
var data = await BaseClient.GetStringAsync(obj.Url2);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(obj.Url2), false);
return null;
}
@@ -145,7 +145,7 @@ public static class OptifineAPI
}
catch (Exception e)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.OptiFine.Error2"), e, false);
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.OptiFine.Error2"), e, false);
}
return null;
diff --git a/src/ColorMC.Core/Net/Apis/QuiltAPI.cs b/src/ColorMC.Core/Net/Apis/QuiltAPI.cs
index b1cb05e20..82ba0bc3e 100644
--- a/src/ColorMC.Core/Net/Apis/QuiltAPI.cs
+++ b/src/ColorMC.Core/Net/Apis/QuiltAPI.cs
@@ -27,7 +27,7 @@ public static class QuiltAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return null;
}
@@ -64,7 +64,7 @@ public static class QuiltAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return null;
}
@@ -89,7 +89,7 @@ public static class QuiltAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return null;
}
@@ -125,7 +125,7 @@ public static class QuiltAPI
var data = await BaseClient.GetStringAsync(url);
if (data.Item1 == false)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.Http.Error7"),
+ ColorMCCore.OnError(LanguageHelper.Get("Core.Http.Error7"),
new Exception(url), false);
return null;
}
diff --git a/src/ColorMC.Core/Net/Apis/ZuluApi.cs b/src/ColorMC.Core/Net/Apis/ZuluApi.cs
index 84bb62d14..39a0511a2 100644
--- a/src/ColorMC.Core/Net/Apis/ZuluApi.cs
+++ b/src/ColorMC.Core/Net/Apis/ZuluApi.cs
@@ -20,7 +20,7 @@ public static class ZuluApi
var str = await data.Content.ReadAsStringAsync();
if (str.StartsWith('<'))
{
- ColorMCCore.Error(str, null, false);
+ ColorMCCore.OnError(str, null, false);
return null;
}
return JsonConvert.DeserializeObject>(str);
diff --git a/src/ColorMC.Core/Objs/Enums.cs b/src/ColorMC.Core/Objs/Enums.cs
index e4a5f22c3..7fcc8a98b 100644
--- a/src/ColorMC.Core/Objs/Enums.cs
+++ b/src/ColorMC.Core/Objs/Enums.cs
@@ -56,7 +56,7 @@ public enum SourceType
public enum PathType
{
BasePath, GamePath, ModPath, ConfigPath, ShaderpacksPath, ResourcepackPath, WorldBackPath,
- SavePath, SchematicsPath, ScreenshotsPath, RunPath, DownloadPath, JavaPath, PicPath
+ SavePath, SchematicsPath, ScreenshotsPath, RunPath, DownloadPath, JavaPath, PicPath, ServerPackPath, RunDir
}
///
@@ -65,8 +65,8 @@ public enum PathType
public enum FileType
{
ModPack = 0, Mod, World, Shaderpack, Resourcepack, DataPacks, Schematic,
- Java, Game, Config, AuthConfig, Pic, UI, Optifne, Skin, ServerPack, Music,
- Text, Live2D, Icon, Head, JavaZip, Live2DCore, Loader, InputConfig, RunDir
+ Java, Game, Config, AuthConfig, Pic, UI, Optifne, Skin, Music,
+ Text, Live2D, Icon, Head, JavaZip, Live2DCore, Loader, InputConfig
}
///
diff --git a/src/ColorMC.Core/Objs/Modrinth/MFacetsObj.cs b/src/ColorMC.Core/Objs/Modrinth/MFacetsObj.cs
index e4e0f91da..c4550342d 100644
--- a/src/ColorMC.Core/Objs/Modrinth/MFacetsObj.cs
+++ b/src/ColorMC.Core/Objs/Modrinth/MFacetsObj.cs
@@ -10,7 +10,7 @@ public record MFacetsObj
public string GetName()
{
- return LanguageHelper.Get($"MFacets.{Data}");
+ return LanguageHelper.Get($"Type.Modrinth.Facets.{Data}");
}
public static string Build(List list)
diff --git a/src/ColorMC.Core/Objs/Modrinth/MSortingObj.cs b/src/ColorMC.Core/Objs/Modrinth/MSortingObj.cs
index ca7644e01..19beadd51 100644
--- a/src/ColorMC.Core/Objs/Modrinth/MSortingObj.cs
+++ b/src/ColorMC.Core/Objs/Modrinth/MSortingObj.cs
@@ -7,7 +7,7 @@ public record MSortingObj
public string Data { get; init; }
public string GetName()
{
- return LanguageHelper.Get($"MSortingType.{Data}");
+ return LanguageHelper.Get($"Type.Modrinth.SortingType.{Data}");
}
public static readonly MSortingObj Relevance = new() { Data = "relevance" };
diff --git a/src/ColorMC.Core/Resources/Language/core_en-us.json b/src/ColorMC.Core/Resources/Language/core_en-us.json
index 991848861..d71fe0d92 100644
--- a/src/ColorMC.Core/Resources/Language/core_en-us.json
+++ b/src/ColorMC.Core/Resources/Language/core_en-us.json
@@ -1,5 +1,4 @@
{
- "Core.Language": "English(AI)",
"Core.Info1": "ColorMC core is initializing",
"Core.Info2": "Do you want to delete the folder {0}?",
"Core.Info3": "ColorMC core initialization finished",
@@ -158,127 +157,127 @@
"Core.GameCount.Error1": "Statistics information read error",
"Core.DataPack.Error1": "Data pack {0} information read error",
"Core.DataPack.Error2": "Data pack operation error",
- "AuthType.Offline": "Offline",
- "AuthType.OAuth": "Microsoft Login",
- "AuthType.Nide8": "Nide8",
- "AuthType.AuthlibInjector": "AuthlibInjector",
- "AuthType.LittleSkin": "LittleSkin Skin",
- "AuthType.SelfLittleSkin": "Self Skin",
- "AuthType.Other": "Account",
+ "Type.AuthType.Offline": "Offline",
+ "Type.AuthType.OAuth": "Microsoft Login",
+ "Type.AuthType.Nide8": "Nide8",
+ "Type.AuthType.AuthlibInjector": "AuthlibInjector",
+ "Type.AuthType.LittleSkin": "LittleSkin Skin",
+ "Type.AuthType.SelfLittleSkin": "Self Skin",
+ "Type.AuthType.Other": "Account",
"AuthState.OAuth": "OAuth",
"AuthState.XBox": "XBoxLive",
"AuthState.XSTS": "XSTS",
"AuthState.Token": "Token",
"AuthState.Profile": "Profile",
"AuthState.Other": "Unknown login state",
- "LoginState.Done": "Done",
- "LoginState.TimeOut": "Timeout",
- "LoginState.JsonError": "Data error",
- "LoginState.Error": "Unknown error",
- "LoginState.Crash": "Crash",
- "LoginState.Other": "Unknown login result",
- "LaunchState.Check": "Verifying game integrity",
- "LaunchState.CheckVersion": "Verifying game core",
- "LaunchState.CheckLib": "Verifying game libraries",
- "LaunchState.CheckAssets": "Verifying game resource files",
- "LaunchState.CheckLoader": "Verifying game Mod loader",
- "LaunchState.CheckLoginCore": "Verifying external login core",
- "LaunchState.LostVersion": "Missing game core",
- "LaunchState.LostLib": "Missing libraries",
- "LaunchState.LostLoader": "Missing Mod loader",
- "LaunchState.LostFile": "Missing required launch files",
- "LaunchState.LostLoginCore": "Missing external login core",
- "LaunchState.Download": "Downloading files",
- "LaunchState.DownloadFail": "Download failed",
- "LaunchState.JvmPrepare": "Preparing Jvm parameters",
- "LaunchState.VersionError": "Game core error",
- "LaunchState.AssetsError": "Game resource files error",
- "LaunchState.LoaderError": "Mod loader error",
- "LaunchState.JvmError": "No suitable Java",
- "LaunchState.LaunchPre": "Executing pre-launch program",
- "LaunchState.LaunchPost": "Executing post-launch program",
- "LaunchState.Other": "Unknown launch state",
- "DownloadState.Init": "Initializing",
- "DownloadState.GetInfo": "Getting information",
- "DownloadState.End": "End",
- "DownloadState.Other": "Unknown download state",
- "DownloadItemState.Wait": "Waiting",
- "DownloadItemState.GetInfo": "Getting information",
- "DownloadItemState.Download": "Downloading...",
- "DownloadItemState.Init": "Initializing",
- "DownloadItemState.Pause": "Paused",
- "DownloadItemState.Action": "Executing subsequent actions",
- "DownloadItemState.Done": "Done",
- "DownloadItemState.Error": "Error occurred",
- "DownloadItemState.Other": "Unknown download item state",
- "CurseForgeSortField.Featured": "Featured",
- "CurseForgeSortField.Popularity": "Popularity",
- "CurseForgeSortField.LastUpdated": "Last Updated",
- "CurseForgeSortField.Name": "Name",
- "CurseForgeSortField.Author": "Author",
- "CurseForgeSortField.TotalDownloads": "Total Downloads",
- "CurseForgeSortField.Category": "Category",
- "CurseForgeSortField.GameVersion": "Game Version",
- "CurseForgeSortField.Other": "Unknown category",
- "Release.Release": "Release",
- "Release.Beta": "Beta",
- "Release.Alpha": "Alpha",
- "Release.Other": "Unknown release type",
- "SourceLocal.Offical": "Official",
- "SourceLocal.BMCLAPI": "BmclApi",
- "SourceLocal.Other": "Unknown download source",
- "GCType.G1GC": "G1 Garbage Collector",
- "GCType.SerialGC": "Serial Garbage Collector",
- "GCType.ParallelGC": "Parallel Garbage Collector",
- "GCType.CMSGC": "Concurrent Mark Sweep Garbage Collector",
- "GCType.User": "User setting",
- "GCType.Other": "Unknown GC type",
- "ArchEnum.x64": "x64",
- "ArchEnum.x32": "x32",
- "ArchEnum.aarch64": "Arm64",
- "ArchEnum.armV7": "Arm32",
- "ArchEnum.Other": "Unknown architecture",
- "OsType.Windows": "Windows",
- "OsType.Linux": "Linux",
- "OsType.MacOS": "MacOS",
- "OsType.Other": "Unknown OS type",
- "GameType.Survival": "Survival",
- "GameType.Creative": "Creative",
- "GameType.Adventure": "Adventure",
- "GameType.Spectator": "Spectator",
- "GameType.Other": "Other modes",
- "Difficulty.Peaceful": "Peaceful",
- "Difficulty.Normal": "Normal",
- "Difficulty.Hard": "Hard",
- "Difficulty.Easy": "Easy",
- "Difficulty.Other": "Other difficulty",
- "MSortingType.relevance": "Popularity",
- "MSortingType.downloads": "Downloads",
- "MSortingType.follows": "Follows",
- "MSortingType.newest": "Creation Time",
- "MSortingType.updated": "Update Time",
- "SourceType.CurseForge": "CurseForge",
- "SourceType.Modrinth": "Modrinth",
- "SourceType.McMod": "MCMod",
- "SourceType.Other": "Unknown download source",
- "PackType.ColorMC": "ColorMC Pack",
- "PackType.CurseForge": "CurseForge Modpack",
- "PackType.Modrinth": "Modrinth Modpack",
- "PackType.MMC": "MMC Pack",
- "PackType.HMCL": "HMCL Pack",
- "PackType.ZipPack": "Direct Unzip Pack",
- "MFacets.categories": "Categories",
- "MFacets.versions": "Game Versions",
- "MFacets.project_type": "Project Type",
- "FileType.ModPack": "Modpack",
- "FileType.Mod": "Mod",
- "FileType.World": "World",
- "FileType.Shaderpack": "Shaderpack",
- "FileType.Resourcepack": "Resourcepack",
- "FileType.DataPacks": "Datapacks",
- "FileType.Optifne": "Optifine",
- "FileType.Other": "Unknown resource type",
+ "Type.LoginState.Done": "Done",
+ "Type.LoginState.TimeOut": "Timeout",
+ "Type.LoginState.JsonError": "Data error",
+ "Type.LoginState.Error": "Unknown error",
+ "Type.LoginState.Crash": "Crash",
+ "Type.LoginState.Other": "Unknown login result",
+ "Type.LaunchState.Check": "Verifying game integrity",
+ "Type.LaunchState.CheckVersion": "Verifying game core",
+ "Type.LaunchState.CheckLib": "Verifying game libraries",
+ "Type.LaunchState.CheckAssets": "Verifying game resource files",
+ "Type.LaunchState.CheckLoader": "Verifying game Mod loader",
+ "Type.LaunchState.CheckLoginCore": "Verifying external login core",
+ "Type.LaunchState.LostVersion": "Missing game core",
+ "Type.LaunchState.LostLib": "Missing libraries",
+ "Type.LaunchState.LostLoader": "Missing Mod loader",
+ "Type.LaunchState.LostFile": "Missing required launch files",
+ "Type.LaunchState.LostLoginCore": "Missing external login core",
+ "Type.LaunchState.Download": "Downloading files",
+ "Type.LaunchState.DownloadFail": "Download failed",
+ "Type.LaunchState.JvmPrepare": "Preparing Jvm parameters",
+ "Type.LaunchState.VersionError": "Game core error",
+ "Type.LaunchState.AssetsError": "Game resource files error",
+ "Type.LaunchState.LoaderError": "Mod loader error",
+ "Type.LaunchState.JvmError": "No suitable Java",
+ "Type.LaunchState.LaunchPre": "Executing pre-launch program",
+ "Type.LaunchState.LaunchPost": "Executing post-launch program",
+ "Type.LaunchState.Other": "Unknown launch state",
+ "Type.DownloadState.Init": "Initializing",
+ "Type.DownloadState.GetInfo": "Getting information",
+ "Type.DownloadState.End": "End",
+ "Type.DownloadState.Other": "Unknown download state",
+ "Type.DownloadItemState.Wait": "Waiting",
+ "Type.DownloadItemState.GetInfo": "Getting information",
+ "Type.DownloadItemState.Download": "Downloading...",
+ "Type.DownloadItemState.Init": "Initializing",
+ "Type.DownloadItemState.Pause": "Paused",
+ "Type.DownloadItemState.Action": "Executing subsequent actions",
+ "Type.DownloadItemState.Done": "Done",
+ "Type.DownloadItemState.Error": "Error occurred",
+ "Type.DownloadItemState.Other": "Unknown download item state",
+ "Type.CurseForge.SortField.Featured": "Featured",
+ "Type.CurseForge.SortField.Popularity": "Popularity",
+ "Type.CurseForge.SortField.LastUpdated": "Last Updated",
+ "Type.CurseForge.SortField.Name": "Name",
+ "Type.CurseForge.SortField.Author": "Author",
+ "Type.CurseForge.SortField.TotalDownloads": "Total Downloads",
+ "Type.CurseForge.SortField.Category": "Category",
+ "Type.CurseForge.SortField.GameVersion": "Game Version",
+ "Type.CurseForge.SortField.Other": "Unknown category",
+ "Type.Release.Release": "Release",
+ "Type.Release.Beta": "Beta",
+ "Type.Release.Alpha": "Alpha",
+ "Type.Release.Other": "Unknown release type",
+ "Type.SourceLocal.Offical": "Official",
+ "Type.SourceLocal.BMCLAPI": "BmclApi",
+ "Type.SourceLocal.Other": "Unknown download source",
+ "Type.GCType.G1GC": "G1 Garbage Collector",
+ "Type.GCType.SerialGC": "Serial Garbage Collector",
+ "Type.GCType.ParallelGC": "Parallel Garbage Collector",
+ "Type.GCType.CMSGC": "Concurrent Mark Sweep Garbage Collector",
+ "Type.GCType.User": "User setting",
+ "Type.GCType.Other": "Unknown GC type",
+ "Type.ArchEnum.x64": "x64",
+ "Type.ArchEnum.x32": "x32",
+ "Type.ArchEnum.aarch64": "Arm64",
+ "Type.ArchEnum.armV7": "Arm32",
+ "Type.ArchEnum.Other": "Unknown architecture",
+ "Type.OsType.Windows": "Windows",
+ "Type.OsType.Linux": "Linux",
+ "Type.OsType.MacOS": "MacOS",
+ "Type.OsType.Other": "Unknown OS type",
+ "Type.GameType.Survival": "Survival",
+ "Type.GameType.Creative": "Creative",
+ "Type.GameType.Adventure": "Adventure",
+ "Type.GameType.Spectator": "Spectator",
+ "Type.GameType.Other": "Other modes",
+ "Type.Difficulty.Peaceful": "Peaceful",
+ "Type.Difficulty.Normal": "Normal",
+ "Type.Difficulty.Hard": "Hard",
+ "Type.Difficulty.Easy": "Easy",
+ "Type.Difficulty.Other": "Other difficulty",
+ "Type.Modrinth.SortingType.relevance": "Popularity",
+ "Type.Modrinth.SortingType.downloads": "Downloads",
+ "Type.Modrinth.SortingType.follows": "Follows",
+ "Type.Modrinth.SortingType.newest": "Creation Time",
+ "Type.Modrinth.SortingType.updated": "Update Time",
+ "Type.SourceType.CurseForge": "CurseForge",
+ "Type.SourceType.Modrinth": "Modrinth",
+ "Type.SourceType.McMod": "MCMod",
+ "Type.SourceType.Other": "Unknown download source",
+ "Type.PackType.ColorMC": "ColorMC Pack",
+ "Type.PackType.CurseForge": "CurseForge Modpack",
+ "Type.PackType.Modrinth": "Modrinth Modpack",
+ "Type.PackType.MMC": "MMC Pack",
+ "Type.PackType.HMCL": "HMCL Pack",
+ "Type.PackType.ZipPack": "Direct Unzip Pack",
+ "Type.Modrinth.Facets.categories": "Categories",
+ "Type.Modrinth.Facets.versions": "Game Versions",
+ "Type.Modrinth.Facets.project_type": "Project Type",
+ "Type.FileType.ModPack": "Modpack",
+ "Type.FileType.Mod": "Mod",
+ "Type.FileType.World": "World",
+ "Type.FileType.Shaderpack": "Shaderpack",
+ "Type.FileType.Resourcepack": "Resourcepack",
+ "Type.FileType.DataPacks": "Datapacks",
+ "Type.FileType.Optifne": "Optifine",
+ "Type.FileType.Other": "Unknown resource type",
"AuthlibInjector.Error1": "AuthlibInjector information retrieval failed",
- "Loaders.Normal": "None",
- "Loaders.Custom": "Custom"
+ "Type.Loaders.Normal": "None",
+ "Type.Loaders.Custom": "Custom"
}
\ No newline at end of file
diff --git a/src/ColorMC.Core/Resources/Language/core_zh-cn.json b/src/ColorMC.Core/Resources/Language/core_zh-cn.json
index 8cfc18576..d883db13d 100644
--- a/src/ColorMC.Core/Resources/Language/core_zh-cn.json
+++ b/src/ColorMC.Core/Resources/Language/core_zh-cn.json
@@ -1,5 +1,4 @@
{
- "Core.Language": "简体中文",
"Core.Info1": "ColorMC核心正在初始化",
"Core.Info2": "是否要删除文件夹 {0}",
"Core.Info3": "ColorMC核心初始化结束",
@@ -10,7 +9,6 @@
"Core.Config.Warn1": "配置为空,旧版配置文件会被覆盖",
"Core.Auth.Info1": "登录数据库初始化",
"Core.Maven.Error1": "本地缓存错误",
- "Core.Log.Error1": "日志文件初始化错误",
"Core.Http.Info1": "下载器初始化,线程数{0}",
"Core.Http.Info2": "下载器清空",
"Core.Http.Info3": "下载器启动",
@@ -25,7 +23,6 @@
"Core.Http.Error6": "获取版本信息发生错误",
"Core.Http.Error7": "没有资源",
"Core.Http.Error8": "读取Nide8数据错误",
- "Core.Http.Error9": "图片获取失败",
"Core.Http.Error10": "下载文件校验失败",
"Core.Http.Error11": "读取AuthlibInjector数据失败",
"Core.Http.Error12": "检查服务器实例错误",
@@ -35,7 +32,6 @@
"Core.Http.Forge.Error4": "Forge核心下载失败",
"Core.Http.Forge.Error5": "获取Forge支持版本错误",
"Core.Http.Forge.Error6": "获取Forge版本错误",
- "Core.Http.Forge.Error7": "读取自定义加载器信息错误",
"Core.Http.CurseForge.Error1": "获取CurseForge数据发生错误",
"Core.Http.CurseForge.Error2": "获取CurseForge的Mod信息发生错误",
"Core.Http.CurseForge.Error3": "获取CurseForge整合包的Mod文件发生错误",
@@ -67,9 +63,6 @@
"Core.Pack.Error1": "读取压缩包错误",
"Core.Pack.Error2": "导入压缩包错误",
"Core.Jvm.Error1": "Java检查失败",
- "Core.Jvm.Error2": "Java旧名字不存在",
- "Core.Jvm.Error3": "Java新名字已存在",
- "Core.Jvm.Error4": "Java检查失败",
"Core.Jvm.Error5": "Java下载失败",
"Core.Jvm.Error6": "没有找到Java",
"Core.Jvm.Error7": "Java下载错误",
@@ -81,7 +74,6 @@
"Core.Jvm.Info1": "正在读取Java信息",
"Core.Jvm.Info2": "Java:{0} {1}",
"Core.Jvm.Info3": "Java找到 {0}",
- "Core.Jvm.Info4": "正在读取Java信息",
"Core.Jvm.Info5": "正在添加Java {0}",
"Core.Path.Info1": "启动器Minecraft文件夹在{0}",
"Core.Path.Error2": "获取本地版本信息错误",
@@ -145,7 +137,6 @@
"Core.Launch.Error1": "游戏版本信息读取失败",
"Core.Launch.Error2": "游戏资源信息获取失败",
"Core.Launch.Error3": "游戏Mod加载器信息读取错误",
- "Core.Launch.Error4": "缺失所需文件,且无法下载",
"Core.Launch.Error5": "所需文件下载失败",
"Core.Launch.Error6": "找不到合适的Java,需要版本 {0} 的JAVA",
"Core.Launch.Error7": "没有版本号信息",
@@ -158,127 +149,120 @@
"Core.GameCount.Error1": "读取统计信息错误",
"Core.DataPack.Error1": "数据包 {0} 信息读取错误",
"Core.DataPack.Error2": "数据包操作错误",
- "AuthType.Offline": "离线",
- "AuthType.OAuth": "微软登录",
- "AuthType.Nide8": "统一通行证",
- "AuthType.AuthlibInjector": "外置登录",
- "AuthType.LittleSkin": "LittleSkin皮肤站",
- "AuthType.SelfLittleSkin": "自建皮肤站",
- "AuthType.Other": "账户",
- "AuthState.OAuth": "OAuth",
- "AuthState.XBox": "XBoxLive",
- "AuthState.XSTS": "XSTS",
- "AuthState.Token": "Token",
- "AuthState.Profile": "Profile",
- "AuthState.Other": "登录状态未知",
- "LoginState.Done": "完成",
- "LoginState.TimeOut": "超时",
- "LoginState.JsonError": "数据错误",
- "LoginState.Error": "未知错误",
- "LoginState.Crash": "崩溃",
- "LoginState.Other": "登录结果未知",
- "LaunchState.Check": "验证游戏完整性",
- "LaunchState.CheckVersion": "验证游戏核心",
- "LaunchState.CheckLib": "验证游戏运行库",
- "LaunchState.CheckAssets": "验证游戏资源文件",
- "LaunchState.CheckLoader": "验证游戏Mod加载器",
- "LaunchState.CheckLoginCore": "验证外置登录核心",
- "LaunchState.LostVersion": "缺少游戏核心",
- "LaunchState.LostLib": "缺少运行库",
- "LaunchState.LostLoader": "缺少Mod加载器",
- "LaunchState.LostFile": "缺少启动所需文件",
- "LaunchState.LostLoginCore": "缺少外置登录核心",
- "LaunchState.Download": "下载文件",
- "LaunchState.DownloadFail": "下载失败",
- "LaunchState.JvmPrepare": "准备Jvm参数",
- "LaunchState.VersionError": "游戏核心错误",
- "LaunchState.AssetsError": "游戏资源文件错误",
- "LaunchState.LoaderError": "Mod加载器错误",
- "LaunchState.JvmError": "没有合适的Java",
- "LaunchState.LaunchPre": "执行运行前程序",
- "LaunchState.LaunchPost": "执行运行后程序",
- "LaunchState.Other": "启动状态未知",
- "DownloadState.Init": "初始化",
- "DownloadState.GetInfo": "获取信息",
- "DownloadState.End": "结束",
- "DownloadState.Other": "未知的下载状态",
- "DownloadItemState.Wait": "等待中",
- "DownloadItemState.GetInfo": "获取信息中",
- "DownloadItemState.Download": "下载中...",
- "DownloadItemState.Init": "初始化中",
- "DownloadItemState.Pause": "暂停中",
- "DownloadItemState.Action": "执行后续操作中",
- "DownloadItemState.Done": "完成",
- "DownloadItemState.Error": "发生错误",
- "DownloadItemState.Other": "未知的下载状态",
- "CurseForgeSortField.Featured": "特色",
- "CurseForgeSortField.Popularity": "热度",
- "CurseForgeSortField.LastUpdated": "最后更新",
- "CurseForgeSortField.Name": "名字",
- "CurseForgeSortField.Author": "作者",
- "CurseForgeSortField.TotalDownloads": "下载数",
- "CurseForgeSortField.Category": "类别",
- "CurseForgeSortField.GameVersion": "游戏版本",
- "CurseForgeSortField.Other": "未知的分类",
- "Release.Release": "发布版",
- "Release.Beta": "Beta测试版",
- "Release.Alpha": "Alpha测试版",
- "Release.Other": "未知的发布类型",
- "SourceLocal.Offical": "官方",
- "SourceLocal.BMCLAPI": "BmclApi",
- "SourceLocal.Other": "未知的下载源",
- "GCType.G1GC": "G1垃圾回收器",
- "GCType.SerialGC": "串行垃圾回收器",
- "GCType.ParallelGC": "并行垃圾回收器",
- "GCType.CMSGC": "并发标记扫描垃圾回收器",
- "GCType.User": "用户设置",
- "GCType.Other": "未知的GC类型",
- "ArchEnum.x64": "x64",
- "ArchEnum.x32": "x32",
- "ArchEnum.aarch64": "Arm64",
- "ArchEnum.armV7": "Arm32",
- "ArchEnum.Other": "未知的位数",
- "OsType.Windows": "Windows系统",
- "OsType.Linux": "Linux系统",
- "OsType.MacOS": "Mac系统",
- "OsType.Other": "未知的系统类型",
- "GameType.Survival": "生存模式",
- "GameType.Creative": "创造模式",
- "GameType.Adventure": "冒险模式",
- "GameType.Spectator": "旁观模式",
- "GameType.Other": "其他模式",
- "Difficulty.Peaceful": "和平难度",
- "Difficulty.Normal": "普通难度",
- "Difficulty.Hard": "困难难度",
- "Difficulty.Easy": "简单难度",
- "Difficulty.Other": "其他难度",
- "MSortingType.relevance": "热门",
- "MSortingType.downloads": "下载数",
- "MSortingType.follows": "追踪数",
- "MSortingType.newest": "创建时间",
- "MSortingType.updated": "更新时间",
- "SourceType.CurseForge": "CurseForge",
- "SourceType.Modrinth": "Modrinth",
- "SourceType.McMod": "MC百科",
- "SourceType.Other": "未知的下载源",
- "PackType.ColorMC": "ColorMC压缩包",
- "PackType.CurseForge": "CurseForge整合包",
- "PackType.Modrinth": "Modrinth整合包",
- "PackType.MMC": "MMC压缩包",
- "PackType.HMCL": "HMCL压缩包",
- "PackType.ZipPack": "直接解压压缩包",
- "MFacets.categories": "分类",
- "MFacets.versions": "游戏版本",
- "MFacets.project_type": "项目类型",
- "FileType.ModPack": "整合包",
- "FileType.Mod": "模组",
- "FileType.World": "世界",
- "FileType.Shaderpack": "光影包",
- "FileType.Resourcepack": "资源包",
- "FileType.DataPacks": "数据包",
- "FileType.Optifne": "高清修复",
- "FileType.Other": "未知的资源类型",
- "AuthlibInjector.Error1": "AuthlibInjector信息获取失败",
- "Loaders.Normal": "无",
- "Loaders.Custom": "自定义"
+ "Type.AuthType.Offline": "离线",
+ "Type.AuthType.OAuth": "微软登录",
+ "Type.AuthType.Nide8": "统一通行证",
+ "Type.AuthType.AuthlibInjector": "外置登录",
+ "Type.AuthType.LittleSkin": "LittleSkin皮肤站",
+ "Type.AuthType.SelfLittleSkin": "自建皮肤站",
+ "Type.AuthType.Other": "账户",
+ "Type.LoginState.Done": "完成",
+ "Type.LoginState.TimeOut": "超时",
+ "Type.LoginState.JsonError": "数据错误",
+ "Type.LoginState.Error": "未知错误",
+ "Type.LoginState.Crash": "崩溃",
+ "Type.LoginState.Other": "登录结果未知",
+ "Type.LaunchState.Check": "验证游戏完整性",
+ "Type.LaunchState.CheckVersion": "验证游戏核心",
+ "Type.LaunchState.CheckLib": "验证游戏运行库",
+ "Type.LaunchState.CheckAssets": "验证游戏资源文件",
+ "Type.LaunchState.CheckLoader": "验证游戏Mod加载器",
+ "Type.LaunchState.CheckLoginCore": "验证外置登录核心",
+ "Type.LaunchState.LostVersion": "缺少游戏核心",
+ "Type.LaunchState.LostLib": "缺少运行库",
+ "Type.LaunchState.LostLoader": "缺少Mod加载器",
+ "Type.LaunchState.LostFile": "缺少启动所需文件",
+ "Type.LaunchState.LostLoginCore": "缺少外置登录核心",
+ "Type.LaunchState.Download": "下载文件",
+ "Type.LaunchState.DownloadFail": "下载失败",
+ "Type.LaunchState.JvmPrepare": "准备Jvm参数",
+ "Type.LaunchState.VersionError": "游戏核心错误",
+ "Type.LaunchState.AssetsError": "游戏资源文件错误",
+ "Type.LaunchState.LoaderError": "Mod加载器错误",
+ "Type.LaunchState.JvmError": "没有合适的Java",
+ "Type.LaunchState.LaunchPre": "执行运行前程序",
+ "Type.LaunchState.LaunchPost": "执行运行后程序",
+ "Type.LaunchState.Other": "启动状态未知",
+ "Type.DownloadState.Init": "初始化",
+ "Type.DownloadState.GetInfo": "获取信息",
+ "Type.DownloadState.End": "结束",
+ "Type.DownloadState.Other": "未知的下载状态",
+ "Type.DownloadItemState.Wait": "等待中",
+ "Type.DownloadItemState.GetInfo": "获取信息中",
+ "Type.DownloadItemState.Download": "下载中...",
+ "Type.DownloadItemState.Init": "初始化中",
+ "Type.DownloadItemState.Pause": "暂停中",
+ "Type.DownloadItemState.Action": "执行后续操作中",
+ "Type.DownloadItemState.Done": "完成",
+ "Type.DownloadItemState.Error": "发生错误",
+ "Type.DownloadItemState.Other": "未知的下载状态",
+ "Type.CurseForge.SortField.Featured": "特色",
+ "Type.CurseForge.SortField.Popularity": "热度",
+ "Type.CurseForge.SortField.LastUpdated": "最后更新",
+ "Type.CurseForge.SortField.Name": "名字",
+ "Type.CurseForge.SortField.Author": "作者",
+ "Type.CurseForge.SortField.TotalDownloads": "下载数",
+ "Type.CurseForge.SortField.Category": "类别",
+ "Type.CurseForge.SortField.GameVersion": "游戏版本",
+ "Type.CurseForge.SortField.Other": "未知的分类",
+ "Type.Release.Release": "发布版",
+ "Type.Release.Beta": "Beta测试版",
+ "Type.Release.Alpha": "Alpha测试版",
+ "Type.Release.Other": "未知的发布类型",
+ "Type.SourceLocal.Offical": "官方",
+ "Type.SourceLocal.BMCLAPI": "BmclApi",
+ "Type.SourceLocal.Other": "未知的下载源",
+ "Type.GCType.G1GC": "G1垃圾回收器",
+ "Type.GCType.SerialGC": "串行垃圾回收器",
+ "Type.GCType.ParallelGC": "并行垃圾回收器",
+ "Type.GCType.CMSGC": "并发标记扫描垃圾回收器",
+ "Type.GCType.User": "用户设置",
+ "Type.GCType.Other": "未知的GC类型",
+ "Type.ArchEnum.x64": "x64",
+ "Type.ArchEnum.x32": "x32",
+ "Type.ArchEnum.aarch64": "Arm64",
+ "Type.ArchEnum.armV7": "Arm32",
+ "Type.ArchEnum.Other": "未知的位数",
+ "Type.OsType.Windows": "Windows系统",
+ "Type.OsType.Linux": "Linux系统",
+ "Type.OsType.MacOS": "Mac系统",
+ "Type.OsType.Other": "未知的系统类型",
+ "Type.GameType.Survival": "生存模式",
+ "Type.GameType.Creative": "创造模式",
+ "Type.GameType.Adventure": "冒险模式",
+ "Type.GameType.Spectator": "旁观模式",
+ "Type.GameType.Other": "其他模式",
+ "Type.Difficulty.Peaceful": "和平难度",
+ "Type.Difficulty.Normal": "普通难度",
+ "Type.Difficulty.Hard": "困难难度",
+ "Type.Difficulty.Easy": "简单难度",
+ "Type.Difficulty.Other": "其他难度",
+ "Type.Modrinth.SortingType.relevance": "热门",
+ "Type.Modrinth.SortingType.downloads": "下载数",
+ "Type.Modrinth.SortingType.follows": "追踪数",
+ "Type.Modrinth.SortingType.newest": "创建时间",
+ "Type.Modrinth.SortingType.updated": "更新时间",
+ "Type.SourceType.CurseForge": "CurseForge",
+ "Type.SourceType.Modrinth": "Modrinth",
+ "Type.SourceType.McMod": "MC百科",
+ "Type.SourceType.Other": "未知的下载源",
+ "Type.PackType.ColorMC": "ColorMC压缩包",
+ "Type.PackType.CurseForge": "CurseForge整合包",
+ "Type.PackType.Modrinth": "Modrinth整合包",
+ "Type.PackType.MMC": "MMC压缩包",
+ "Type.PackType.HMCL": "HMCL压缩包",
+ "Type.PackType.ZipPack": "直接解压压缩包",
+ "Type.Modrinth.Facets.categories": "分类",
+ "Type.Modrinth.Facets.versions": "游戏版本",
+ "Type.Modrinth.Facets.project_type": "项目类型",
+ "Type.FileType.ModPack": "整合包",
+ "Type.FileType.Mod": "模组",
+ "Type.FileType.World": "世界",
+ "Type.FileType.Shaderpack": "光影包",
+ "Type.FileType.Resourcepack": "资源包",
+ "Type.FileType.DataPacks": "数据包",
+ "Type.FileType.Optifne": "高清修复",
+ "Type.FileType.Other": "未知的资源类型",
+ "Type.Loaders.Normal": "无",
+ "Type.Loaders.Custom": "自定义"
}
\ No newline at end of file
diff --git a/src/ColorMC.Core/Utils/GameCount.cs b/src/ColorMC.Core/Utils/GameCount.cs
index c7d3fa4f4..322d384fd 100644
--- a/src/ColorMC.Core/Utils/GameCount.cs
+++ b/src/ColorMC.Core/Utils/GameCount.cs
@@ -120,7 +120,7 @@ private static async void Read()
}
catch (Exception e)
{
- ColorMCCore.Error(LanguageHelper.Get("Core.GameCount.Error1"), e, false);
+ ColorMCCore.OnError(LanguageHelper.Get("Core.GameCount.Error1"), e, false);
}
if (Count == null)
diff --git a/src/ColorMC.Gui/App.axaml.cs b/src/ColorMC.Gui/App.axaml.cs
index 3eb25acb4..fa75ce1a7 100644
--- a/src/ColorMC.Gui/App.axaml.cs
+++ b/src/ColorMC.Gui/App.axaml.cs
@@ -839,7 +839,7 @@ public static void UpdateCheckFail()
{
return;
}
- window.Model.Show(Lang("Gui.Error21"));
+ window.Model.Show(Lang("SettingWindow.Tab3.Error2"));
}
public static IBaseWindow? GetMainWindow()
diff --git a/src/ColorMC.Gui/Player/Media.cs b/src/ColorMC.Gui/Player/Media.cs
index 2eec34918..53ef20a8b 100644
--- a/src/ColorMC.Gui/Player/Media.cs
+++ b/src/ColorMC.Gui/Player/Media.cs
@@ -132,6 +132,8 @@ await Task.Run(() =>
s_cancel = new();
+ Decoding = true;
+
var file = File.OpenRead(filePath);
var temp = new byte[4];
file.Read(temp);
@@ -224,6 +226,8 @@ await Task.Run(() =>
}
}
+ Decoding = false;
+
return (true, null);
}
diff --git a/src/ColorMC.Gui/Resource/Language/gui_en-us.json b/src/ColorMC.Gui/Resource/Language/gui_en-us.json
index 8d932877d..552a40280 100644
--- a/src/ColorMC.Gui/Resource/Language/gui_en-us.json
+++ b/src/ColorMC.Gui/Resource/Language/gui_en-us.json
@@ -30,10 +30,10 @@
"MainWindow.Flyouts.Text13": "Force Stop",
"MainWindow.Flyouts.Text14": "Cloud Sync",
"MainWindow.Flyouts.Text15": "Create Shortcut",
- "MainWindow.Live2d.Flyouts.Text1": "Play Animation",
- "MainWindow.Live2d.Flyouts.Text2": "Switch Expression",
- "MainWindow.Live2d.Error1": "Live2D model does not exist",
- "MainWindow.Live2d.Error2": "Failed to load Live2D model",
+ "MainWindow.Live2D.Flyouts.Text1": "Play Animation",
+ "MainWindow.Live2D.Flyouts.Text2": "Switch Expression",
+ "MainWindow.Live2D.Error1": "Live2D model does not exist",
+ "MainWindow.Live2D.Error2": "Failed to load Live2D model",
"MainWindow.Info1": "Group Name",
"MainWindow.Info2": "Launched",
"MainWindow.Info3": "Launching Game",
@@ -472,7 +472,7 @@
"GameEditWindow.Tab11.Info1": "Import Shader Pack",
"GameEditWindow.Tab11.Info2": "Shader Pack",
"GameEditWindow.Tab11.Info3": "Import successful",
- "GameEditWindow.Tab12.Info1": "Import Structure File",
+ "GameEditWindow.Tab12.Text1": "Import Structure File",
"GameEditWindow.Tab12.Info2": "Structure File",
"GameEditWindow.Tab12.Info3": "Import successful",
"GameEditWindow.Tab12.DataGrid.Text3": "Description",
@@ -727,9 +727,9 @@
"ConfigEditWindow.Text13": "File Selection",
"ConfigEditWindow.DataGrid.Text1": "Index",
"ConfigEditWindow.DataGrid.Text2": "Value",
- "ConfigEditWindow.Flyouts1.Text3": "Modify Key",
- "ConfigEditWindow.Flyouts1.Text4": "Modify Value",
- "ConfigEditWindow.Flyouts1.Text5": "Search Key",
+ "ConfigEditWindow.Flyouts.Text3": "Modify Key",
+ "ConfigEditWindow.Flyouts.Text4": "Modify Value",
+ "ConfigEditWindow.Flyouts.Text5": "Search Key",
"ConfigEditWindow.Info1": "Do you want to delete the NBT tag?",
"ConfigEditWindow.Info2": "Add NBT Tag",
"ConfigEditWindow.Info3": "Key Name",
@@ -801,9 +801,9 @@
"GameCloudWindow.Tab3.Info1": "No Cloud Save",
"GameCloudWindow.Tab3.Info2": "No Local Path",
"GameCloudWindow.Tab3.Info3": "No Local Save",
- "GameCloudWindow.Flyouts1.Text1": "Upload Save",
- "GameCloudWindow.Flyouts1.Text2": "Download Save",
- "GameCloudWindow.Flyouts1.Text3": "Delete Cloud Save",
+ "GameCloudWindow.Flyouts.Text1": "Upload Save",
+ "GameCloudWindow.Flyouts.Text2": "Download Save",
+ "GameCloudWindow.Flyouts.Text3": "Delete Cloud Save",
"GameCloudWindow.Info1": "Checking Cloud Sync",
"GameCloudWindow.Info2": "No Sync",
"GameCloudWindow.Info3": "Enabling Cloud Sync",
@@ -889,40 +889,40 @@
"ServerMotdControl.Text3": "Latency:",
"ServerMotdControl.Text4": "Retrieving Server Information",
"ServerMotdControl.Text5": "Server Information Retrieval Failed",
- "SkinRotate.Item1": "Arm Rotation",
- "SkinRotate.Item2": "Leg Rotation",
- "SkinRotate.Item3": "Head Rotation",
+ "Type.SkinRotate.Item1": "Arm Rotation",
+ "Type.SkinRotate.Item2": "Leg Rotation",
+ "Type.SkinRotate.Item3": "Head Rotation",
"ModFilter.Item4": "modid",
- "ExportPack.Item1": "ColorMC Integration Pack",
- "ExportPack.Item2": "CurseForge Integration Pack",
- "ExportPack.Item3": "Modrinth Integration Pack",
- "ExportPack.Item4": "MMC Import Pack",
- "ExportPack.Item5": "HMCL Import Pack",
- "TranTypes.Item1": "Normal Transparency",
- "TranTypes.Item2": "Blur",
- "TranTypes.Item3": "Acrylic Blur",
- "TranTypes.Item4": "Forced Acrylic Blur",
- "TranTypes.Item5": "Mica",
- "SortOrder.Item1": "Ascending",
- "SortOrder.Item2": "Descending",
- "SkinType.Old": "Old Skin",
- "SkinType.New": "New Skin",
- "SkinType.New_Slim": "New Slim Skin",
- "SkinType.Other": "Unknown Skin Type",
- "Gui.Info3": "Configured",
- "Gui.Info4": "Added Successfully",
- "Gui.Info5": "A new version is available, would you like to update?",
- "Gui.Info6": "Add External Settings",
- "Gui.Info7": "Import Game Archive",
+ "Type.ExportPack.Item1": "ColorMC Integration Pack",
+ "Type.ExportPack.Item2": "CurseForge Integration Pack",
+ "Type.ExportPack.Item3": "Modrinth Integration Pack",
+ "Type.ExportPack.Item4": "MMC Import Pack",
+ "Type.ExportPack.Item5": "HMCL Import Pack",
+ "Type.TranTypes.Item1": "Normal Transparency",
+ "Type.TranTypes.Item2": "Blur",
+ "Type.TranTypes.Item3": "Acrylic Blur",
+ "Type.TranTypes.Item4": "Forced Acrylic Blur",
+ "Type.TranTypes.Item5": "Mica",
+ "Type.SortOrder.Item1": "Ascending",
+ "Type.SortOrder.Item2": "Descending",
+ "Type.SkinType.Old": "Old Skin",
+ "Type.SkinType.New": "New Skin",
+ "Type.SkinType.New_Slim": "New Slim Skin",
+ "Type.SkinType.Other": "Unknown Skin Type",
+ "SettingWindow.Tab2.Info12": "Configured",
+ "UserWindow.Info12": "Added Successfully",
+ "Text.Update": "A new version is available, would you like to update?",
+ "UserWindow.Text8": "Add External Settings",
+ "Text.Import": "Import Game Archive",
"Gui.Info8": "New Version Available",
"Gui.Info9": "Save Skin",
- "Gui.Info10": "Saved",
+ "Text.Saved": "Saved",
"Gui.Info11": "Select Server Instance Storage Folder",
- "Gui.Info14": "Import Mods",
- "Gui.Info15": "Import World Archive",
- "Gui.Info16": "Import Resource Pack",
- "Gui.Info17": "Import Shader Pack",
- "Gui.Info18": "Import Structure File",
+ "GameEditWindow.Tab4.Text6": "Import Mods",
+ "GameEditWindow.Tab5.Text4": "Import World Archive",
+ "GameEditWindow.Tab8.Text1": "Import Resource Pack",
+ "GameEditWindow.Tab11.Text1": "Import Shader Pack",
+ "GameEditWindow.Tab12.Text1": "Import Structure File",
"Gui.Info20": "No Update Messages",
"Gui.Info21": "Save Text",
"Gui.Info22": "Select Archive",
@@ -934,10 +934,10 @@
"Gui.Info28": "Launching {0}",
"Gui.Info29": "Game Icon Set",
"Gui.Info30": "Setting Game Icon",
- "Gui.Info31": "← Back",
- "Gui.Info32": "Collapse",
- "Gui.Info34": "Deleting Game Instance",
- "Gui.Info35": "Launcher Update Log",
+ "Gui.Text1": "← Back",
+ "MenuControl.Text1": "Collapse",
+ "GameEditWindow.Tab1.Info11": "Deleting Game Instance",
+ "MainWindow.Info40": "Launcher Update Log",
"Gui.Info36": "Account is already in use, do you want to continue using this account?",
"Gui.Info37": "Select Game Instance Icon to Set",
"Gui.Info38": "Game Instance Icon",
@@ -948,16 +948,16 @@
"Gui.Error4": "Exception Occurred During Login",
"Gui.Error5": "Specified Java Not Found",
"Gui.Error6": "Game Launch Failed",
- "Gui.Error8": "Please Enter Required Information",
+ "SettingWindow.Tab5.Error2": "Please Enter Required Information",
"Gui.Error9": "Specified File Not Found",
"Gui.Error10": "Custom UI Loading Failed",
"Gui.Error11": "Color Data Reading Failed",
- "Gui.Error12": "File Already Exists",
+ "GameEditWindow.Tab11.Error1": "File Already Exists",
"Gui.Error14": "Corrupt Structure File",
"Gui.Error16": "Mod Update Check Failed",
"Gui.Error17": "Error Reading Gui Configuration File",
"Gui.Error20": "World Backup Error",
- "Gui.Error21": "Launcher Update Check Error",
+ "SettingWindow.Tab3.Error2": "Launcher Update Check Error",
"Gui.Error22": "Launcher Download Update Failed",
"Gui.Error24": "Failed to Obtain Online Image",
"Gui.Error25": "Thread Error",
@@ -972,7 +972,7 @@
"Gui.Error35": "Cape {0} Reading Failed",
"Gui.Error36": "Game Cloud Sync Initialization Failed",
"Gui.Error37": "Game Cloud Sync Connection Failed",
- "Gui.Error38": "Launcher Update Log Retrieval Failed",
+ "MainWindow.Error1": "Launcher Update Log Retrieval Failed",
"Gui.Error39": "No Game Instance Selected",
"Gui.Error40": "No Account Selected",
"Gui.Error41": "Account Conflict",
@@ -982,7 +982,7 @@
"Gui.Error45": "Icon Retrieval Failed",
"Gui.Error46": "Java List Retrieval Error",
"Gui.Error47": "Your Minecraft account could not be found, please ensure your account has purchased Minecraft, and log in at https://minecraft.net to check your skin",
- "Gui.Error48": "Launcher update run error, reverted to old version",
+ "MainWindow.Error2": "Launcher update run error, reverted to old version",
"ToolTip.Text5": "Open Sidebar",
"ToolTip.Text7": "Please select the Java within the bin folder",
"ToolTip.Text9": "Open Skin Viewer Window",
@@ -1110,24 +1110,24 @@
"Button.Done": "Done",
"Button.Filter": "| Filter",
"Button.NetDownload": "Download Online",
- "Live2D.Text1": "Welcome Back Meow",
- "Live2D.Text2": "Game Launched Meow",
- "Live2D.Text3": "Game Crashed Meow",
- "GameCloud.Info1": "Using Space {0}/{1} Mb",
- "GameCloud.Error1": "Cloud Server Authentication Error",
- "GameCloud.Error2": "Cannot Connect to Cloud Server",
- "GameCloud.Error3": "Cloud Server Key Error",
- "VersionType.Item1": "Release",
- "VersionType.Item2": "Snapshot",
- "VersionType.Item3": "Other",
- "VersionType.Item4": "All",
- "Postion.Item1": "Top Left",
- "Postion.Item2": "Top",
- "Postion.Item3": "Top Right",
- "Postion.Item4": "Left",
- "Postion.Item5": "Center",
- "Postion.Item6": "Right",
- "Postion.Item7": "Bottom Left",
- "Postion.Item8": "Bottom",
- "Postion.Item9": "Bottom Right"
+ "MainWindow.Live2D.Text1": "Welcome Back Meow",
+ "MainWindow.Live2D.Text2": "Game Launched Meow",
+ "MainWindow.Live2D.Text3": "Game Crashed Meow",
+ "Utils.GameCloud.Info1": "Using Space {0}/{1} Mb",
+ "Utils.GameCloud.Error1": "Cloud Server Authentication Error",
+ "Utils.GameCloud.Error2": "Cannot Connect to Cloud Server",
+ "Utils.GameCloud.Error3": "Cloud Server Key Error",
+ "Type.VersionType.Item1": "Release",
+ "Type.VersionType.Item2": "Snapshot",
+ "Type.VersionType.Item3": "Other",
+ "Type.VersionType.Item4": "All",
+ "Type.Postion.Item1": "Top Left",
+ "Type.Postion.Item2": "Top",
+ "Type.Postion.Item3": "Top Right",
+ "Type.Postion.Item4": "Left",
+ "Type.Postion.Item5": "Center",
+ "Type.Postion.Item6": "Right",
+ "Type.Postion.Item7": "Bottom Left",
+ "Type.Postion.Item8": "Bottom",
+ "Type.Postion.Item9": "Bottom Right"
}
\ No newline at end of file
diff --git a/src/ColorMC.Gui/Resource/Language/gui_zh-cn.json b/src/ColorMC.Gui/Resource/Language/gui_zh-cn.json
index 7383d4dc7..e674d4272 100644
--- a/src/ColorMC.Gui/Resource/Language/gui_zh-cn.json
+++ b/src/ColorMC.Gui/Resource/Language/gui_zh-cn.json
@@ -1,10 +1,7 @@
{
- "Name": "ColorMC",
"MainWindow.Text1": "欢迎使用ColorMC启动器",
"MainWindow.Text2": "1.添加账户",
- "MainWindow.Text3": "点击添加账户",
"MainWindow.Text4": "2.设置JAVA",
- "MainWindow.Text5": "点击设置JAVA",
"MainWindow.Text6": "3.添加游戏",
"MainWindow.Text7": "按照下面步骤可以快速启动游戏",
"MainWindow.Text8": "添加实例",
@@ -31,10 +28,13 @@
"MainWindow.Flyouts.Text14": "云同步",
"MainWindow.Flyouts.Text15": "创建快捷启动",
"MainWindow.Flyouts.Text16": "手柄设置",
- "MainWindow.Live2d.Flyouts.Text1": "播放动画",
- "MainWindow.Live2d.Flyouts.Text2": "切换表情",
- "MainWindow.Live2d.Error1": "Live2D模型不存在",
- "MainWindow.Live2d.Error2": "Live2D模型加载失败",
+ "MainWindow.Live2D.Text1": "欢迎回来喵",
+ "MainWindow.Live2D.Text2": "游戏启动了喵",
+ "MainWindow.Live2D.Text3": "游戏崩溃了喵",
+ "MainWindow.Live2D.Flyouts.Text1": "播放动画",
+ "MainWindow.Live2D.Flyouts.Text2": "切换表情",
+ "MainWindow.Live2D.Error1": "Live2D模型不存在",
+ "MainWindow.Live2D.Error2": "Live2D模型加载失败",
"MainWindow.Info1": "组名",
"MainWindow.Info2": "已启动",
"MainWindow.Info3": "正在启动游戏",
@@ -67,6 +67,10 @@
"MainWindow.Info36": "没有账户",
"MainWindow.Info37": "有部分文件删除失败",
"MainWindow.Info38": "安装Forge加载器",
+ "MainWindow.Info39": "已调整手柄",
+ "MainWindow.Info40": "启动器更新日志",
+ "MainWindow.Error1": "启动器更新日志获取失败",
+ "MainWindow.Error2": "启动器更新运行出错,已回到旧版本",
"UserWindow.Title": "用户列表",
"UserWindow.DataGrid.Text1": "使用",
"UserWindow.DataGrid.Text3": "账户类型",
@@ -81,8 +85,8 @@
"UserWindow.Text2": "密码",
"UserWindow.Text3": "账户类型",
"UserWindow.Text5": "添加账户",
- "UserWindow.Text6": "双击可切换账户,右键可以打开账户菜单",
"UserWindow.Text7": "注册账户",
+ "UserWindow.Text8": "添加外置登录",
"UserWindow.Error1": "请先选择账户",
"UserWindow.Error3": "服务器UUID错误",
"UserWindow.Error4": "服务器地址错误",
@@ -100,6 +104,7 @@
"UserWindow.Info9": "服务器UUID",
"UserWindow.Info10": "服务器地址",
"UserWindow.Info11": "皮肤站地址",
+ "UserWindow.Info12": "添加成功",
"SettingWindow.Title": "启动器设置",
"SettingWindow.Flyouts.Text1": "删除Java",
"SettingWindow.Flyouts.Text2": "修改绑定",
@@ -143,7 +148,6 @@
"SettingWindow.Tab1.Info12": "账户数据库",
"SettingWindow.Tab1.Info13": "旧目录的文件不会复制文件到新目录,需要你手动复制,是否继续",
"SettingWindow.Tab1.Info14": "启动器运行目录",
- "SettingWindow.Tab1.Info15": "已还原设置",
"SettingWindow.Tab1.Info16": "还原旧目录不会复制文件到旧目录,需要你手动复制,是否继续",
"SettingWindow.Tab1.Error1": "输入文件为空",
"SettingWindow.Tab1.Error2": "配置文件读取错误",
@@ -206,6 +210,7 @@
"SettingWindow.Tab2.Info9": "选择Live2DCore压缩包",
"SettingWindow.Tab2.Info10": "Live2DCore压缩包",
"SettingWindow.Tab2.Info11": "正在导入Live2DCore",
+ "SettingWindow.Tab2.Info12": "已设置",
"SettingWindow.Tab2.Error2": "初始化错误",
"SettingWindow.Tab2.Error3": "没有Live2D模型",
"SettingWindow.Tab2.Error4": "Live2DCore导入失败",
@@ -240,6 +245,7 @@
"SettingWindow.Tab3.Info3": "已经是最新版了",
"SettingWindow.Tab3.Info4": "云同步密钥验证成功",
"SettingWindow.Tab3.Error1": "云同步密钥验证失败",
+ "SettingWindow.Tab3.Error2": "启动器检查更新错误",
"SettingWindow.Tab4.Text1": "Jvm参数设置",
"SettingWindow.Tab4.Text2": "垃圾回收器设置",
"SettingWindow.Tab4.Text3": "手动GC参数",
@@ -283,6 +289,7 @@
"SettingWindow.Tab5.Info6": "Java导入完成",
"SettingWindow.Tab5.Info7": "正在导入Java压缩包",
"SettingWindow.Tab5.Error1": "无法检测Java",
+ "SettingWindow.Tab5.Error2": "请输入必要信息",
"SettingWindow.Tab6.Text1": "服务器信息与自动进服设置",
"SettingWindow.Tab6.Text2": "服务器地址",
"SettingWindow.Tab6.Text3": "服务器端口",
@@ -316,7 +323,6 @@
"SettingWindow.Tab6.Info4": "主界面文件已导出",
"SettingWindow.Tab6.Info5": "选择背景音乐文件",
"SettingWindow.Tab6.Info6": "背景音乐",
- "SettingWindow.Tab7.Text1": "一个全平台Minecraft启动器",
"SettingWindow.Tab7.Text2": "作者:Coloryr",
"SettingWindow.Tab7.Text3": "启动器官网",
"SettingWindow.Tab7.Text4": "Minecraft官网",
@@ -331,6 +337,7 @@
"SettingWindow.Tab7.Text14": "BSD协议",
"SettingWindow.Tab7.Info1": "本机二进制",
"SettingWindow.Tab7.Info2": "动态模式",
+ "SettingWindow.Tab7.Info3": "是否打开国内文档",
"SettingWindow.Tab8.Text1": "手柄支持",
"SettingWindow.Tab8.Text2": "启用游戏内手柄支持",
"SettingWindow.Tab8.Text3": "手柄数量:",
@@ -425,6 +432,7 @@
"GameEditWindow.Tab1.Info8": "整合包更新中",
"GameEditWindow.Tab1.Info9": "正在读取游戏实例语言信息",
"GameEditWindow.Tab1.Info10": "正在生成游戏实例信息",
+ "GameEditWindow.Tab1.Info11": "正在删除游戏实例",
"GameEditWindow.Tab1.Error1": "游戏运行中,无法删除",
"GameEditWindow.Tab1.Error2": "更新失败",
"GameEditWindow.Tab1.Error3": "无法检测,没有版本信息",
@@ -474,6 +482,7 @@
"GameEditWindow.Tab4.Text3": "检查更新",
"GameEditWindow.Tab4.Text4": "添加标记",
"GameEditWindow.Tab4.Text5": "检测依赖",
+ "GameEditWindow.Tab4.Text6": "导入模组",
"GameEditWindow.Tab4.DataGrid.Text1": "启用",
"GameEditWindow.Tab4.DataGrid.Text6": "链接",
"GameEditWindow.Tab4.DataGrid.Text7": "加载器",
@@ -501,6 +510,7 @@
"GameEditWindow.Tab5.Text1": "备份文件夹",
"GameEditWindow.Tab5.Text2": "还原世界备份",
"GameEditWindow.Tab5.Text3": "地图编辑器",
+ "GameEditWindow.Tab5.Text4": "导入世界压缩包",
"GameEditWindow.Tab5.Info1": "是否要删除世界 {0}",
"GameEditWindow.Tab5.Info2": "选择地图压缩包",
"GameEditWindow.Tab5.Info3": "地图导出成功",
@@ -522,6 +532,7 @@
"GameEditWindow.Tab5.Error3": "世界备份失败",
"GameEditWindow.Tab5.Error4": "备份还原失败",
"GameEditWindow.Tab5.Error5": "没有可以还原的世界",
+ "GameEditWindow.Tab8.Text1": "导入资源包",
"GameEditWindow.Tab8.Info1": "是否要删除资源包 {0}",
"GameEditWindow.Tab8.Info2": "选择导入的资源包",
"GameEditWindow.Tab8.Info3": "正在加载资源包列表",
@@ -540,10 +551,12 @@
"GameEditWindow.Tab10.Info5": "删除成功",
"GameEditWindow.Tab10.Info6": "正在处理中",
"GameEditWindow.Tab10.Error1": "错误的参数",
+ "GameEditWindow.Tab11.Text1": "导入光影包",
"GameEditWindow.Tab11.Info1": "导入光影包",
"GameEditWindow.Tab11.Info2": "光影包",
"GameEditWindow.Tab11.Info3": "导入成功",
- "GameEditWindow.Tab12.Info1": "导入结构文件",
+ "GameEditWindow.Tab11.Error1": "文件已存在",
+ "GameEditWindow.Tab12.Text1": "导入结构文件",
"GameEditWindow.Tab12.Info2": "结构文件",
"GameEditWindow.Tab12.Info3": "导入成功",
"GameEditWindow.Tab12.DataGrid.Text3": "描述",
@@ -584,7 +597,6 @@
"DownloadWindow.DataGrid.Text5": "错误次数",
"DownloadWindow.Text1": "暂停下载",
"DownloadWindow.Text2": "停止下载",
- "DownloadWindow.Text3": "下载进度",
"DownloadWindow.Text4": "继续下载",
"DownloadWindow.Info1": "是否要停止下载",
"DownloadWindow.Info2": "下载已暂停",
@@ -663,6 +675,7 @@
"AddGameWindow.Tab3.Error3": "没有选择导入路径",
"AddGameWindow.Tab3.Error4": "没有扫描路径",
"AddGameWindow.Text1": "导入压缩包",
+ "AddGameWindow.Text2": "导入游戏文件夹",
"AddGameWindow.Info2": "游戏实例:{0}冲突,是否覆盖",
"AddModPackWindow.Title": "添加整合包",
"AddModPackWindow.Text1": "分类",
@@ -690,7 +703,6 @@
"AddModPackWindow.Control.Text2": "下载次数:",
"AddModPackWindow.Control.Text3": "上次更新:",
"AddWindow.Title": "游戏实例添加资源 {0}",
- "AddWindow.Text1": "资源类型",
"AddWindow.Text2": "搜索源",
"AddWindow.Text4": "排序",
"AddWindow.Text5": "分类",
@@ -700,11 +712,10 @@
"AddWindow.Text9": "扩展依赖",
"AddWindow.Text10": "下载Optifine",
"AddWindow.DataGrid.Text1": "是否下载",
- "AddWindow.DataGrid.Text2": "前置名字",
+ "AddWindow.DataGrid.Text2": "所需前置",
"AddWindow.Info1": "是否下载资源 {0}",
"AddWindow.Info2": "正在搜索资源中",
"AddWindow.Info3": "正在获取资源版本中",
- "AddWindow.Info4": "正在加载版本数据中",
"AddWindow.Info5": "正在下载资源",
"AddWindow.Info7": "请选择要添加的世界",
"AddWindow.Info8": "是否标记模组 {0}",
@@ -716,7 +727,6 @@
"AddWindow.Error1": "你还没有选择资源",
"AddWindow.Error2": "资源数据加载失败",
"AddWindow.Error3": "资源版本数据加载失败",
- "AddWindow.Error4": "游戏版本加载失败",
"AddWindow.Error5": "资源下载失败",
"AddWindow.Error6": "没有可以添加的世界",
"AddWindow.Error7": "数据包下载错误",
@@ -798,9 +808,9 @@
"ConfigEditWindow.Text13": "文件选择",
"ConfigEditWindow.DataGrid.Text1": "标号",
"ConfigEditWindow.DataGrid.Text2": "值",
- "ConfigEditWindow.Flyouts1.Text3": "修改键",
- "ConfigEditWindow.Flyouts1.Text4": "修改值",
- "ConfigEditWindow.Flyouts1.Text5": "搜索键",
+ "ConfigEditWindow.Flyouts.Text3": "修改键",
+ "ConfigEditWindow.Flyouts.Text4": "修改值",
+ "ConfigEditWindow.Flyouts.Text5": "搜索键",
"ConfigEditWindow.Info1": "是否删除NBT标签",
"ConfigEditWindow.Info2": "添加NBT标签",
"ConfigEditWindow.Info3": "键名",
@@ -872,9 +882,9 @@
"GameCloudWindow.Tab3.Info1": "没有云端存档",
"GameCloudWindow.Tab3.Info2": "没有本地路径",
"GameCloudWindow.Tab3.Info3": "没有本地存档",
- "GameCloudWindow.Flyouts1.Text1": "上传存档",
- "GameCloudWindow.Flyouts1.Text2": "下载存档",
- "GameCloudWindow.Flyouts1.Text3": "删除云存档",
+ "GameCloudWindow.Flyouts.Text1": "上传存档",
+ "GameCloudWindow.Flyouts.Text2": "下载存档",
+ "GameCloudWindow.Flyouts.Text3": "删除云存档",
"GameCloudWindow.Info1": "检查云同步中",
"GameCloudWindow.Info2": "没有同步",
"GameCloudWindow.Info3": "启用云同步中",
@@ -893,7 +903,6 @@
"GameCloudWindow.Info16": "是否要删除该存档的云端数据?",
"GameCloudWindow.Info17": "删除完成",
"GameCloudWindow.Info18": "正在删除",
- "GameCloudWindow.Error1": "云服务器未链接",
"GameCloudWindow.Error2": "参数不完整",
"GameCloudWindow.Error3": "云服务器错误",
"GameCloudWindow.Error4": "没有游戏实例",
@@ -909,20 +918,14 @@
"NetFrpWindow.Tabs.Text4": "在线映射列表",
"NetFrpWindow.Tabs.Text5": "OpenFrp映射",
"NetFrpWindow.Tab1.Text1": "访问密钥",
- "NetFrpWindow.Tab1.Text2": "验证密钥",
- "NetFrpWindow.Tab1.Text3": "用户ID:",
- "NetFrpWindow.Tab1.Text4": "用户名:",
"NetFrpWindow.Tab1.Text5": "没有隧道",
"NetFrpWindow.Tab1.Text6": "刷新隧道列表",
- "NetFrpWindow.Tab1.Text8": "清空结果",
- "NetFrpWindow.Tab1.Text9": "隧道名",
"NetFrpWindow.Tab1.Text10": "隧道ID",
"NetFrpWindow.Tab1.Text11": "隧道类型",
"NetFrpWindow.Tab1.Text12": "远程端口",
"NetFrpWindow.Tab1.Text13": "是否可用",
"NetFrpWindow.Tab1.Info1": "正在获取用户信息",
"NetFrpWindow.Tab1.Info2": "正在获取隧道信息",
- "NetFrpWindow.Tab1.Error1": "用户信息获取失败",
"NetFrpWindow.Tab1.Error2": "正在获取隧道信息",
"NetFrpWindow.Tab1.Error3": "请输入密钥",
"NetFrpWindow.Tab2.Text1": "没有扫描到本地的局域网游戏",
@@ -934,7 +937,6 @@
"NetFrpWindow.Tab2.Info2": "映射初始化成功",
"NetFrpWindow.Tab2.Error1": "映射初始化失败",
"NetFrpWindow.Tab2.Error2": "没有可用的映射通道",
- "NetFrpWindow.Tab3.Text1": "进程日志",
"NetFrpWindow.Tab3.Text2": "结束映射",
"NetFrpWindow.Tab3.Text3": "共享映射",
"NetFrpWindow.Tab3.Info1": "开启成功,快发送地址给你的小伙伴一起联机吧!",
@@ -945,8 +947,6 @@
"NetFrpWindow.Tab3.Error1": "共享映射失败",
"NetFrpWindow.Tab4.Text1": "没有在线的服务器",
"NetFrpWindow.Tab4.Text2": "刷新列表",
- "NetFrpWindow.Tab4.Text3": "加入",
- "NetFrpWindow.Tab4.Text4": "复制地址",
"NetFrpWindow.Tab4.Info1": "正在获取线上服务器列表",
"NetFrpWindow.Tab4.Info2": "正在验证微软账户",
"NetFrpWindow.Tab4.Info3": "请选择一个游戏实例加入",
@@ -955,48 +955,56 @@
"NetFrpWindow.Tab4.Error3": "线上服务器列表获取失败",
"NetFrpWindow.Tab4.Error4": "加入时发生错误",
"NetFrpWindow.Tab5.Text1": "OpenFrp OPENAPI",
- "GameWindow.Text2": "选择手柄",
- "GameWindow.Text3": "选择配置",
- "GameWindow.Info1": "已调整手柄",
+ "JoystickSettingControl.Text2": "选择手柄",
+ "JoystickSettingControl.Text3": "选择配置",
+ "MenuControl.Text1": "收起",
"ServerMotdControl.Text1": "玩家数量:",
"ServerMotdControl.Text2": "服务器版本:",
"ServerMotdControl.Text3": "延迟:",
"ServerMotdControl.Text4": "正在获取服务器信息",
"ServerMotdControl.Text5": "服务器信息获取失败",
- "SkinRotate.Item1": "手臂旋转",
- "SkinRotate.Item2": "腿部旋转",
- "SkinRotate.Item3": "头部旋转",
- "ModFilter.Item4": "modid",
- "ExportPack.Item1": "ColorMC整合包",
- "ExportPack.Item2": "CurseForge整合包",
- "ExportPack.Item3": "Modrinth整合包",
- "ExportPack.Item4": "MMC导入包",
- "ExportPack.Item5": "HMCL导入包",
- "TranTypes.Item1": "普通透明",
- "TranTypes.Item2": "模糊",
- "TranTypes.Item3": "亚克力模糊",
- "TranTypes.Item4": "强制亚克力模糊",
- "TranTypes.Item5": "云母",
- "SortOrder.Item1": "顺序",
- "SortOrder.Item2": "倒序",
- "SkinType.Old": "旧版皮肤",
- "SkinType.New": "新版皮肤",
- "SkinType.New_Slim": "新版纤细皮肤",
- "SkinType.Other": "未知的皮肤类型",
- "Gui.Info3": "已设置",
- "Gui.Info4": "添加成功",
- "Gui.Info5": "有新版本,是否要更新",
- "Gui.Info6": "添加外置设置",
- "Gui.Info7": "导入游戏压缩包",
+ "Type.SkinRotate.Item1": "手臂旋转",
+ "Type.SkinRotate.Item2": "腿部旋转",
+ "Type.SkinRotate.Item3": "头部旋转",
+ "Type.ExportPack.Item1": "ColorMC整合包",
+ "Type.ExportPack.Item2": "CurseForge整合包",
+ "Type.ExportPack.Item3": "Modrinth整合包",
+ "Type.ExportPack.Item4": "MMC导入包",
+ "Type.ExportPack.Item5": "HMCL导入包",
+ "Type.TranTypes.Item1": "普通透明",
+ "Type.TranTypes.Item2": "模糊",
+ "Type.TranTypes.Item3": "亚克力模糊",
+ "Type.TranTypes.Item4": "强制亚克力模糊",
+ "Type.TranTypes.Item5": "云母",
+ "Type.SortOrder.Item1": "顺序",
+ "Type.SortOrder.Item2": "倒序",
+ "Type.SkinType.Old": "旧版皮肤",
+ "Type.SkinType.New": "新版皮肤",
+ "Type.SkinType.New_Slim": "新版纤细皮肤",
+ "Type.SkinType.Other": "未知的皮肤类型",
+ "Type.VersionType.Item1": "正式版",
+ "Type.VersionType.Item2": "快照版",
+ "Type.VersionType.Item3": "其他版",
+ "Type.VersionType.Item4": "全部",
+ "Type.Postion.Item1": "左上",
+ "Type.Postion.Item2": "上",
+ "Type.Postion.Item3": "右上",
+ "Type.Postion.Item4": "左",
+ "Type.Postion.Item5": "居中",
+ "Type.Postion.Item6": "右",
+ "Type.Postion.Item7": "左下",
+ "Type.Postion.Item8": "下",
+ "Type.Postion.Item9": "右下",
+ "Type.AxisType.Item1": "左摇杆",
+ "Type.AxisType.Item2": "右摇杆",
+ "Utils.GameCloud.Info1": "使用空间 {0}/{1} Mb",
+ "Utils.GameCloud.Error1": "云服务器验证错误",
+ "Utils.GameCloud.Error2": "无法链接云服务器",
+ "Utils.GameCloud.Error3": "云服务器密钥错误",
+ "Gui.Text1": "← 返回",
"Gui.Info8": "有新版本",
"Gui.Info9": "保存皮肤",
- "Gui.Info10": "已保存",
"Gui.Info11": "选择服务器实例储存文件夹",
- "Gui.Info14": "导入模组",
- "Gui.Info15": "导入世界压缩包",
- "Gui.Info16": "导入资源包",
- "Gui.Info17": "导入光影包",
- "Gui.Info18": "导入结构文件",
"Gui.Info20": "没有更新消息",
"Gui.Info21": "保存文本",
"Gui.Info22": "选择压缩包",
@@ -1008,18 +1016,12 @@
"Gui.Info28": "正在启动 {0}",
"Gui.Info29": "已设置游戏图标",
"Gui.Info30": "正在设置游戏图标",
- "Gui.Info31": "← 返回",
- "Gui.Info32": "收起",
- "Gui.Info34": "正在删除游戏实例",
- "Gui.Info35": "启动器更新日志",
"Gui.Info36": "账户已被占用,是否继续使用这个账户",
"Gui.Info37": "选择设置的游戏实例图标",
"Gui.Info38": "游戏实例图标",
"Gui.Info39": "选择皮肤导入",
"Gui.Info40": "皮肤文件",
"Gui.Info41": "游戏首次启动会出现错误,结束后请再次启动继续",
- "Gui.Info42": "导入游戏文件夹",
- "Gui.Info43": "是否打开国内文档",
"Gui.Info44": "游戏实例:",
"Gui.Info45": "游戏版本:",
"Gui.Info46": "模组加载器:{0} 加载器版本 {1}",
@@ -1033,16 +1035,13 @@
"Gui.Error4": "登录发生异常",
"Gui.Error5": "找不到指定的Java",
"Gui.Error6": "游戏启动失败",
- "Gui.Error8": "请输入必要信息",
"Gui.Error9": "找不到指定的文件",
"Gui.Error10": "自定义UI加载失败",
"Gui.Error11": "颜色数据读取失败",
- "Gui.Error12": "文件已存在",
"Gui.Error14": "损坏的结构文件",
"Gui.Error16": "模组更新检查失败",
"Gui.Error17": "读取Gui配置文件错误",
"Gui.Error20": "世界备份错误",
- "Gui.Error21": "启动器检查更新错误",
"Gui.Error22": "启动器下载更新失败",
"Gui.Error24": "获取网络图片失败",
"Gui.Error25": "线程错误",
@@ -1057,7 +1056,6 @@
"Gui.Error35": "披风 {0} 读取失败",
"Gui.Error36": "游戏云同步初始化失败",
"Gui.Error37": "游戏云同步链接失败",
- "Gui.Error38": "启动器更新日志获取失败",
"Gui.Error39": "没有选择游戏实例",
"Gui.Error40": "没有选择账户",
"Gui.Error41": "账户冲突",
@@ -1067,7 +1065,6 @@
"Gui.Error45": "获取图标失败",
"Gui.Error46": "获取Java列表错误",
"Gui.Error47": "没有找到您的Minecraft账户,请确认你的账户已经购买了Minecraft,并在https://minecraft.net登录并查看皮肤",
- "Gui.Error48": "启动器更新运行出错,已回到旧版本",
"Gui.Error49": "读取Frp配置文件错误",
"Gui.Error50": "读取手柄配置文件错误",
"Gui.Error51": "没有找到手柄配置,是否继续使用手柄模式?",
@@ -1187,6 +1184,9 @@
"Text.Size": "大小",
"Text.Downloaded": "已下载",
"Text.DownloadSource": "下载源",
+ "Text.Update": "有新版本,是否要更新",
+ "Text.Import": "导入游戏压缩包",
+ "Text.Saved": "已保存",
"Button.OpFile": "打开文件夹",
"Button.Set": "设置",
"Button.Select": "选择文件",
@@ -1204,27 +1204,5 @@
"Button.Filter": "‖筛选",
"Button.NetDownload": "在线下载",
"Button.SelectAll": "全选",
- "Button.UnSelectAll": "全不选",
- "Live2D.Text1": "欢迎回来喵",
- "Live2D.Text2": "游戏启动了喵",
- "Live2D.Text3": "游戏崩溃了喵",
- "GameCloud.Info1": "使用空间 {0}/{1} Mb",
- "GameCloud.Error1": "云服务器验证错误",
- "GameCloud.Error2": "无法链接云服务器",
- "GameCloud.Error3": "云服务器密钥错误",
- "VersionType.Item1": "正式版",
- "VersionType.Item2": "快照版",
- "VersionType.Item3": "其他版",
- "VersionType.Item4": "全部",
- "Postion.Item1": "左上",
- "Postion.Item2": "上",
- "Postion.Item3": "右上",
- "Postion.Item4": "左",
- "Postion.Item5": "居中",
- "Postion.Item6": "右",
- "Postion.Item7": "左下",
- "Postion.Item8": "下",
- "Postion.Item9": "右下",
- "AxisType.Item1": "左摇杆",
- "AxisType.Item2": "右摇杆"
+ "Button.UnSelectAll": "全不选"
}
\ No newline at end of file
diff --git a/src/ColorMC.Gui/UI/Controls/Add/AddGameControl.axaml.cs b/src/ColorMC.Gui/UI/Controls/Add/AddGameControl.axaml.cs
index 6fecf0c45..2412b7526 100644
--- a/src/ColorMC.Gui/UI/Controls/Add/AddGameControl.axaml.cs
+++ b/src/ColorMC.Gui/UI/Controls/Add/AddGameControl.axaml.cs
@@ -51,12 +51,12 @@ private void DragEnter(object? sender, DragEventArgs e)
if (item is IStorageFolder forder && Directory.Exists(forder.GetPath()))
{
Grid2.IsVisible = true;
- Label1.Text = App.Lang("Gui.Info42");
+ Label1.Text = App.Lang("AddGameWindow.Text2");
}
else if (item.Name.EndsWith(".zip") || item.Name.EndsWith(".mrpack"))
{
Grid2.IsVisible = true;
- Label1.Text = App.Lang("Gui.Info7");
+ Label1.Text = App.Lang("Text.Import");
}
}
}
diff --git a/src/ColorMC.Gui/UI/Controls/GameEdit/Tab11Control.axaml b/src/ColorMC.Gui/UI/Controls/GameEdit/Tab11Control.axaml
index 685824cab..c55c36a82 100644
--- a/src/ColorMC.Gui/UI/Controls/GameEdit/Tab11Control.axaml
+++ b/src/ColorMC.Gui/UI/Controls/GameEdit/Tab11Control.axaml
@@ -86,7 +86,7 @@
+ Text="{setting:Localize GameEditWindow.Tab11.Text1}" />
diff --git a/src/ColorMC.Gui/UI/Controls/GameEdit/Tab12Control.axaml b/src/ColorMC.Gui/UI/Controls/GameEdit/Tab12Control.axaml
index 82b995fa6..71387bfda 100644
--- a/src/ColorMC.Gui/UI/Controls/GameEdit/Tab12Control.axaml
+++ b/src/ColorMC.Gui/UI/Controls/GameEdit/Tab12Control.axaml
@@ -97,7 +97,7 @@
+ Text="{setting:Localize GameEditWindow.Tab12.Text1}" />
diff --git a/src/ColorMC.Gui/UI/Controls/GameEdit/Tab4Control.axaml b/src/ColorMC.Gui/UI/Controls/GameEdit/Tab4Control.axaml
index 0d348881f..5e00cb2ca 100644
--- a/src/ColorMC.Gui/UI/Controls/GameEdit/Tab4Control.axaml
+++ b/src/ColorMC.Gui/UI/Controls/GameEdit/Tab4Control.axaml
@@ -167,7 +167,7 @@
+ Text="{setting:Localize GameEditWindow.Tab4.Text6}" />
diff --git a/src/ColorMC.Gui/UI/Controls/GameEdit/Tab5Control.axaml b/src/ColorMC.Gui/UI/Controls/GameEdit/Tab5Control.axaml
index 67f265576..72fca1b49 100644
--- a/src/ColorMC.Gui/UI/Controls/GameEdit/Tab5Control.axaml
+++ b/src/ColorMC.Gui/UI/Controls/GameEdit/Tab5Control.axaml
@@ -110,7 +110,7 @@
+ Text="{setting:Localize GameEditWindow.Tab5.Text4}" />
\ No newline at end of file
diff --git a/src/ColorMC.Gui/UI/Controls/GameEdit/Tab8Control.axaml b/src/ColorMC.Gui/UI/Controls/GameEdit/Tab8Control.axaml
index f9e5eadd6..afb600d6b 100644
--- a/src/ColorMC.Gui/UI/Controls/GameEdit/Tab8Control.axaml
+++ b/src/ColorMC.Gui/UI/Controls/GameEdit/Tab8Control.axaml
@@ -82,7 +82,7 @@
+ Text="{setting:Localize GameEditWindow.Tab8.Text1}" />
diff --git a/src/ColorMC.Gui/UI/Controls/Main/JoystickSettingControl.axaml b/src/ColorMC.Gui/UI/Controls/Main/JoystickSettingControl.axaml
index 8a9e9340d..07d9cb4df 100644
--- a/src/ColorMC.Gui/UI/Controls/Main/JoystickSettingControl.axaml
+++ b/src/ColorMC.Gui/UI/Controls/Main/JoystickSettingControl.axaml
@@ -11,14 +11,14 @@
mc:Ignorable="d">
-
+
-
+
App.FindRoot(VisualRoot);
- public string Title => App.Lang("Name");
+ public string Title => "ColorMC";
public readonly SelfPageSlideSide SidePageSlide300 = new(TimeSpan.FromMilliseconds(300));
@@ -72,7 +72,7 @@ private void DragEnter(object? sender, DragEventArgs e)
if (e.Data.Contains(DataFormats.Text))
{
Grid2.IsVisible = true;
- Label1.Text = App.Lang("Gui.Info6");
+ Label1.Text = App.Lang("UserWindow.Text8");
}
else if (e.Data.Contains(DataFormats.Files))
{
@@ -86,12 +86,12 @@ private void DragEnter(object? sender, DragEventArgs e)
if (item is IStorageFolder forder && Directory.Exists(forder.GetPath()))
{
Grid2.IsVisible = true;
- Label1.Text = App.Lang("Gui.Info42");
+ Label1.Text = App.Lang("AddGameWindow.Text2");
}
else if (item.Name.EndsWith(".zip") || item.Name.EndsWith(".mrpack"))
{
Grid2.IsVisible = true;
- Label1.Text = App.Lang("Gui.Info7");
+ Label1.Text = App.Lang("Text.Import");
}
}
}
@@ -198,7 +198,7 @@ public void Opened()
if (ColorMCGui.IsCrash)
{
var model = (DataContext as MainModel)!;
- model.Model.Show(App.Lang("Gui.Error48"));
+ model.Model.Show(App.Lang("MainWindow.Error2"));
}
}
diff --git a/src/ColorMC.Gui/UI/Controls/MenuControl.axaml b/src/ColorMC.Gui/UI/Controls/MenuControl.axaml
index 4cc07c717..e17fcc88d 100644
--- a/src/ColorMC.Gui/UI/Controls/MenuControl.axaml
+++ b/src/ColorMC.Gui/UI/Controls/MenuControl.axaml
@@ -62,7 +62,7 @@
Fill="{setting:Colors Font}"
Path="/Resource/Icon/left1.svg"
Stroke="{setting:Colors Font}" />
-
+
+ Text="{setting:Localize UserWindow.Text8}" />
diff --git a/src/ColorMC.Gui/UI/Flyouts/ConfigFlyout1.cs b/src/ColorMC.Gui/UI/Flyouts/ConfigFlyout1.cs
index f9daf3360..af8f76dfc 100644
--- a/src/ColorMC.Gui/UI/Flyouts/ConfigFlyout1.cs
+++ b/src/ColorMC.Gui/UI/Flyouts/ConfigFlyout1.cs
@@ -96,15 +96,15 @@ public ConfigFlyout1(Control con, ITreeDataGridSelection list, GameConfigEditMod
_model.Delete(_item!);
}
}),
- (App.Lang("ConfigEditWindow.Flyouts1.Text3"), editKey, () =>
+ (App.Lang("ConfigEditWindow.Flyouts.Text3"), editKey, () =>
{
_model.SetKey(_item!);
}),
- (App.Lang("ConfigEditWindow.Flyouts1.Text4"), editValue, () =>
+ (App.Lang("ConfigEditWindow.Flyouts.Text4"), editValue, () =>
{
_model.SetValue(_item!);
}),
- (App.Lang("ConfigEditWindow.Flyouts1.Text5"), true, _model.Find),
+ (App.Lang("ConfigEditWindow.Flyouts.Text5"), true, _model.Find),
], con);
}
}
diff --git a/src/ColorMC.Gui/UI/Flyouts/GameCloudFlyout1.cs b/src/ColorMC.Gui/UI/Flyouts/GameCloudFlyout1.cs
index 1084b8211..84a9740e8 100644
--- a/src/ColorMC.Gui/UI/Flyouts/GameCloudFlyout1.cs
+++ b/src/ColorMC.Gui/UI/Flyouts/GameCloudFlyout1.cs
@@ -18,9 +18,9 @@ public GameCloudFlyout1(Control con, WorldCloudModel model)
{
PathBinding.OpPath(_model.World);
}),
- (App.Lang("GameCloudWindow.Flyouts1.Text1"), model.HaveLocal, _model.Upload),
- (App.Lang("GameCloudWindow.Flyouts1.Text2"), model.HaveCloud, _model.Download),
- (App.Lang("GameCloudWindow.Flyouts1.Text3"), model.HaveCloud, _model.DeleteCloud),
+ (App.Lang("GameCloudWindow.Flyouts.Text1"), model.HaveLocal, _model.Upload),
+ (App.Lang("GameCloudWindow.Flyouts.Text2"), model.HaveCloud, _model.Download),
+ (App.Lang("GameCloudWindow.Flyouts.Text3"), model.HaveCloud, _model.DeleteCloud),
], con);
}
}
diff --git a/src/ColorMC.Gui/UI/Flyouts/Live2DFlyout.cs b/src/ColorMC.Gui/UI/Flyouts/Live2DFlyout.cs
index a084ecb02..3e8f10b54 100644
--- a/src/ColorMC.Gui/UI/Flyouts/Live2DFlyout.cs
+++ b/src/ColorMC.Gui/UI/Flyouts/Live2DFlyout.cs
@@ -10,7 +10,7 @@ public Live2DFlyout(Live2dRender live2d)
{
_ = new FlyoutsControl(
[
- (App.Lang("MainWindow.Live2d.Flyouts.Text1"), true, ()=>
+ (App.Lang("MainWindow.Live2D.Flyouts.Text1"), true, ()=>
{
var list = live2d.GetMotions();
if (list.Count != 0)
@@ -23,7 +23,7 @@ public Live2DFlyout(Live2dRender live2d)
_ = new FlyoutsControl([.. list1], live2d);
}
}),
- (App.Lang("MainWindow.Live2d.Flyouts.Text2"), true, ()=>
+ (App.Lang("MainWindow.Live2D.Flyouts.Text2"), true, ()=>
{
var list = live2d.GetExpressions();
if (list.Count != 0)
diff --git a/src/ColorMC.Gui/UI/Model/Add/AddGameTab3Model.cs b/src/ColorMC.Gui/UI/Model/Add/AddGameTab3Model.cs
index 75927642d..d6a08695a 100644
--- a/src/ColorMC.Gui/UI/Model/Add/AddGameTab3Model.cs
+++ b/src/ColorMC.Gui/UI/Model/Add/AddGameTab3Model.cs
@@ -138,7 +138,7 @@ public async Task AddFiles()
[RelayCommand]
public async Task SelectLocal()
{
- var res = await PathBinding.SelectPath(FileType.Game);
+ var res = await PathBinding.SelectPath(PathType.GamePath);
if (string.IsNullOrWhiteSpace(res))
{
return;
diff --git a/src/ColorMC.Gui/UI/Model/GameConfigEdit/ConfigEditModel.cs b/src/ColorMC.Gui/UI/Model/GameConfigEdit/ConfigEditModel.cs
index 4900c4377..d9e586ef5 100644
--- a/src/ColorMC.Gui/UI/Model/GameConfigEdit/ConfigEditModel.cs
+++ b/src/ColorMC.Gui/UI/Model/GameConfigEdit/ConfigEditModel.cs
@@ -223,7 +223,7 @@ public void Save()
}
}
- Model.Notify(App.Lang("Gui.Info10"));
+ Model.Notify(App.Lang("Text.Saved"));
}
[RelayCommand]
diff --git a/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab11Model.cs b/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab11Model.cs
index 5f023c36d..90c5a75c4 100644
--- a/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab11Model.cs
+++ b/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab11Model.cs
@@ -39,7 +39,7 @@ public async Task ImportShaderpack()
if (res == false)
{
- Model.Notify(App.Lang("Gui.Error12"));
+ Model.Notify(App.Lang("GameEditWindow.Tab11.Error1"));
return;
}
diff --git a/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab12Model.cs b/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab12Model.cs
index 183b98119..43c1abde7 100644
--- a/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab12Model.cs
+++ b/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab12Model.cs
@@ -42,7 +42,7 @@ public async Task AddSchematic()
if (res == false)
{
- Model.Show(App.Lang("Gui.Error12"));
+ Model.Show(App.Lang("GameEditWindow.Tab11.Error1"));
return;
}
diff --git a/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab1Model.cs b/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab1Model.cs
index 5a660bd66..5c299f210 100644
--- a/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab1Model.cs
+++ b/src/ColorMC.Gui/UI/Model/GameEdit/GameEditTab1Model.cs
@@ -498,7 +498,7 @@ public async Task Delete()
if (!res)
return;
- Model.Progress(App.Lang("Gui.Info34"));
+ Model.Progress(App.Lang("GameEditWindow.Tab1.Info11"));
var res1 = await GameBinding.DeleteGame(_obj, Model.ShowWait);
Model.ProgressClose();
if (!res1)
diff --git a/src/ColorMC.Gui/UI/Model/Items/GameItemModel.cs b/src/ColorMC.Gui/UI/Model/Items/GameItemModel.cs
index c1234665b..897781bbe 100644
--- a/src/ColorMC.Gui/UI/Model/Items/GameItemModel.cs
+++ b/src/ColorMC.Gui/UI/Model/Items/GameItemModel.cs
@@ -259,7 +259,7 @@ public void SetJoystick()
{
DialogHost.Close("MainCon");
value.ChangeConfig(model);
- Model.Notify(App.Lang("GameWindow.Info1"));
+ Model.Notify(App.Lang("MainWindow.Info39"));
};
DialogHost.Show(model, "MainCon");
}
@@ -299,7 +299,7 @@ public async void DeleteGame()
return;
}
- Model.Progress(App.Lang("Gui.Info34"));
+ Model.Progress(App.Lang("GameEditWindow.Tab1.Info11"));
res = await GameBinding.DeleteGame(Obj, Model.ShowWait);
Model.ProgressClose();
Model.InputClose();
diff --git a/src/ColorMC.Gui/UI/Model/Items/ServerPackConfigModel.cs b/src/ColorMC.Gui/UI/Model/Items/ServerPackConfigModel.cs
index 6ba6402b8..f8b1fcf45 100644
--- a/src/ColorMC.Gui/UI/Model/Items/ServerPackConfigModel.cs
+++ b/src/ColorMC.Gui/UI/Model/Items/ServerPackConfigModel.cs
@@ -3,16 +3,16 @@
namespace ColorMC.Gui.UI.Model.Items;
///
-/// ʾ
+/// 服务器包配置显示
///
public record ServerPackConfigModel
{
///
- ///
+ /// 组名
///
public string Group => Obj.Group;
///
- ///
+ /// 类型
///
public string Type => GetType(Obj);
diff --git a/src/ColorMC.Gui/UI/Model/Main/MainModel.cs b/src/ColorMC.Gui/UI/Model/Main/MainModel.cs
index 82d7feabf..180f3384d 100644
--- a/src/ColorMC.Gui/UI/Model/Main/MainModel.cs
+++ b/src/ColorMC.Gui/UI/Model/Main/MainModel.cs
@@ -148,11 +148,11 @@ public async Task NewInfo()
var data = await WebBinding.GetNewLog();
if (data == null)
{
- Model.Show(App.Lang("Gui.Error38"));
+ Model.Show(App.Lang("MainWindow.Error1"));
}
else
{
- Model.ShowText(App.Lang("Gui.Info35"), data);
+ Model.ShowText(App.Lang("MainWindow.Info40"), data);
}
_isGetNewInfo = false;
@@ -161,7 +161,7 @@ public async Task NewInfo()
[RelayCommand]
public async Task Upgrade()
{
- var res = await Model.ShowTextWait(App.Lang("Gui.Info5"), _updateStr);
+ var res = await Model.ShowTextWait(App.Lang("Text.Update"), _updateStr);
if (res)
{
if (_isNewUpdate)
@@ -260,7 +260,7 @@ public void Cancel()
[RelayCommand]
public async Task OpenGuide()
{
- var res = await Model.ShowWait(App.Lang("Gui.Info43"));
+ var res = await Model.ShowWait(App.Lang("SettingWindow.Tab7.Info3"));
WebBinding.OpenWeb(res ? WebType.Guide1 : WebType.Guide);
}
diff --git a/src/ColorMC.Gui/UI/Model/ServerPack/ServerPackModel.cs b/src/ColorMC.Gui/UI/Model/ServerPack/ServerPackModel.cs
index 1272a286e..59a5a5437 100644
--- a/src/ColorMC.Gui/UI/Model/ServerPack/ServerPackModel.cs
+++ b/src/ColorMC.Gui/UI/Model/ServerPack/ServerPackModel.cs
@@ -33,7 +33,7 @@ public ServerPackModel(BaseModel model, ServerPackObj obj) : base(model)
public async void Gen()
{
- var local = await PathBinding.SelectPath(FileType.ServerPack);
+ var local = await PathBinding.SelectPath(PathType.ServerPackPath);
if (local == null)
return;
diff --git a/src/ColorMC.Gui/UI/Model/Setting/SettingTab1Model.cs b/src/ColorMC.Gui/UI/Model/Setting/SettingTab1Model.cs
index b3e717a81..34e023c41 100644
--- a/src/ColorMC.Gui/UI/Model/Setting/SettingTab1Model.cs
+++ b/src/ColorMC.Gui/UI/Model/Setting/SettingTab1Model.cs
@@ -45,7 +45,7 @@ public async Task ChangeRunDir()
return;
}
- var path = await PathBinding.SelectPath(FileType.RunDir);
+ var path = await PathBinding.SelectPath(PathType.RunDir);
if (path == null)
{
return;
diff --git a/src/ColorMC.Gui/UI/Model/Setting/SettingTab2Model.cs b/src/ColorMC.Gui/UI/Model/Setting/SettingTab2Model.cs
index 8f987410d..19878262c 100644
--- a/src/ColorMC.Gui/UI/Model/Setting/SettingTab2Model.cs
+++ b/src/ColorMC.Gui/UI/Model/Setting/SettingTab2Model.cs
@@ -420,14 +420,14 @@ public async Task SetPicSize()
await ConfigBinding.SetBackLimit(EnablePicResize, PicResize);
Model.ProgressClose();
- Model.Notify(App.Lang("Gui.Info3"));
+ Model.Notify(App.Lang("SettingWindow.Tab2.Info12"));
}
[RelayCommand]
public void SetPicTran()
{
ConfigBinding.SetBackTran(PicTran);
- Model.Notify(App.Lang("Gui.Info3"));
+ Model.Notify(App.Lang("SettingWindow.Tab2.Info12"));
}
[RelayCommand]
@@ -468,7 +468,7 @@ public async Task SetPic()
await ConfigBinding.SetBackPic(EnableBG, Pic, PicEffect);
Model.ProgressClose();
- Model.Notify(App.Lang("Gui.Info3"));
+ Model.Notify(App.Lang("SettingWindow.Tab2.Info12"));
}
[RelayCommand]
@@ -510,7 +510,7 @@ public void SetLive2D()
ConfigBinding.SetLive2D(Live2DModel);
Model.ProgressClose();
- Model.Notify(App.Lang("Gui.Info3"));
+ Model.Notify(App.Lang("SettingWindow.Tab2.Info12"));
}
public void LoadUISetting()
diff --git a/src/ColorMC.Gui/UI/Model/Setting/SettingTab3Model.cs b/src/ColorMC.Gui/UI/Model/Setting/SettingTab3Model.cs
index 47b78692d..2d3a604bf 100644
--- a/src/ColorMC.Gui/UI/Model/Setting/SettingTab3Model.cs
+++ b/src/ColorMC.Gui/UI/Model/Setting/SettingTab3Model.cs
@@ -141,7 +141,7 @@ public async Task StartCheck()
Model.ProgressClose();
if (res.Item1 == null)
{
- Model.Show(App.Lang("Gui.Error21"));
+ Model.Show(App.Lang("SettingWindow.Tab3.Error2"));
return;
}
else if (res.Item1 == true)
diff --git a/src/ColorMC.Gui/UI/Model/Setting/SettingTab5Model.cs b/src/ColorMC.Gui/UI/Model/Setting/SettingTab5Model.cs
index 0ddcfba9e..e6b5ecf3f 100644
--- a/src/ColorMC.Gui/UI/Model/Setting/SettingTab5Model.cs
+++ b/src/ColorMC.Gui/UI/Model/Setting/SettingTab5Model.cs
@@ -67,7 +67,7 @@ public void AddJava()
{
if (string.IsNullOrWhiteSpace(JavaName) || string.IsNullOrWhiteSpace(JavaLocal))
{
- Model.Show(App.Lang("Gui.Error8"));
+ Model.Show(App.Lang("SettingWindow.Tab5.Error2"));
return;
}
diff --git a/src/ColorMC.Gui/UI/Model/Setting/SettingTab6Model.cs b/src/ColorMC.Gui/UI/Model/Setting/SettingTab6Model.cs
index 48337e392..4908c3a78 100644
--- a/src/ColorMC.Gui/UI/Model/Setting/SettingTab6Model.cs
+++ b/src/ColorMC.Gui/UI/Model/Setting/SettingTab6Model.cs
@@ -201,7 +201,7 @@ public void Test()
{
if (string.IsNullOrWhiteSpace(FileUI))
{
- Model.Show(App.Lang("Gui.Error8"));
+ Model.Show(App.Lang("SettingWindow.Tab5.Error2"));
return;
}
var res = BaseBinding.TestCustomWindow(FileUI);
diff --git a/src/ColorMC.Gui/UI/Model/Setting/SettingTab7Model.cs b/src/ColorMC.Gui/UI/Model/Setting/SettingTab7Model.cs
index 29fad8d4a..7d0034646 100644
--- a/src/ColorMC.Gui/UI/Model/Setting/SettingTab7Model.cs
+++ b/src/ColorMC.Gui/UI/Model/Setting/SettingTab7Model.cs
@@ -40,7 +40,7 @@ public void OpenUrl4()
[RelayCommand]
public async Task OpenUrl5()
{
- var res = await Model.ShowWait(App.Lang("Gui.Info43"));
+ var res = await Model.ShowWait(App.Lang("SettingWindow.Tab7.Info3"));
WebBinding.OpenWeb(res ? WebType.Guide1 : WebType.Guide);
}
diff --git a/src/ColorMC.Gui/UI/Model/Skin/SkinModel.cs b/src/ColorMC.Gui/UI/Model/Skin/SkinModel.cs
index bd6fd2e71..d23a3617c 100644
--- a/src/ColorMC.Gui/UI/Model/Skin/SkinModel.cs
+++ b/src/ColorMC.Gui/UI/Model/Skin/SkinModel.cs
@@ -284,7 +284,7 @@ public async Task Save()
var res = await PathBinding.SaveFile(FileType.Skin, null);
if (res == true)
{
- Model.Notify(App.Lang("Gui.Info10"));
+ Model.Notify(App.Lang("Text.Saved"));
}
}
diff --git a/src/ColorMC.Gui/UI/Model/User/UsersModel.cs b/src/ColorMC.Gui/UI/Model/User/UsersModel.cs
index fae9cc4dc..530bdfc0c 100644
--- a/src/ColorMC.Gui/UI/Model/User/UsersModel.cs
+++ b/src/ColorMC.Gui/UI/Model/User/UsersModel.cs
@@ -214,7 +214,7 @@ public async Task Add()
_isOAuth = false;
if (string.IsNullOrWhiteSpace(name))
{
- Model.Show(App.Lang("Gui.Error8"));
+ Model.Show(App.Lang("SettingWindow.Tab5.Error2"));
break;
}
var res = await UserBinding.AddUser(AuthType.Offline, LoginOAuthCode, name, null);
@@ -223,7 +223,7 @@ public async Task Add()
Model.Show(res.Item2!);
break;
}
- Model.Notify(App.Lang("Gui.Info4"));
+ Model.Notify(App.Lang("UserWindow.Info12"));
Name = "";
ok = true;
break;
@@ -242,7 +242,7 @@ public async Task Add()
Model.Show(res.Item2!);
break;
}
- Model.Notify(App.Lang("Gui.Info4"));
+ Model.Notify(App.Lang("UserWindow.Info12"));
Name = "";
_isOAuth = false;
ok = true;
@@ -258,7 +258,7 @@ public async Task Add()
if (string.IsNullOrWhiteSpace(User) ||
string.IsNullOrWhiteSpace(Password))
{
- Model.Show(App.Lang("Gui.Error8"));
+ Model.Show(App.Lang("SettingWindow.Tab5.Error2"));
break;
}
Model.Progress(App.Lang("UserWindow.Info2"));
@@ -270,7 +270,7 @@ public async Task Add()
Model.Show(res.Item2!);
break;
}
- Model.Notify(App.Lang("Gui.Info4"));
+ Model.Notify(App.Lang("UserWindow.Info12"));
Name = "";
ok = true;
break;
@@ -285,7 +285,7 @@ public async Task Add()
if (string.IsNullOrWhiteSpace(User) ||
string.IsNullOrWhiteSpace(Password))
{
- Model.Show(App.Lang("Gui.Error8"));
+ Model.Show(App.Lang("SettingWindow.Tab5.Error2"));
break;
}
Model.Progress(App.Lang("UserWindow.Info2"));
@@ -297,7 +297,7 @@ public async Task Add()
Model.Show(res.Item2!);
break;
}
- Model.Notify(App.Lang("Gui.Info4"));
+ Model.Notify(App.Lang("UserWindow.Info12"));
Name = "";
ok = true;
break;
@@ -306,7 +306,7 @@ public async Task Add()
if (string.IsNullOrWhiteSpace(User) ||
string.IsNullOrWhiteSpace(Password))
{
- Model.Show(App.Lang("Gui.Error8"));
+ Model.Show(App.Lang("SettingWindow.Tab5.Error2"));
break;
}
Model.Progress(App.Lang("UserWindow.Info2"));
@@ -318,7 +318,7 @@ public async Task Add()
Model.Show(res.Item2!);
break;
}
- Model.Notify(App.Lang("Gui.Info4"));
+ Model.Notify(App.Lang("UserWindow.Info12"));
ok = true;
break;
case AuthType.SelfLittleSkin:
@@ -332,7 +332,7 @@ public async Task Add()
if (string.IsNullOrWhiteSpace(User) ||
string.IsNullOrWhiteSpace(Password))
{
- Model.Show(App.Lang("Gui.Error8"));
+ Model.Show(App.Lang("SettingWindow.Tab5.Error2"));
break;
}
Model.Progress(App.Lang("UserWindow.Info2"));
@@ -344,7 +344,7 @@ public async Task Add()
Model.Show(res.Item2!);
break;
}
- Model.Notify(App.Lang("Gui.Info4"));
+ Model.Notify(App.Lang("UserWindow.Info12"));
Name = "";
ok = true;
break;
diff --git a/src/ColorMC.Gui/UI/Windows/HeadControl.axaml b/src/ColorMC.Gui/UI/Windows/HeadControl.axaml
index 5264b1064..f8b81a10c 100644
--- a/src/ColorMC.Gui/UI/Windows/HeadControl.axaml
+++ b/src/ColorMC.Gui/UI/Windows/HeadControl.axaml
@@ -45,7 +45,7 @@
BorderBrush="Transparent"
BorderThickness="0"
Command="{Binding BackClick}"
- Content="{setting:Localize Gui.Info31}"
+ Content="{setting:Localize Gui.Text1}"
CornerRadius="0"
Foreground="White"
IsEnabled="{Binding HeadBackEnable}"
diff --git a/src/ColorMC.Gui/UIBinding/BaseBinding.cs b/src/ColorMC.Gui/UIBinding/BaseBinding.cs
index 9ae436dfd..90edf4061 100644
--- a/src/ColorMC.Gui/UIBinding/BaseBinding.cs
+++ b/src/ColorMC.Gui/UIBinding/BaseBinding.cs
@@ -60,9 +60,9 @@ public static class BaseBinding
///
public static void Init()
{
- ColorMCCore.OnError += App.ShowError;
- ColorMCCore.OnLanguageReload += LanguageReload;
- ColorMCCore.OnGameLog += (obj, d) =>
+ ColorMCCore.Error += App.ShowError;
+ ColorMCCore.LanguageReload += LanguageReload;
+ ColorMCCore.GameLog += (obj, d) =>
{
if (GameLogs.TryGetValue(obj.UUID, out var log))
{
@@ -74,7 +74,7 @@ public static void Init()
win.Log(d);
}
};
- ColorMCCore.OnStartDownload = App.StartDownload;
+ ColorMCCore.TopDownload = App.StartDownload;
ColorMCCore.GameExit += GameExit;
if (ColorMCGui.RunType == RunType.Program && SystemInfo.Os != OsType.Android)
@@ -125,7 +125,7 @@ private static void GameExit(GameSettingObj obj, LoginObj obj1, int code)
Dispatcher.UIThread.Post(() =>
{
App.ShowGameLog(obj);
- App.MainWindow?.ShowMessage(App.Lang("Live2D.Text3"));
+ App.MainWindow?.ShowMessage(App.Lang("MainWindow.Live2D.Text3"));
});
}
else
@@ -353,7 +353,7 @@ await Launch(obj, (a) =>
{
return Dispatcher.UIThread.InvokeAsync(() =>
{
- return model.ShowTextWait(App.Lang("Gui.Info5"), text ?? "");
+ return model.ShowTextWait(App.Lang("Text.Update"), text ?? "");
});
}, () =>
{
@@ -446,7 +446,7 @@ await Launch(obj, (a) =>
Media.Pause();
}
- App.MainWindow?.ShowMessage(App.Lang("Live2D.Text2"));
+ App.MainWindow?.ShowMessage(App.Lang("MainWindow.Live2D.Text2"));
RunGames.Add(obj.UUID);
GameCount.LaunchDone(obj);
@@ -603,8 +603,8 @@ private static void GameWait(BaseModel model, GameSettingObj obj, DesktopGameHan
/// 进程信息
private static async Task<(IGameHandel?, string?)> Launch(GameSettingObj obj,
ColorMCCore.Request request, ColorMCCore.LaunchP pre,
- ColorMCCore.UpdateState state, ColorMCCore.UpdateSelect select,
- ColorMCCore.NoJava nojava, ColorMCCore.LoginFail loginfail,
+ ColorMCCore.UpdateState state, ColorMCCore.ChoiseCall select,
+ ColorMCCore.NoJava nojava, ColorMCCore.LoginFailRun loginfail,
ColorMCCore.GameLaunch update2,
LoginObj obj1, WorldObj? world, int? mixinport, CancellationToken cancel)
{
diff --git a/src/ColorMC.Gui/UIBinding/LanguageBinding.cs b/src/ColorMC.Gui/UIBinding/LanguageBinding.cs
index a46d8f510..efb64a442 100644
--- a/src/ColorMC.Gui/UIBinding/LanguageBinding.cs
+++ b/src/ColorMC.Gui/UIBinding/LanguageBinding.cs
@@ -11,8 +11,8 @@ public static string[] GetAxisTypeName()
{
return
[
- App.Lang("AxisType.Item1"),
- App.Lang("AxisType.Item2")
+ App.Lang("Type.AxisType.Item1"),
+ App.Lang("Type.AxisType.Item2")
];
}
@@ -27,7 +27,7 @@ public static string[] GetFilterName()
App.Lang("Text.Name"),
App.Lang("Text.FileName"),
App.Lang("Text.Author"),
- App.Lang("ModFilter.Item4")
+ "modid"
];
}
@@ -35,11 +35,11 @@ public static string[] GetExportName()
{
return
[
- App.Lang("ExportPack.Item1"),
- App.Lang("ExportPack.Item2"),
- App.Lang("ExportPack.Item3"),
- //App.GetLanguage("ExportPack.Item4"),
- //App.GetLanguage("ExportPack.Item5")
+ App.Lang("Type.ExportPack.Item1"),
+ App.Lang("Type.ExportPack.Item2"),
+ App.Lang("Type.ExportPack.Item3"),
+ //App.GetLanguage("Type.ExportPack.Item4"),
+ //App.GetLanguage("Type.ExportPack.Item5")
];
}
@@ -47,9 +47,9 @@ public static string[] GetSkinType()
{
return
[
- App.Lang("SkinType.Old"),
- App.Lang("SkinType.New"),
- App.Lang("SkinType.New_Slim")
+ App.Lang("Type.SkinType.Old"),
+ App.Lang("Type.SkinType.New"),
+ App.Lang("Type.SkinType.New_Slim")
];
}
///
@@ -60,9 +60,9 @@ public static string[] GetSkinRotateName()
{
return
[
- App.Lang("SkinRotate.Item1"),
- App.Lang("SkinRotate.Item2"),
- App.Lang("SkinRotate.Item3")
+ App.Lang("Type.SkinRotate.Item1"),
+ App.Lang("Type.SkinRotate.Item2"),
+ App.Lang("Type.SkinRotate.Item3")
];
}
@@ -87,11 +87,11 @@ public static string[] GetWindowTranTypes()
{
return
[
- App.Lang("TranTypes.Item1"),
- App.Lang("TranTypes.Item2"),
- App.Lang("TranTypes.Item3"),
- App.Lang("TranTypes.Item4"),
- App.Lang("TranTypes.Item5")
+ App.Lang("Type.TranTypes.Item1"),
+ App.Lang("Type.TranTypes.Item2"),
+ App.Lang("Type.TranTypes.Item3"),
+ App.Lang("Type.TranTypes.Item4"),
+ App.Lang("Type.TranTypes.Item5")
];
}
///
@@ -135,8 +135,8 @@ public static string[] GetSortOrder()
{
return
[
- App.Lang("SortOrder.Item1"),
- App.Lang("SortOrder.Item2")
+ App.Lang("Type.SortOrder.Item1"),
+ App.Lang("Type.SortOrder.Item2")
];
}
@@ -208,9 +208,9 @@ public static string[] GetVersionType()
{
return
[
- App.Lang("VersionType.Item1"),
- App.Lang("VersionType.Item2"),
- App.Lang("VersionType.Item3")
+ App.Lang("Type.VersionType.Item1"),
+ App.Lang("Type.VersionType.Item2"),
+ App.Lang("Type.VersionType.Item3")
];
}
@@ -218,15 +218,15 @@ public static string[] GetPos()
{
return
[
- App.Lang("Postion.Item1"),
- App.Lang("Postion.Item2"),
- App.Lang("Postion.Item3"),
- App.Lang("Postion.Item4"),
- App.Lang("Postion.Item5"),
- App.Lang("Postion.Item6"),
- App.Lang("Postion.Item7"),
- App.Lang("Postion.Item8"),
- App.Lang("Postion.Item9"),
+ App.Lang("Type.Postion.Item1"),
+ App.Lang("Type.Postion.Item2"),
+ App.Lang("Type.Postion.Item3"),
+ App.Lang("Type.Postion.Item4"),
+ App.Lang("Type.Postion.Item5"),
+ App.Lang("Type.Postion.Item6"),
+ App.Lang("Type.Postion.Item7"),
+ App.Lang("Type.Postion.Item8"),
+ App.Lang("Type.Postion.Item9"),
];
}
}
diff --git a/src/ColorMC.Gui/UIBinding/PathBinding.cs b/src/ColorMC.Gui/UIBinding/PathBinding.cs
index a4925b5fb..a235b889a 100644
--- a/src/ColorMC.Gui/UIBinding/PathBinding.cs
+++ b/src/ColorMC.Gui/UIBinding/PathBinding.cs
@@ -162,7 +162,7 @@ public static void OpFile(string item)
/// 窗口
/// 类型
/// 路径
- public static async Task SelectPath(FileType type)
+ public static async Task SelectPath(PathType type)
{
var top = App.TopLevel;
if (top == null)
@@ -171,7 +171,7 @@ public static void OpFile(string item)
}
switch (type)
{
- case FileType.ServerPack:
+ case PathType.ServerPackPath:
var res = await top.StorageProvider.OpenFolderPickerAsync(new()
{
Title = App.Lang("Gui.Info11")
@@ -181,7 +181,7 @@ public static void OpFile(string item)
return res[0].GetPath();
}
break;
- case FileType.Game:
+ case PathType.GamePath:
res = await top.StorageProvider.OpenFolderPickerAsync(new()
{
Title = App.Lang("Gui.Info24")
@@ -191,7 +191,7 @@ public static void OpFile(string item)
return res[0].GetPath();
}
break;
- case FileType.RunDir:
+ case PathType.RunDir:
res = await top.StorageProvider.OpenFolderPickerAsync(new()
{
Title = App.Lang("SettingWindow.Tab1.Info14")
@@ -585,7 +585,7 @@ await GameBinding.ExportWorld((arg![0] as WorldObj)!,
{
case FileType.Schematic:
var res = await SelectFile(top,
- App.Lang("GameEditWindow.Tab12.Info1"),
+ App.Lang("GameEditWindow.Tab12.Text1"),
["*" + Schematic.Name1, "*" + Schematic.Name2],
App.Lang("GameEditWindow.Tab12.Info2"), true);
if (res?.Any() == true)
diff --git a/src/ColorMC.Gui/Utils/GameCloudUtils.cs b/src/ColorMC.Gui/Utils/GameCloudUtils.cs
index 5db7ff057..b2ea6958d 100644
--- a/src/ColorMC.Gui/Utils/GameCloudUtils.cs
+++ b/src/ColorMC.Gui/Utils/GameCloudUtils.cs
@@ -140,7 +140,7 @@ public static void SetCloudData(GameSettingObj obj, CloudDataObj obj1)
public static async Task StartConnect()
{
Connect = false;
- Info = App.Lang("GameCloud.Error2");
+ Info = App.Lang("Utils.GameCloud.Error2");
var config = GuiConfigUtils.Config.ServerKey;
if (string.IsNullOrWhiteSpace(config))
{
@@ -204,12 +204,12 @@ private static async Task Check()
var value = (int)res1!;
if (value == 300)
{
- Info = App.Lang("GameCloud.Error3");
+ Info = App.Lang("Utils.GameCloud.Error3");
return;
}
else if (value != 100)
{
- Info = App.Lang("GameCloud.Error1");
+ Info = App.Lang("Utils.GameCloud.Error1");
return;
}
}
@@ -494,10 +494,10 @@ public static async Task GetState()
var obj = JObject.Parse(data);
if (!obj.TryGetValue("res", out var res1) || (int)res1 != 100)
{
- Info = App.Lang("GameCloud.Error1");
+ Info = App.Lang("Utils.GameCloud.Error1");
return;
}
- Info = string.Format(App.Lang("GameCloud.Info1"), obj["use"], obj["size"]);
+ Info = string.Format(App.Lang("Utils.GameCloud.Info1"), obj["use"], obj["size"]);
}
}
catch (Exception e)
diff --git a/src/ColorMC.Gui/Utils/GameSocket.cs b/src/ColorMC.Gui/Utils/GameSocket.cs
index cc796a9bc..17f7c91ef 100644
--- a/src/ColorMC.Gui/Utils/GameSocket.cs
+++ b/src/ColorMC.Gui/Utils/GameSocket.cs
@@ -18,7 +18,7 @@ public static class GameSocket
private static bool s_isRun;
public static async void Init()
{
- ColorMCCore.NettyPack = ReadPack;
+ ColorMCCore.NettyPack += ReadPack;
Port = await NettyServer.RunServerAsync();
App.OnClose += App_OnClose;
s_isRun = true;
diff --git a/src/ColorMC.Gui/Utils/UpdateChecker.cs b/src/ColorMC.Gui/Utils/UpdateChecker.cs
index 5493c3151..2a4e663e5 100644
--- a/src/ColorMC.Gui/Utils/UpdateChecker.cs
+++ b/src/ColorMC.Gui/Utils/UpdateChecker.cs
@@ -75,7 +75,7 @@ public static void Init()
catch (Exception e)
{
App.UpdateCheckFail();
- Logs.Error(App.Lang("Gui.Error21"), e);
+ Logs.Error(App.Lang("SettingWindow.Tab3.Error2"), e);
}
return (false, false, null);
@@ -149,7 +149,7 @@ public static async void StartUpdate()
var obj = await ColorMCAPI.GetUpdateSha1();
if (obj == null || obj.TryGetValue("res", out _))
{
- App.ShowError(App.Lang("Gui.Error21"), "Json Error");
+ App.ShowError(App.Lang("SettingWindow.Tab3.Error2"), "Json Error");
return (false, null);
}
@@ -176,7 +176,7 @@ public static async void StartUpdate()
}
catch (Exception e)
{
- App.ShowError(App.Lang("Gui.Error21"), e);
+ App.ShowError(App.Lang("SettingWindow.Tab3.Error2"), e);
}
return (null, null);
diff --git a/src/ColorMC.Test/Program.cs b/src/ColorMC.Test/Program.cs
index 1cf1d7b06..f0e657179 100644
--- a/src/ColorMC.Test/Program.cs
+++ b/src/ColorMC.Test/Program.cs
@@ -35,7 +35,7 @@ static void Main(string[] args)
ColorMCCore.Init(AppContext.BaseDirectory);
ColorMCCore.Init1(null);
- ColorMCCore.OnGameLog += Log;
+ ColorMCCore.GameLog += Log;
TestItem.Item35();