示例#1
0
 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;
     }
 }
示例#2
0
 public void UpdateSelectedItem()
 {
     if (Character != null)
     {
         _selectedItem = Character[CharacterSlot];
     }
     this.Text     = string.Empty;
     this.ItemIcon = _selectedItem != null?ItemIcons.GetItemIcon(_selectedItem) : null;
 }
示例#3
0
 private string EnsureIconPath(string iconPath)
 {
     if (!ItemIcons.SmallIcons.Images.ContainsKey(iconPath))
     {
         try
         {
             /*imageListItems.Images.Add(iconPath, */ ItemIcons.GetItemIcon(iconPath, true) /*)*/;
         }
         catch { }
     }
     return(iconPath);
 }