Skip to content

Commit 9c36bab

Browse files
committed
up
1 parent a7ff305 commit 9c36bab

59 files changed

Lines changed: 855 additions & 841 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/ColorMC.Core/LaunchPath/InstancesPath.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ private static void StartChange()
142142
s_delay = 0;
143143
s_lock.Exit();
144144
}
145-
ColorMCCore.OnInstanceChange();
145+
if (!DisableWatcher)
146+
{
147+
ColorMCCore.OnInstanceChange();
148+
}
146149
s_change = false;
147150
});
148151
}

src/ColorMC.Gui/App.axaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public App()
2626

2727
AppDomain.CurrentDomain.UnhandledException += (a, e) =>
2828
{
29-
string temp = LanguageUtils.Get("App.Error1");
29+
string temp = LanguageUtils.Get("App.Error.Log16");
3030
Logs.Error(temp, e.ExceptionObject as Exception);
31-
WindowManager.ShowError(LanguageUtils.Get("App.Error9") ,temp, e.ExceptionObject as Exception);
31+
WindowManager.ShowError(LanguageUtils.Get("App.Text103") ,temp, e.ExceptionObject as Exception);
3232
};
3333
ColorMCGui.StartLock();
3434
}

src/ColorMC.Gui/ColorMCGui.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static void Main(string[] args)
102102
{
103103
return;
104104
}
105-
Logs.Error(LanguageUtils.Get("App.Error1"), e.Exception);
105+
Logs.Error(LanguageUtils.Get("App.Error.Log16"), e.Exception);
106106
};
107107

108108
RunType = RunType.Program;

src/ColorMC.Gui/Joystick/JoystickConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static void Init()
6464
}
6565
catch (Exception e)
6666
{
67-
Logs.Error(LanguageUtils.Get("Config.Error3"), e);
67+
Logs.Error(LanguageUtils.Get("App.Error.Log14"), e);
6868
}
6969

7070
if (config == null || config.Keys == null

src/ColorMC.Gui/Manager/ColorManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static void Load()
5757
}
5858
catch (Exception e)
5959
{
60-
Logs.Error(LanguageUtils.Get("Config.Error4"), e);
60+
Logs.Error(LanguageUtils.Get("App.Error.Log15"), e);
6161
}
6262
}
6363

src/ColorMC.Gui/Manager/ImageManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public static async Task LoadSkinHeadAsync(LoginObj login)
351351
}
352352
catch (Exception e)
353353
{
354-
Logs.Error(string.Format(LanguageUtils.Get("ImageManager.Error1"), file), e);
354+
Logs.Error(string.Format(LanguageUtils.Get("App.Text92"), file), e);
355355
}
356356
}
357357
if (file1 != null && File.Exists(file1))
@@ -362,7 +362,7 @@ public static async Task LoadSkinHeadAsync(LoginObj login)
362362
}
363363
catch (Exception e)
364364
{
365-
Logs.Error(string.Format(LanguageUtils.Get("ImageManager.Error2"), file), e);
365+
Logs.Error(string.Format(LanguageUtils.Get("App.Text93"), file), e);
366366
}
367367
}
368368

@@ -620,7 +620,7 @@ public static void OnSkinLoad()
620620
}
621621
catch (Exception e)
622622
{
623-
Logs.Error(LanguageUtils.Get("ImageUtils.Error2"), e);
623+
Logs.Error(LanguageUtils.Get("App.Text91"), e);
624624
}
625625

626626
return GameIcon;
@@ -706,7 +706,7 @@ public static void OnSkinLoad()
706706
}
707707
catch (Exception e)
708708
{
709-
Logs.Error(LanguageUtils.Get("ImageUtils.Error1"), e);
709+
Logs.Error(LanguageUtils.Get("App.Text90"), e);
710710
return null;
711711
}
712712
finally

