diff options
| author | Michael <[email protected]> | 2017-01-08 14:50:03 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-01-08 14:50:03 -0500 |
| commit | 347bea3315d40405c6ed5a479c605ae983b530d4 (patch) | |
| tree | c2c9d4df765c30203fe051330952c1c5ad05f1bb /ShiftOS.WinForms/Applications/MUDControlCentre.cs | |
| parent | f46e6e8bbc84092b1f4a8a0ed1cce1ff4229c248 (diff) | |
| download | shiftos_thereturn-347bea3315d40405c6ed5a479c605ae983b530d4.tar.gz shiftos_thereturn-347bea3315d40405c6ed5a479c605ae983b530d4.tar.bz2 shiftos_thereturn-347bea3315d40405c6ed5a479c605ae983b530d4.zip | |
Murdered WPF and edited some legion stuff
Diffstat (limited to 'ShiftOS.WinForms/Applications/MUDControlCentre.cs')
| -rw-r--r-- | ShiftOS.WinForms/Applications/MUDControlCentre.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs index aeb69ae..baf6c31 100644 --- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs +++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs @@ -334,5 +334,49 @@ Current legions: {legionname}"; ServerManager.SendMessage("user_get_legion", JsonConvert.SerializeObject(SaveSystem.CurrentSave)); } + + Legion newLegion = null; + + private void createLegionToolStripMenuItem_Click(object sender, EventArgs e) + { + newLegion = new Legion(); + + SetupLegionEditor(newLegion); + } + + public void SetupLegionEditor(Legion l) + { + if (l.ShortName == null) + l.ShortName = "NAME"; + if (l.Name == null) + l.Name = "Legion name"; + if (l.Description == null) + l.Description = "This is your legion description."; + + txtnewlegionshortname.Text = l.ShortName; + txtnewlegiondescription.Text = l.Description; + txtnewlegiontitle.Text = l.Name; + + lgn_create.BringToFront(); + } + + private void txtnewlegionshortname_TextChanged(object sender, EventArgs e) + { + var g = txtnewlegionshortname.CreateGraphics(); + + SizeF sf = g.MeasureString(txtnewlegionshortname.Text, txtnewlegionshortname.Font); + + txtnewlegionshortname.Size = new Size((int)sf.Width, (int)sf.Height); + } + + private void txtnewlegiontitle_TextChanged(object sender, EventArgs e) + { + var g = txtnewlegiontitle.CreateGraphics(); + + SizeF sf = g.MeasureString(txtnewlegiontitle.Text, txtnewlegiontitle.Font); + + txtnewlegiontitle.Size = new Size((int)sf.Width, (int)sf.Height); + + } } } |
