Skip to content

Commit e0a3695

Browse files
committed
up 收藏安装整合包
1 parent fd40e1d commit e0a3695

174 files changed

Lines changed: 1625 additions & 1388 deletions

File tree

Some content is hidden

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

src/ColorMC.Gui/App.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<StyleInclude Source="/Style/WindowNotificationManager.axaml" />
4848
<StyleInclude Source="/Style/ColorPicker.axaml" />
4949
<StyleInclude Source="/Style/AutoCompleteBox.axaml" />
50+
<StyleInclude Source="/Style/TreeView.axaml" />
5051
</Application.Styles>
5152
<Application.Resources>
5253
<ResourceDictionary>

src/ColorMC.Gui/App.axaml.cs

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

2626
AppDomain.CurrentDomain.UnhandledException += (a, e) =>
2727
{
28-
string temp = LanguageUtils.Get("App.Error.Log16");
28+
string temp = LangUtils.Get("App.Error.Log16");
2929
Logs.Error(temp, e.ExceptionObject as Exception);
30-
WindowManager.ShowError(LanguageUtils.Get("App.Text103"), temp, e.ExceptionObject as Exception);
30+
WindowManager.ShowError(LangUtils.Get("App.Text103"), temp, e.ExceptionObject as Exception);
3131
};
3232
ColorMCGui.StartLock();
3333
}

src/ColorMC.Gui/ColorMCGui.cs

Lines changed: 3 additions & 3 deletions
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.Error.Log16"), e.Exception);
105+
Logs.Error(LangUtils.Get("App.Error.Log16"), e.Exception);
106106
};
107107

108108
RunType = RunType.Program;
@@ -159,13 +159,13 @@ public static void Main(string[] args)
159159

160160
s_arg.Local = BaseDir;
161161

162-
LanguageUtils.Load(LanguageType.zh_cn);
162+
LangUtils.Load(LanguageType.zh_cn);
163163

164164
ColorMCCore.Init(s_arg);
165165

166166
BaseBinding.ReadBuildConfig();
167167

168-
LanguageUtils.Load(GuiConfigUtils.Config.Language);
168+
LangUtils.Load(GuiConfigUtils.Config.Language);
169169

170170
IsInit = true;
171171

src/ColorMC.Gui/Hook/Win32.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ public static void CreateLaunch(GameSettingObj obj)
469469
}
470470
catch (Exception e)
471471
{
472-
Logs.Error(LanguageUtils.Get("App.Error.Log5"), e);
472+
Logs.Error(LangUtils.Get("App.Error.Log5"), e);
473473
}
474474
}
475475

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("App.Error.Log14"), e);
67+
Logs.Error(LangUtils.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("App.Error.Log15"), e);
60+
Logs.Error(LangUtils.Get("App.Error.Log15"), e);
6161
}
6262
}
6363

