Skip to content

Commit 6c805ef

Browse files
committed
Fixes a bunch of weird stuff that were happening
1 parent 395f95c commit 6c805ef

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Universal THCRAP Launcher/MainForm.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public MainForm()
2424
InitializeComponent();
2525
}
2626

27-
private static void ErrorAndExit(string errorMessage)
27+
private static void ErrorAndExit(dynamic errorMessage)
2828
{
29-
MessageBox.Show(text: errorMessage, caption: I18N.LangResource.errors.error, buttons: MessageBoxButtons.OK, icon: MessageBoxIcon.Error);
30-
Trace.WriteLine($"[{DateTime.Now.ToShortTimeString()}] {errorMessage}");
29+
MessageBox.Show(text: errorMessage.ToString(), caption: I18N.LangResource.errors.error.ToString(), buttons: MessageBoxButtons.OK, icon: MessageBoxIcon.Error);
30+
Trace.WriteLine($"[{DateTime.Now.ToShortTimeString()}] {errorMessage.ToString()}");
3131
Application.Exit();
3232
}
3333

@@ -52,7 +52,7 @@ private void Form1_Load(object sender, EventArgs e)
5252
Configuration1 = JsonConvert.DeserializeObject<Configuration>(raw, settings);
5353
dconfig = JsonConvert.DeserializeObject(raw, settings);
5454
}
55-
SetDefaultSettings();
55+
5656

5757
if (!Directory.Exists(I18N.I18NDir)) Directory.CreateDirectory(I18N.I18NDir);
5858

@@ -80,6 +80,8 @@ private void Form1_Load(object sender, EventArgs e)
8080
}
8181
}
8282

83+
84+
8385
//Load language
8486
Configuration.Lang = dconfig?.Lang;
8587
if (Configuration.Lang == null) Configuration.Lang = "en.json";
@@ -93,6 +95,8 @@ private void Form1_Load(object sender, EventArgs e)
9395
//Give error if no games.js file
9496
if (!File.Exists("games.js")) ErrorAndExit(I18N.LangResource.errors.missing.gamesJs);
9597

98+
SetDefaultSettings();
99+
96100
DeleteOutdatedConfig();
97101

98102
#region Load data from files
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2019. 05. 27. 18:41:47,21
1+
Central Europe Standard Time

Universal THCRAP Launcher/Universal THCRAP Launcher.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,6 @@
167167
</ItemGroup>
168168
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
169169
<PropertyGroup>
170-
<PreBuildEvent>for /f "tokens=*" %25i in ('tzutil /g') do echo %25date%25 %25time%25 (%25i) &gt; "$(ProjectDir)\Resources\BuildDate.txt"</PreBuildEvent>
170+
<PreBuildEvent>echo %25date%25 %25time%25 &amp; tzutil /g &gt; "$(ProjectDir)\Resources\BuildDate.txt"</PreBuildEvent>
171171
</PropertyGroup>
172172
</Project>

0 commit comments

Comments
 (0)