aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/MUDControlCentre.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-08 16:21:52 -0500
committerMichael <[email protected]>2017-02-08 16:21:52 -0500
commitd8eb2d79e07b63fa350ac01848f9ea51ea1ea705 (patch)
tree6abad7143e403b480af6d6a80777caa53c746269 /ShiftOS.WinForms/Applications/MUDControlCentre.cs
parent51ad9434bb2118ad4d5dd796d047415c76e99ccc (diff)
downloadshiftos_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.cs35
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
+ {
+
+ }
}
}
}