public void setEquipType(EquipType type) { this.curType = type; purchasePanel.Controls.Remove(purchaseNothing); purchasePanel.Controls.Remove(purchaseWeapons); purchasePanel.Controls.Remove(purchaseArmors); switch (type) { case EquipType.NULL: purchasePanel.Controls.Add(purchaseNothing); break; case EquipType.WEAPON: purchasePanel.Controls.Add(purchaseWeapons); break; case EquipType.ARMOR: purchasePanel.Controls.Add(purchaseArmors); break; } control.Refresh(); }
private void updateByCurrent(int id) { for (int i = 0; i < maxChars; i++) { classLabel[i].BackColor = unselectedCol; } classLabel[id].BackColor = selectedCol; if (!selected[id]) { addRemove[id].Text = addString; classLabel[id].Text = undefinedString; pictures[id].Image = TextureManager.getOtherTexture(TextureManager.noChar); } else { addRemove[id].Text = removeString; classLabel[id].Text = currentSelection[id].info.name; pictures[id].Image = currentSelection[id].info.image; } characterChangedEvent(selected[id] ? currentSelection[id] : null); Shop.shop.recompute(); control.Refresh(); }