From d8eb2d79e07b63fa350ac01848f9ea51ea1ea705 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 8 Feb 2017 16:21:52 -0500 Subject: Shop item editor --- ShiftOS.WinForms/Applications/MUDControlCentre.cs | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'ShiftOS.WinForms/Applications/MUDControlCentre.cs') 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((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((item) => + { + editingShop.Items[i] = item; + }))); + PopulateShopEditor(); + } + catch + { + + } } } } -- cgit v1.2.3