public void RemoveItem(Loot loot, LootElement element)
 {
     rule.RemoveItem(loot);
     lootElements.Remove(element);
     lootElements.Height.Set(lootElements.Height.Pixels - element.Height.Pixels - 4, 0);
     Height.Set(Height.Pixels - element.Height.Pixels - 4, 0);
 }
        public void AddItem(Loot loot)
        {
            var element = new LootElement(loot, rule.UsesWeight);

            lootElements.Add(element);
            lootElements.Height.Set(lootElements.Height.Pixels + element.Height.Pixels + 4, 0);
            Height.Set(Height.Pixels + element.Height.Pixels + 4, 0);
        }
        //These handle adding/removing the elements and items from the appropriate lists, as well as re-sizing the element.
        public void AddItem(Item item)
        {
            rule.AddItem(item);

            var element = new LootElement(new Loot(item, 1));

            lootElements.Add(element);
            lootElements.Height.Set(lootElements.Height.Pixels + element.Height.Pixels, 0);
            Height.Set(Height.Pixels + element.Height.Pixels, 0);
        }