Skip to content

Commit

Permalink
Add missing ToString() occurances
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyremigia committed May 27, 2019
1 parent a560567 commit 8666807
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions Universal THCRAP Launcher/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand All @@ -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();
Expand Down
18 changes: 9 additions & 9 deletions Universal THCRAP Launcher/SettingsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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) =>
Expand Down Expand Up @@ -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);
Expand All @@ -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();
Expand Down

0 comments on commit 8666807

Please sign in to comment.