src/ColorMC.Gui/Manager/WindowManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ private static void LoadState()
240240
}
241241
catch (Exception e)
242242
{
243-
Logs.Error(LanguageUtils.Get("App.Error3"), e);
243+
Logs.Error(LanguageUtils.Get("App.Error.Log18"), e);
244244
}
245245
}
246246
}
@@ -411,7 +411,7 @@ public static bool ShowCustom(bool test = false)
411411
if (!File.Exists(path))
412412
{
413413
File.WriteAllText(path, "custom");
414-
CustomWindow?.Icon.Window?.Model.Show(LanguageUtils.Get("WindowManager.Info1"));
414+
CustomWindow?.Icon.Window?.Model.Show(LanguageUtils.Get("App.Text73"));
415415
}
416416
return true;
417417
}
@@ -422,7 +422,7 @@ public static bool ShowCustom(bool test = false)
422422
}
423423
catch (Exception e)
424424
{
425-
var data = LanguageUtils.Get("WindowManager.Error1");
425+
var data = LanguageUtils.Get("App.Text74");
426426
Logs.Error(data, e);
427427
ShowError(data, e, !test);
428428
}
@@ -656,7 +656,7 @@ public static async void ShowAdd(string name)
656656
{
657657
MainWindow.Window.Show();
658658
MainWindow.Window.WindowActivate();
659-
MainWindow.Window.Model.Show(LanguageUtils.Get("App.Error8"));
659+
MainWindow.Window.Model.Show(LanguageUtils.Get("App.Text102"));
660660
return;
661661
}
662662

src/ColorMC.Gui/MusicPlayer/Media.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private static void Run()
208208
catch (Exception e)
209209
{
210210
PlayState = PlayState.Stop;
211-
Logs.Error(LanguageUtils.Get("MediaPlayer.Error1"), e);
211+
Logs.Error(LanguageUtils.Get("App.Text87"), e);
212212
}
213213
}
214214
}
@@ -344,7 +344,7 @@ public static async Task<MusicPlayRes> PlayMusicAsync(string file, bool value, i
344344
{
345345
return new MusicPlayRes()
346346
{
347-
Message = LanguageUtils.Get("MediaPlayer.Error4")
347+
Message = LanguageUtils.Get("App.Text89")
348348
};
349349
}
350350

@@ -372,7 +372,7 @@ public static async Task<MusicPlayRes> PlayMusicAsync(string file, bool value, i
372372
}
373373
catch (Exception e)
374374
{
375-
string text = LanguageUtils.Get("MediaPlayer.Error2");
375+
string text = LanguageUtils.Get("App.Text88");
376376
Logs.Error(text, e);
377377
res.Message = text;
378378
}

src/ColorMC.Gui/Net/Apis/ColorMCCloudAPI.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static class ColorMCCloudAPI
4141
/// <summary>
4242
/// 云同步信息
4343
/// </summary>
44-
public static string Info { get; private set; } = LanguageUtils.Get("GameCloudUtils.Error2");
44+
public static string Info { get; private set; } = LanguageUtils.Get("App.Text96");
4545
/// <summary>
4646
/// 是否已连接云同步服务器
4747
/// </summary>
@@ -230,12 +230,12 @@ public static async Task CheckAsync()
230230
var value = res1.GetInt32();
231231
if (value == 300)
232232
{
233-
Info = LanguageUtils.Get("GameCloudUtils.Error4");
233+
Info = LanguageUtils.Get("App.Text98");
234234
return;
235235
}
236236
else if (value != 100)
237237
{
238-
Info = LanguageUtils.Get("GameCloudUtils.Error5");
238+
Info = LanguageUtils.Get("App.Text99");
239239
return;
240240
}
241241
}
@@ -488,13 +488,13 @@ public static async Task GetStateAsync()
488488
var value = res1.GetInt32();
489489
if (value == 100)
490490
{
491-
Info = string.Format(LanguageUtils.Get("GameCloudUtils.Info1"),
491+
Info = string.Format(LanguageUtils.Get("App.Text94"),
492492
json.GetProperty("use").GetInt64(),
493493
json.GetProperty("size").GetInt64());
494494
}
495495
else
496496
{
497-
Info = LanguageUtils.Get("GameCloudUtils.Error5");
497+
Info = LanguageUtils.Get("App.Text99");
498498
}
499499
}
500500

0 commit comments

Comments
 (0)