本文整理汇总了C#中OpenMetaverse.InventoryItem.IsLink方法的典型用法代码示例。如果您正苦于以下问题:C# InventoryItem.IsLink方法的具体用法?C# InventoryItem.IsLink怎么用?C# InventoryItem.IsLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenMetaverse.InventoryItem
的用法示例。
在下文中一共展示了InventoryItem.IsLink方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RealInventoryItem
/// <summary>
/// Resolves inventory links and returns a real inventory item that
/// the link is pointing to
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public InventoryItem RealInventoryItem(InventoryItem item)
{
if (item.IsLink() && Client.Inventory.Store.Contains(item.AssetUUID) && Client.Inventory.Store[item.AssetUUID] is InventoryItem)
{
return (InventoryItem)Client.Inventory.Store[item.AssetUUID];
}
return item;
}
示例2: AddItem
TreeNode AddItem(TreeNode parent, InventoryItem item)
{
TreeNode itemNode = new TreeNode();
itemNode.Name = item.UUID.ToString();
itemNode.Text = ItemLabel(item, false);
itemNode.Tag = item;
int img = -1;
InventoryItem linkedItem = null;
if (item.IsLink() && Inventory.Contains(item.AssetUUID) && Inventory[item.AssetUUID] is InventoryItem)
{
linkedItem = (InventoryItem)Inventory[item.AssetUUID];
}
else
{
linkedItem = item;
}
if (linkedItem is InventoryWearable)
{
InventoryWearable w = linkedItem as InventoryWearable;
img = GetItemImageIndex(w.WearableType.ToString().ToLower());
}
else
{
img = GetItemImageIndex(linkedItem.AssetType.ToString().ToLower());
}
itemNode.ImageIndex = img;
itemNode.SelectedImageIndex = img;
parent.Nodes.Add(itemNode);
lock (UUID2NodeCache)
{
UUID2NodeCache[item.UUID] = itemNode;
}
return itemNode;
}
示例3: AInventoryItem
private InventoryItem AInventoryItem(InventoryItem item)
{
if (item.IsLink() && client.Inventory.Store.Contains(item.AssetUUID) && client.Inventory.Store[item.AssetUUID] is InventoryItem)
{
return (InventoryItem)client.Inventory.Store[item.AssetUUID];
}
return item;
}