aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/MainMenu/MainMenu.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-06-17 14:45:42 -0400
committerMichael <[email protected]>2017-06-17 14:45:42 -0400
commite3f9a6028b3774f7376617502e7f6016dc50dd0e (patch)
tree195ad433cbb4519b433cf24156b761419f226fe5 /ShiftOS.WinForms/MainMenu/MainMenu.cs
parent0365b33993812361936e81104f793f58794fde8f (diff)
downloadshiftos_thereturn-e3f9a6028b3774f7376617502e7f6016dc50dd0e.tar.gz
shiftos_thereturn-e3f9a6028b3774f7376617502e7f6016dc50dd0e.tar.bz2
shiftos_thereturn-e3f9a6028b3774f7376617502e7f6016dc50dd0e.zip
Localize a LOT of the UI
Diffstat (limited to 'ShiftOS.WinForms/MainMenu/MainMenu.cs')
-rw-r--r--ShiftOS.WinForms/MainMenu/MainMenu.cs47
1 files changed, 3 insertions, 44 deletions
diff --git a/ShiftOS.WinForms/MainMenu/MainMenu.cs b/ShiftOS.WinForms/MainMenu/MainMenu.cs
index 1936fec..7ace42a 100644
--- a/ShiftOS.WinForms/MainMenu/MainMenu.cs
+++ b/ShiftOS.WinForms/MainMenu/MainMenu.cs
@@ -116,29 +116,7 @@ namespace ShiftOS.WinForms.MainMenu
private string GetTickerMessage()
{
- switch (rnd.Next(0, 10))
- {
- case 0:
- return "Did you know that you can skin this very menu? Just goes to show how much you can shift it your way.";
- case 1:
- return "Want to pick up a few skins or mods from the community? Head on over to http://getshiftos.ml/Skins!";
- case 2:
- return "Sandbox mode is a special version of ShiftOS that allows you to use the operating system without having to deal with Codepoints, the Shiftorium or having to play through the storyline. Handy...";
- case 3:
- return "ArtPad not good enough? You can use an external image editor to create ShiftOS skin textures. Just save your files to the Shared Directory and they'll be imported into ShiftOS on the 1:/ drive.";
- case 4:
- return "Terminal too weird for ya? You can use the Format Editor to generate your own Terminal command parser. No coding knowledge needed!";
- case 5:
- return "Contests are a good way to earn heaps of Codepoints. Head on over to http://getshiftos.ml/Contests for info on current community contests.";
- case 6:
- return "There's no bugs in this game... But if you find some, please submit them to http://getshiftos.ml/Bugs.";
- case 7:
- return "SHIFTOS - PROPERTY OF MICHAEL VANOVERBEEK. FOR INTERNAL USE ONLY. Build number = sos_tr_133764 [Just kidding. ShiftOS is open-source. Find the code at http://github.com/shiftos-game/ShiftOS!]";
- case 8:
- return "Hold your Codepoints against the wall... when they take everything away. Hold your Codepoints against the wall...";
- default:
- return "Good God. We don't know what to put here.";
- }
+ return Localization.Parse("{MAINMENU_TIPTEXT_" + rnd.Next(10) + "}");
}
private void button1_Click(object sender, EventArgs e)
@@ -175,7 +153,6 @@ namespace ShiftOS.WinForms.MainMenu
{
var conf = ShiftOS.Objects.UserConfig.Get();
- txtubase.Text = conf.UniteUrl;
txtdsaddress.Text = conf.DigitalSocietyAddress;
txtdsport.Text = conf.DigitalSocietyPort.ToString();
@@ -201,32 +178,14 @@ namespace ShiftOS.WinForms.MainMenu
int p = 0;
- if(int.TryParse(txtdsport.Text, out p) == false)
+ if(int.TryParse(txtdsport.Text, out p) == false || p < 0 || p > 65535)
{
- Infobox.Show("Invalid port number", "The Digital Society Port must be a valid whole number between 0 and 65535.");
+ Infobox.Show("{TITLE_INVALIDPORT}", "{PROMPT_INVALIDPORT}");
return;
}
- else
- {
- if(p < 0 || p > 65535)
- {
- Infobox.Show("Invalid port number", "The Digital Society Port must be a valid whole number between 0 and 65535.");
- return;
- }
- }
conf.DigitalSocietyPort = p;
- string unite = txtubase.Text;
- if (unite.EndsWith("/"))
- {
- int len = unite.Length;
- int index = len - 1;
- int end = 1;
- unite = unite.Remove(index, end);
- }
- conf.UniteUrl = unite;
-
System.IO.File.WriteAllText("servers.json", Newtonsoft.Json.JsonConvert.SerializeObject(conf, Newtonsoft.Json.Formatting.Indented));
HideOptions();