当前位置: 首页>>代码示例>>C#>>正文


C# InventoryManager类代码示例

本文整理汇总了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);

    }
开发者ID:sidneylimafilho,项目名称:InfoControl,代码行数:25,代码来源:StockDrop.aspx.cs

示例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;
		}
开发者ID:RavenB,项目名称:gridsearch,代码行数:32,代码来源:InventoryNotecard.cs

示例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;
        }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:31,代码来源:InventoryItem.cs

示例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;
        }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:27,代码来源:InventoryImage.cs

示例5: Start

 // Use this for initialization
 void Start()
 {
     DeactivateTooltip();
     CanvasRectTransform = Canvas.GetComponent<RectTransform>();
     RectTransform = TooltipPanel.GetComponent<RectTransform>();
     InventoryManager = GameObject.FindGameObjectWithTag("InventoryManager").GetComponent<InventoryManager>();
 }
开发者ID:gjrfytn,项目名称:planet-survival,代码行数:8,代码来源:InventoryTooltip.cs

示例6: ComposeManager

 public ComposeManager(InventoryManager inventoryManager)
 {
     m_inventoryManager = inventoryManager;
     AddListener();
     m_versionID = inventoryManager.m_versionId;
     Instance = this;
 }
开发者ID:lbddk,项目名称:ahzs-client,代码行数:7,代码来源:ComposeManager.cs

示例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;
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:8,代码来源:InventoryFolder.cs

示例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;
 }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:11,代码来源:InventoryBase.cs

示例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());
 }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:8,代码来源:InventoryFolder.cs

示例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();

    }
开发者ID:lbddk,项目名称:ahzs-client,代码行数:9,代码来源:DecomposeManager.cs

示例11: Awake

	void Awake() {
		Player = GetComponent<PlayerManager>();
		Inventory = GetComponent<InventoryManager>();

		_startSequence = new List<IGameManager>();
		_startSequence.Add(Player);
		_startSequence.Add(Inventory);

		StartCoroutine(StartupManager());
	}
开发者ID:nicharesuk,项目名称:3rdPersonPlayground,代码行数:10,代码来源:Managers.cs

示例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;
		}		
	}
开发者ID:benlewis,项目名称:unhinged_vr,代码行数:12,代码来源:SelectableObject.cs

示例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);
        }
开发者ID:SuperV1234,项目名称:DRODRoguelike,代码行数:12,代码来源:CharacterEntity.cs

示例14: OnEnable

	void OnEnable()
	{
		GlobalEvents.AddListener<AddItemToMixerEvent>(AddItemToMix);
		if (interactableScript == null)
		{
			interactableScript = GetComponent<ItemMixer>();
		}
		if (null == inventory)
		{
			inventory = GameObject.FindGameObjectWithTag("Inventory").GetComponent<InventoryManager>();
		}
	}
开发者ID:DutchBeastman,项目名称:ProefProeveAdventureClick,代码行数:12,代码来源:ItemMixerBehaviour.cs

示例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;
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:33,代码来源:GiveItemCommand.cs


注:本文中的InventoryManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。