本文整理汇总了C#中InventoryManager类的典型用法代码示例。如果您正苦于以下问题:C# InventoryManager类的具体用法?C# InventoryManager怎么用?C# InventoryManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InventoryManager类属于命名空间,在下文中一共展示了InventoryManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
InventoryManager iManager = new InventoryManager(this);
Inventory inventory = new Inventory();
inventory.ProductId = Convert.ToInt32(cboProducts.SelectedValue);
inventory.DepositId = Convert.ToInt32(cboDeposit.SelectedValue);
inventory.CompanyId = Company.CompanyId;
try
{
iManager.InventoryDrop(inventory, ucCurrFieldQuantity.IntValue, (int)DropType.Transfer, null);
}
catch (InvalidOperationException ex)
{
ShowError(Resources.Exception.InvalidStockQuantity);
return;
}
ClientScript.RegisterClientScriptBlock(this.GetType(), "", "alert('Baixa no Estoque efetuada com sucesso!');", true);
}
示例2: InventoryNotecard
/// <summary>
/// </summary>
/// <param name="manager"></param>
/// <param name="ii"></param>
internal InventoryNotecard(InventoryManager manager, InventoryItem ii)
: base( manager, ii._Name, ii._Description, ii._FolderID, ii._InvType, ii._Type, ii._CreatorID)
{
if ((ii.InvType != 7) || (ii.Type != (sbyte)Asset.AssetType.Notecard))
{
throw new Exception("The InventoryItem cannot be converted to a Notecard, wrong InvType/Type.");
}
this.iManager = manager;
this._ItemID = ii._ItemID;
this._Asset = ii._Asset;
this._AssetID = ii._AssetID;
this._BaseMask = ii._BaseMask;
this._CRC = ii._CRC;
this._CreationDate = ii._CreationDate;
this._EveryoneMask = ii._EveryoneMask;
this._Flags = ii._Flags;
this._GroupID = ii._GroupID;
this._GroupMask = ii._GroupMask;
this._GroupOwned = ii._GroupOwned;
this._InvType = ii._InvType;
this._NextOwnerMask = ii._NextOwnerMask;
this._OwnerID = ii._OwnerID;
this._OwnerMask = ii._OwnerMask;
this._SalePrice = ii._SalePrice;
this._SaleType = ii._SaleType;
this._Type = ii._Type;
}
示例3: InventoryItem
internal InventoryItem(InventoryManager manager, InventoryDescendentsPacket.ItemDataBlock itemData)
: base(manager)
{
_Name = System.Text.Encoding.UTF8.GetString(itemData.Name).Trim().Replace("\0", "");
_Description = System.Text.Encoding.UTF8.GetString(itemData.Description).Trim().Replace("\0", "");
_CreationDate = itemData.CreationDate;
_InvType = itemData.InvType;
_Type = itemData.Type;
_AssetID = itemData.AssetID;
_FolderID = itemData.FolderID;
_GroupOwned = itemData.GroupOwned;
_GroupID = itemData.GroupID;
_GroupMask = itemData.GroupMask;
_CreatorID = itemData.CreatorID;
_OwnerID = itemData.OwnerID;
_OwnerMask = itemData.OwnerMask;
_Flags = itemData.Flags;
_BaseMask = itemData.BaseMask;
_EveryoneMask = itemData.EveryoneMask;
_NextOwnerMask = itemData.NextOwnerMask;
_SaleType = itemData.SaleType;
_SalePrice = itemData.SalePrice;
_CRC = itemData.CRC;
}
示例4: InventoryImage
internal InventoryImage( InventoryManager manager, InventoryItem ii )
: base(manager, ii._Name, ii._Description, ii._FolderID, ii._InvType, ii._Type, ii._CreatorID)
{
if( (ii.InvType != 0) || (ii.Type != Asset.ASSET_TYPE_IMAGE) )
{
throw new Exception("The InventoryItem cannot be converted to a Image/Texture, wrong InvType/Type.");
}
this.iManager = manager;
this._Asset = ii._Asset;
this._AssetID = ii._AssetID;
this._BaseMask = ii._BaseMask;
this._CRC = ii._CRC;
this._CreationDate = ii._CreationDate;
this._EveryoneMask = ii._EveryoneMask;
this._Flags = ii._Flags;
this._GroupID = ii._GroupID;
this._GroupMask = ii._GroupMask;
this._GroupOwned = ii._GroupOwned;
this._InvType = ii._InvType;
this._NextOwnerMask = ii._NextOwnerMask;
this._OwnerID = ii._OwnerID;
this._OwnerMask = ii._OwnerMask;
this._SalePrice = ii._SalePrice;
this._SaleType = ii._SaleType;
this._Type = ii._Type;
}
示例5: Start
// Use this for initialization
void Start()
{
DeactivateTooltip();
CanvasRectTransform = Canvas.GetComponent<RectTransform>();
RectTransform = TooltipPanel.GetComponent<RectTransform>();
InventoryManager = GameObject.FindGameObjectWithTag("InventoryManager").GetComponent<InventoryManager>();
}
示例6: ComposeManager
public ComposeManager(InventoryManager inventoryManager)
{
m_inventoryManager = inventoryManager;
AddListener();
m_versionID = inventoryManager.m_versionId;
Instance = this;
}
示例7: InventoryFolder
internal InventoryFolder(InventoryManager manager, String name, LLUUID folderID, LLUUID parentID, sbyte Type)
: base(manager)
{
this._Name = name;
this._FolderID = folderID;
this._ParentID = parentID;
this._Type = Type;
}
示例8: InventoryBase
/// <summary>
/// </summary>
/// <param name="manager"></param>
internal InventoryBase(InventoryManager manager)
{
if( manager == null )
{
throw new Exception( "Inventory Manager cannot be null" );
}
iManager = manager;
}
示例9: InventoryFolder
internal InventoryFolder(InventoryManager manager, Dictionary<string, string> htData)
: base(manager)
{
this._Name = htData["name"];
this._FolderID = new LLUUID(htData["folder_id"]);
this._ParentID = new LLUUID(htData["parent_id"]);
this._Type = sbyte.Parse(htData["type_default"].ToString());
}
示例10: DecomposeManager
public DecomposeManager(Dictionary<int, ItemParent> _equipmentDic, InventoryManager _inventory)
{
Instance = this;
m_inventory = _inventory;
m_equipmentDic = _equipmentDic;
m_versionID = m_inventory.m_versionId;
AddListener();
}
示例11: Awake
void Awake() {
Player = GetComponent<PlayerManager>();
Inventory = GetComponent<InventoryManager>();
_startSequence = new List<IGameManager>();
_startSequence.Add(Player);
_startSequence.Add(Inventory);
StartCoroutine(StartupManager());
}
示例12: Start
public virtual void Start() {
inventory = FindObjectOfType<InventoryManager>();
SetSelectable();
baseColors = new Color[parts.Length];
baseMaterials = new Material[parts.Length];
for (int i = 0; i < parts.Length; i++) {
baseColors[i] = parts[i].renderer.material.color;
baseMaterials[i] = parts[i].renderer.material;
}
}
示例13: CharacterEntity
public CharacterEntity(Game mGame, int mX, int mY, int mZ, string mName, bool mHostile)
: base(mGame, mX, mY, mZ, mName)
{
_statusManager = new StatusManager();
_inventoryManager = new InventoryManager();
behaviors = new List<Behavior>();
visibleThisTurn = new List<Entity>();
perceptionRange = 20;
hostile = mHostile;
Game.LogAdd("#" + UID + ": new 'CharacterEntity' named '" + Name + "' - (" + X + ";" + Y + ")", true);
}
示例14: OnEnable
void OnEnable()
{
GlobalEvents.AddListener<AddItemToMixerEvent>(AddItemToMix);
if (interactableScript == null)
{
interactableScript = GetComponent<ItemMixer>();
}
if (null == inventory)
{
inventory = GameObject.FindGameObjectWithTag("Inventory").GetComponent<InventoryManager>();
}
}
示例15: Execute
public override string Execute(string[] args, UUID fromAgentID)
{
if (args.Length < 2)
{
return "Usage: give <agent uuid> <item1> [item2] [item3] [...]";
}
UUID dest;
if (!UUID.TryParse(args[0], out dest))
{
return "First argument expected agent UUID.";
}
Manager = Client.Inventory;
Inventory = Client.InventoryStore;
string ret = "";
string nl = "\n";
for (int i = 1; i < args.Length; ++i)
{
string itemPath = args[i];
List<InventoryBase> results = Inventory.InventoryFromPath(itemPath, Client.CurrentDirectory, true);
if (results.Count == 0)
{
ret += "No inventory item at " + itemPath + " found." + nl;
}
else
{
results[0].Give(dest, true);
ret += "Gave " + results[0].Name + nl;
}
}
return ret;
}