src/ColorMC.Gui/Manager/CoreManager.cs

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -50,157 +50,157 @@ private static void ColorMCCore_Error(CoreErrorEventArgs arg)
5050
string title = "";
5151
if (arg is ConfigLoadErrorEventArgs)
5252
{
53-
log = LanguageUtils.Get("Text.ConfigError");
54-
title = LanguageUtils.Get("Core.Error.Log35");
53+
log = LangUtils.Get("Text.ConfigError");
54+
title = LangUtils.Get("Core.Error.Log35");
5555
}
5656
else if (arg is ConfigSaveErrorEventArgs)
5757
{
58-
log = LanguageUtils.Get("Core.Error.Log1");
59-
title = LanguageUtils.Get("Core.Error.Log35");
58+
log = LangUtils.Get("Core.Error.Log1");
59+
title = LangUtils.Get("Core.Error.Log35");
6060
}
6161
else if (arg is DownloadSizeErrorEvnetArgs arg3)
6262
{
63-
log = string.Format(LanguageUtils.Get("Core.Error.Log3"), arg3.File.Name, arg3.File.Url, arg3.File.AllSize, arg3.Size);
63+
log = string.Format(LangUtils.Get("Core.Error.Log3"), arg3.File.Name, arg3.File.Url, arg3.File.AllSize, arg3.Size);
6464
}
6565
else if (arg is DownloadHashErrorEventArgs arg4)
6666
{
67-
log = string.Format(LanguageUtils.Get("Core.Error.Log6"), arg4.File.Name, arg4.File.Url, arg4.Hash, arg4.Now);
67+
log = string.Format(LangUtils.Get("Core.Error.Log6"), arg4.File.Name, arg4.File.Url, arg4.Hash, arg4.Now);
6868
}
6969
else if (arg is DownloadExceptionErrorEventArgs arg5)
7070
{
71-
log = string.Format(LanguageUtils.Get("Core.Error.Log34"), arg5.File.Name, arg5.File.Url);
71+
log = string.Format(LangUtils.Get("Core.Error.Log34"), arg5.File.Name, arg5.File.Url);
7272
}
7373
else if (arg is GameLangLoadErrorEventArgs arg6)
7474
{
75-
log = string.Format(LanguageUtils.Get("Core.Error.Log40"), arg6.Key);
75+
log = string.Format(LangUtils.Get("Core.Error.Log40"), arg6.Key);
7676
}
7777
else if (arg is GameServerPackErrorEventArgs arg7)
7878
{
79-
log = string.Format(LanguageUtils.Get("Core.Error.Log31"), arg7.Game.Name);
79+
log = string.Format(LangUtils.Get("Core.Error.Log31"), arg7.Game.Name);
8080
}
8181
else if (arg is GameLogFileErrorEventArgs arg8)
8282
{
83-
log = string.Format(LanguageUtils.Get("Core.Error.Log27"), arg8.Game.Name, arg8.File);
83+
log = string.Format(LangUtils.Get("Core.Error.Log27"), arg8.Game.Name, arg8.File);
8484
}
8585
else if (arg is GameModErrorEventArgs arg9)
8686
{
87-
log = string.Format(LanguageUtils.Get("Core.Error.Log19"), arg9.Game.Name, arg9.File);
87+
log = string.Format(LangUtils.Get("Core.Error.Log19"), arg9.Game.Name, arg9.File);
8888
}
8989
else if (arg is GameModAddErrorEventArgs arg10)
9090
{
91-
log = string.Format(LanguageUtils.Get("Core.Error.Log20"), arg10.Game.Name, arg10.File);
91+
log = string.Format(LangUtils.Get("Core.Error.Log20"), arg10.Game.Name, arg10.File);
9292
}
9393
else if (arg is GameModReadErrorEventArgs arg11)
9494
{
95-
log = string.Format(LanguageUtils.Get("Core.Error.Log30"), arg11.Game.Name, arg11.File);
95+
log = string.Format(LangUtils.Get("Core.Error.Log30"), arg11.Game.Name, arg11.File);
9696
}
9797
else if (arg is GameResourcepackReadErrorEventArgs arg12)
9898
{
99-
log = string.Format(LanguageUtils.Get("Game.Error.Log12"), arg12.Game.Name, arg12.File);
99+
log = string.Format(LangUtils.Get("Game.Error.Log12"), arg12.Game.Name, arg12.File);
100100
}
101101
else if (arg is GameSaveAddErrorEventArgs arg13)
102102
{
103-
log = string.Format(LanguageUtils.Get("Game.Error.Log13"), arg13.Game.Name, arg13.File);
103+
log = string.Format(LangUtils.Get("Game.Error.Log13"), arg13.Game.Name, arg13.File);
104104
}
105105
else if (arg is GameSaveRestoreErrorEventArgs arg14)
106106
{
107-
log = string.Format(LanguageUtils.Get("Core.Error.Log25"), arg14.Game.Name, arg14.File);
107+
log = string.Format(LangUtils.Get("Core.Error.Log25"), arg14.Game.Name, arg14.File);
108108
}
109109
else if (arg is GameSaveReadErrorEventArgs arg15)
110110
{
111-
log = string.Format(LanguageUtils.Get("Core.Error.Log21"), arg15.Game.Name, arg15.File);
111+
log = string.Format(LangUtils.Get("Core.Error.Log21"), arg15.Game.Name, arg15.File);
112112
}
113113
else if (arg is GameSchematicAddErrorEventArgs arg16)
114114
{
115-
log = string.Format(LanguageUtils.Get("Game.Error.Log14"), arg16.Game.Name, arg16.File);
115+
log = string.Format(LangUtils.Get("Game.Error.Log14"), arg16.Game.Name, arg16.File);
116116
}
117117
else if (arg is GameSchematicReadErrorEventArgs arg17)
118118
{
119-
log = string.Format(LanguageUtils.Get("Game.Error.Log15"), arg17.Game.Name, arg17.File);
119+
log = string.Format(LangUtils.Get("Game.Error.Log15"), arg17.Game.Name, arg17.File);
120120
}
121121
else if (arg is GameServerReadErrorEventArgs arg18)
122122
{
123-
log = string.Format(LanguageUtils.Get("Core.Error.Log22"), arg18.Game.Name);
123+
log = string.Format(LangUtils.Get("Core.Error.Log22"), arg18.Game.Name);
124124
}
125125
else if (arg is GameServerAddErrorEventArgs arg19)
126126
{
127-
log = string.Format(LanguageUtils.Get("Game.Error.Log16"), arg19.Game.Name, arg19.Name, arg19.IP);
127+
log = string.Format(LangUtils.Get("Game.Error.Log16"), arg19.Game.Name, arg19.Name, arg19.IP);
128128
}
129129
else if (arg is GameServerDeleteErrorEventArgs arg20)
130130
{
131-
log = string.Format(LanguageUtils.Get("Game.Error.Log17"), arg20.Server.Game.Name, arg20.Server.Name, arg20.Server.IP);
131+
log = string.Format(LangUtils.Get("Game.Error.Log17"), arg20.Server.Game.Name, arg20.Server.Name, arg20.Server.IP);
132132
}
133133
else if (arg is GameShaderpackAddErrorEventArgs arg21)
134134
{
135-
log = string.Format(LanguageUtils.Get("Game.Error.Log18"), arg21.Game.Name, arg21.File);
135+
log = string.Format(LangUtils.Get("Game.Error.Log18"), arg21.Game.Name, arg21.File);
136136
}
137137
else if (arg is GameDataPackReadErrorEventArgs arg22)
138138
{
139-
log = string.Format(LanguageUtils.Get("Core.Error.Log32"), arg22.Save.Game.Name, arg22.Save.LevelName, arg22.File);
139+
log = string.Format(LangUtils.Get("Core.Error.Log32"), arg22.Save.Game.Name, arg22.Save.LevelName, arg22.File);
140140
}
141141
else if (arg is GameDataPackDeleteErrorEventArgs arg23)
142142
{
143-
log = string.Format(LanguageUtils.Get("Core.Error.Log33"), arg23.Save.Game.Name, arg23.Save.LevelName);
143+
log = string.Format(LangUtils.Get("Core.Error.Log33"), arg23.Save.Game.Name, arg23.Save.LevelName);
144144
}
145145
else if (arg is InstallModPackErrorEventArgs arg24)
146146
{
147-
log = string.Format(LanguageUtils.Get("Core.Error.Log8"), arg24.File);
147+
log = string.Format(LangUtils.Get("Core.Error.Log8"), arg24.File);
148148
}
149149
else if (arg is CheckJavaErrorEventArgs arg25)
150150
{
151-
log = string.Format(LanguageUtils.Get("Core.Error.Log11"), arg25.Java);
151+
log = string.Format(LangUtils.Get("Core.Error.Log11"), arg25.Java);
152152
}
153153
else if (arg is ScanJavaErrorEventArgs)
154154
{
155-
log = string.Format(LanguageUtils.Get("Core.Error.Log41"));
155+
log = string.Format(LangUtils.Get("Core.Error.Log41"));
156156
}
157157
else if (arg is InstanceLoadErrorEventArgs arg26)
158158
{
159-
log = string.Format(LanguageUtils.Get("Core.Error.Log29"), arg26.Path);
159+
log = string.Format(LangUtils.Get("Core.Error.Log29"), arg26.Path);
160160
}
161161
else if (arg is InstanceCreateErrorEventArgs arg27)
162162
{
163-
log = string.Format(LanguageUtils.Get("Core.Error.Log28"), arg27.Name);
163+
log = string.Format(LangUtils.Get("Core.Error.Log28"), arg27.Name);
164164
}
165165
else if (arg is InstanceReadModErrorEventArgs arg28)
166166
{
167-
log = string.Format(LanguageUtils.Get("Core.Error.Log23"), arg28.Game.Name);
167+
log = string.Format(LangUtils.Get("Core.Error.Log23"), arg28.Game.Name);
168168
}
169169
else if (arg is InstanceReadModErrorEventArgs arg29)
170170
{
171-
log = string.Format(LanguageUtils.Get("Core.Error.Log23"), arg29.Game.Name);
171+
log = string.Format(LangUtils.Get("Core.Error.Log23"), arg29.Game.Name);
172172
}
173173
else if (arg is InstanceReadCountErrorEventArgs arg30)
174174
{
175-
log = string.Format(LanguageUtils.Get("Core.Error.Log24"), arg30.Game.Name);
175+
log = string.Format(LangUtils.Get("Core.Error.Log24"), arg30.Game.Name);
176176
}
177177
else if (arg is JavaInstallErrorEventArgs arg31)
178178
{
179-
log = string.Format(LanguageUtils.Get("Core.Error.Log10"), arg31.Name, arg31.Url);
179+
log = string.Format(LangUtils.Get("Core.Error.Log10"), arg31.Name, arg31.Url);
180180
}
181181
else if (arg is ApiRequestErrorEventArgs arg32)
182182
{
183-
log = string.Format(LanguageUtils.Get("Core.Error.Log7"), arg32.Url);
183+
log = string.Format(LangUtils.Get("Core.Error.Log7"), arg32.Url);
184184
}
185185
else if (arg is MojangGetVersionErrorEventArgs)
186186
{
187-
log = LanguageUtils.Get("Core.Error.Log12");
187+
log = LangUtils.Get("Core.Error.Log12");
188188
}
189189
else if (arg is PlayerSkinGetErrorEventArgs arg33)
190190
{
191-
log = string.Format(LanguageUtils.Get("Core.Error.Log4"), arg33.Login.AuthType.GetName(), arg33.Login.UUID);
191+
log = string.Format(LangUtils.Get("Core.Error.Log4"), arg33.Login.AuthType.GetName(), arg33.Login.UUID);
192192
}
193193
else if (arg is PlayerCapeGetErrorEventArgs arg34)
194194
{
195-
log = string.Format(LanguageUtils.Get("Core.Error.Log42"), arg34.Login.AuthType.GetName(), arg34.Login.UUID);
195+
log = string.Format(LangUtils.Get("Core.Error.Log42"), arg34.Login.AuthType.GetName(), arg34.Login.UUID);
196196
}
197197
else if (arg is PlayerTexturesGetErrorEventArgs arg35)
198198
{
199-
log = string.Format(LanguageUtils.Get("Core.Error.Log5"), arg35.Login.AuthType.GetName(), arg35.Login.UUID);
199+
log = string.Format(LangUtils.Get("Core.Error.Log5"), arg35.Login.AuthType.GetName(), arg35.Login.UUID);
200200
}
201201
else if (arg is LocalMavenErrorEventArgs)
202202
{
203-
log = LanguageUtils.Get("Core.Error.Log2");
203+
log = LangUtils.Get("Core.Error.Log2");
204204
}
205205

206206
if (arg is ExceptionErrorEventArgs error)

0 commit comments

Comments
 (0)