diff options
| author | Michael <[email protected]> | 2017-02-04 11:14:39 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-02-04 11:14:39 -0500 |
| commit | 28a087d2d4961fd80d827df968de0f6f63da07eb (patch) | |
| tree | a58ef9c8fd9d462c77226d05222bcf81859e9652 /ShiftOS.WinForms/Applications/MUDControlCentre.cs | |
| parent | 9aa2c1f03bc09435ba46c760383113ba4f1cabd0 (diff) | |
| download | shiftos_thereturn-28a087d2d4961fd80d827df968de0f6f63da07eb.tar.gz shiftos_thereturn-28a087d2d4961fd80d827df968de0f6f63da07eb.tar.bz2 shiftos_thereturn-28a087d2d4961fd80d827df968de0f6f63da07eb.zip | |
Add name changer backend
You can use the DefaultTitleAttribute on an IShiftOSWindow to specify a
default title for the window and name changer entry.
Diffstat (limited to 'ShiftOS.WinForms/Applications/MUDControlCentre.cs')
| -rw-r--r-- | ShiftOS.WinForms/Applications/MUDControlCentre.cs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs index 439d5ab..34086a7 100644 --- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs +++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs @@ -66,21 +66,27 @@ namespace ShiftOS.WinForms.Applications BannerColor = ConsoleColor.DarkRed }); } - else if(msg.Name == "legion_create_ok") + else if (msg.Name == "legion_create_ok") { SaveSystem.CurrentSave.CurrentLegions.Clear(); SaveSystem.CurrentSave.CurrentLegions.Add(editingLegion.ShortName); SaveSystem.SaveGame(); - myLegionToolStripMenuItem_Click(this, EventArgs.Empty); + this.Invoke(new Action(() => + { + myLegionToolStripMenuItem_Click(this, EventArgs.Empty); + })); } - else if(msg.Name == "legion_alreadyexists") + else if (msg.Name == "legion_alreadyexists") { - Infobox.Show("Legion already exists", "A legion with the short name you provided already exists. Please choose another."); + this.Invoke(new Action(() => + { + Infobox.Show("Legion already exists", "A legion with the short name you provided already exists. Please choose another."); + })); } - else if(msg.Name == "legion_users_found") + else if (msg.Name == "legion_users_found") { lvusers.Items.Clear(); - foreach(var usr in JsonConvert.DeserializeObject<string[]>(msg.Contents)) + foreach (var usr in JsonConvert.DeserializeObject<string[]>(msg.Contents)) { lvusers.Items.Add(usr); } @@ -89,7 +95,7 @@ namespace ShiftOS.WinForms.Applications { ShowLegionInfo(JsonConvert.DeserializeObject<Legion>(msg.Contents)); } - else if(msg.Name == "legion_all") + else if (msg.Name == "legion_all") { PopulateJoinLegion(JsonConvert.DeserializeObject<List<Legion>>(msg.Contents)); } |
