diff options
| author | Michael <[email protected]> | 2017-02-08 16:21:52 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-02-08 16:21:52 -0500 |
| commit | d8eb2d79e07b63fa350ac01848f9ea51ea1ea705 (patch) | |
| tree | 6abad7143e403b480af6d6a80777caa53c746269 /ShiftOS.WinForms/Applications/MUDControlCentre.cs | |
| parent | 51ad9434bb2118ad4d5dd796d047415c76e99ccc (diff) | |
| download | shiftos_thereturn-d8eb2d79e07b63fa350ac01848f9ea51ea1ea705.tar.gz shiftos_thereturn-d8eb2d79e07b63fa350ac01848f9ea51ea1ea705.tar.bz2 shiftos_thereturn-d8eb2d79e07b63fa350ac01848f9ea51ea1ea705.zip | |
Shop item editor
Diffstat (limited to 'ShiftOS.WinForms/Applications/MUDControlCentre.cs')
| -rw-r--r-- | ShiftOS.WinForms/Applications/MUDControlCentre.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs index 443d6cf..90c0021 100644 --- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs +++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs @@ -683,7 +683,42 @@ Current legions: {legionname}"; private void btnaddshopitem_Click(object sender, EventArgs e) { + AppearanceManager.SetupWindow(new ShopItemCreator(new ShopItem(), new Action<ShopItem>((item) => + { + editingShop.Items.Add(item); + }))); + } + + private void btnremoveitem_Click(object sender, EventArgs e) + { + try + { + int i = lbeditingshopitems.SelectedIndex; + editingShop.Items.RemoveAt(i); + PopulateShopEditor(); + } + catch + { + + } + } + + private void btnedititem_Click(object sender, EventArgs e) + { + try + { + int i = lbeditingshopitems.SelectedIndex; + AppearanceManager.SetupWindow(new ShopItemCreator(editingShop.Items[i], new Action<ShopItem>((item) => + { + editingShop.Items[i] = item; + }))); + PopulateShopEditor(); + } + catch + { + + } } } } |
