public void UpdateSelectedItem() { if (Character != null) { _selectedItemInstance = Character[CharacterSlot]; if (_selectedItemInstance == null) { _selectedItem = null; } else { _selectedItem = _selectedItemInstance.Item; } } this.Text = string.Empty; UpdateDim(); if (ItemHidden) { this.ItemIcon = null; } else { this.ItemIcon = _selectedItem != null?ItemIcons.GetItemIcon(_selectedItem, this.Width < 64) : null; } }
public void UpdateSelectedItem() { if (Character != null) { _selectedItem = Character[CharacterSlot]; } this.Text = string.Empty; this.ItemIcon = _selectedItem != null?ItemIcons.GetItemIcon(_selectedItem) : null; }
private string EnsureIconPath(string iconPath) { if (!ItemIcons.SmallIcons.Images.ContainsKey(iconPath)) { try { /*imageListItems.Images.Add(iconPath, */ ItemIcons.GetItemIcon(iconPath, true) /*)*/; } catch { } } return(iconPath); }