diff --git a/Universal THCRAP Launcher/MainForm.cs b/Universal THCRAP Launcher/MainForm.cs index 8b89411..9185de9 100644 --- a/Universal THCRAP Launcher/MainForm.cs +++ b/Universal THCRAP Launcher/MainForm.cs @@ -571,7 +571,7 @@ private void StartThcrap() { if (patchListBox.SelectedIndex == -1 || gameListBox.SelectedIndex == -1) { - MessageBox.Show(I18N.LangResource.errors.noneSelected, I18N.LangResource.errors.error, MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show(I18N.LangResource.errors.noneSelected.ToString(), I18N.LangResource.errors.error.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error); return; } @@ -862,12 +862,12 @@ private void gitHubPageTS_Click(object sender, EventArgs e) => private void openConfigureTS_Click(object sender, EventArgs e) { - MessageBox.Show(I18N.LangResource.popup.hideLauncher.text, - I18N.LangResource.popup.hideLauncher.caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + MessageBox.Show(I18N.LangResource.popup.hideLauncher.text.ToString(), + I18N.LangResource.popup.hideLauncher.caption.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information); var p = Process.Start("thcrap_configure.exe"); if (p == null) { - MessageBox.Show(I18N.LangResource.errors.oops, I18N.LangResource.errors.error); + MessageBox.Show(I18N.LangResource.errors.oops.ToString(), I18N.LangResource.errors.error.ToString()); return; } @@ -885,9 +885,9 @@ private void createShortcutTS_Click(object sender, EventArgs e) { var shDesktop = (object)"Desktop"; var shell = new WshShell(); - var shortcutAddress = (string)shell.SpecialFolders.Item(ref shDesktop) + I18N.LangResource.shCreate.file + ".lnk"; + var shortcutAddress = (string)shell.SpecialFolders.Item(ref shDesktop) + I18N.LangResource.shCreate.file.ToString() + ".lnk"; var shortcut = (IWshShortcut)shell.CreateShortcut(shortcutAddress); - shortcut.Description = I18N.LangResource.shCreate.desc; + shortcut.Description = I18N.LangResource.shCreate.desc.ToString(); shortcut.TargetPath = Assembly.GetEntryAssembly().Location; shortcut.WorkingDirectory = Directory.GetCurrentDirectory(); shortcut.Save(); diff --git a/Universal THCRAP Launcher/SettingsForm.cs b/Universal THCRAP Launcher/SettingsForm.cs index b78cc4d..48bf359 100644 --- a/Universal THCRAP Launcher/SettingsForm.cs +++ b/Universal THCRAP Launcher/SettingsForm.cs @@ -62,11 +62,11 @@ private void LoadLangs() private void UpdateLang() { - Text = I18N.LangResource.settingsForm.settings; - languageLabel.Text = I18N.LangResource.settingsForm.language + ':'; - closeOnExitCheckBox.Text = I18N.LangResource.settingsForm.closeOnExit; - btn_dwnlAllLangs.Text = I18N.LangResource.settingsForm.downloadAll; - cB_hidePatchExtension.Text = I18N.LangResource.settingsForm.hidePatchExtension; + Text = I18N.LangResource.settingsForm.settings.ToString(); + languageLabel.Text = I18N.LangResource.settingsForm.language.ToString() + ':'; + closeOnExitCheckBox.Text = I18N.LangResource.settingsForm.closeOnExit.ToString(); + btn_dwnlAllLangs.Text = I18N.LangResource.settingsForm.downloadAll.ToString(); + cB_hidePatchExtension.Text = I18N.LangResource.settingsForm.hidePatchExtension.ToString(); } private void UpdateCredits() @@ -80,9 +80,9 @@ private void UpdateCredits() int place = credits.LastIndexOf(','); if (place != -1) { - credits = credits.Remove(place, 1).Insert(place, " " + I18N.LangResource.settingsForm.and); + credits = credits.Remove(place, 1).Insert(place, " " + I18N.LangResource.settingsForm.and.ToString()); } - langCreditsLabel.Text = string.Format((string)I18N.LangResource.settingsForm.langCredits, credits); + langCreditsLabel.Text = string.Format(I18N.LangResource.settingsForm.langCredits.ToString(), credits); } private void closeOnExitCheckBox_CheckedChanged(object sender, EventArgs e) => @@ -112,7 +112,7 @@ static string ReadTextFromUrl(string url) private void Btn_dwnlAllLangs_Click(object sender, EventArgs e) { - btn_dwnlAllLangs.Text = I18N.LangResource.settingsForm.downloading; + btn_dwnlAllLangs.Text = I18N.LangResource.settingsForm.downloading.ToString(); btn_dwnlAllLangs.Enabled = false; string gh = ReadTextFromUrl("https://api.github.com/repos/Tudi20/Universal-THCRAP-Launcher/contents/langs?ref=master"); dynamic obj_gh = JsonConvert.DeserializeObject(gh); @@ -121,7 +121,7 @@ private void Btn_dwnlAllLangs_Click(object sender, EventArgs e) string langtxt = ReadTextFromUrl(item.download_url.ToString()); File.WriteAllText(I18N.I18NDir + item.name, langtxt); } - btn_dwnlAllLangs.Text = I18N.LangResource.settingsForm.downloadAll; + btn_dwnlAllLangs.Text = I18N.LangResource.settingsForm.downloadAll.ToString(); btn_dwnlAllLangs.Enabled = true; LoadLangs();