private void Data_PropertyChanged(object sender, PropertyChangedEventArgs e) { // we call this to regenerate the DDOItemData potentially being used SLItem.GetItem(); CalculateCraftingCosts(); }
public void SetItem(SlaveLordCrafting.SlaveLordItemContainer item) { SLItem = null; lvSlots.Items.Clear(); lvCrafting.Items.Clear(); if (item == null) { return; } if (item.BaseItem.Name.StartsWith("Legendary")) { cbML.SelectedIndex = 1; } else { cbML.SelectedIndex = 0; } SLItem = item; SlaveLordCrafting.ESlaveLordItemSlots[] slots = (SlaveLordCrafting.ESlaveLordItemSlots[])Enum.GetValues(typeof(SlaveLordCrafting.ESlaveLordItemSlots)); foreach (var slot in slots) { SlaveLordItemPropertyData data = new SlaveLordItemPropertyData(SLItem, slot); data.PropertyChanged += Data_PropertyChanged; lvSlots.Items.Add(data); } // we call this to regenerate the DDOItemData potentially being used SLItem.GetItem(); CalculateCraftingCosts(); }