• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# InventoryManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中InventoryManager的典型用法代码示例。如果您正苦于以下问题:C# InventoryManager类的具体用法?C# InventoryManager怎么用?C# InventoryManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



InventoryManager类属于命名空间,在下文中一共展示了InventoryManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: grdReceive_RowDeleting

    protected void grdReceive_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        InventoryManager invManager = new InventoryManager(this);
        InventoryMoviment movement = new InventoryMoviment();

        int movementId = Convert.ToInt16(grdReceive.DataKeys[e.RowIndex]["InventoryMovementId"]);
        int destinationCompanyId = Convert.ToInt16(grdReceive.DataKeys[e.RowIndex]["CompanyDestinationId"]);

        invManager.RefuseMovement(movementId);

        grdReceive.DataBind();
        e.Cancel = true;
    }
开发者ID:sidneylimafilho,项目名称:InfoControl,代码行数:13,代码来源:StockTransferRECEIVE.aspx.cs


示例16: GetCar

        public void GetCar()
        {
            Car existingCar = new Car() { CarId = 1 };

            Mock<IDataRepositoryFactory> mockDataRepositoryFactory = new Mock<IDataRepositoryFactory>();
            mockDataRepositoryFactory.Setup(mock => mock.GetDataRepository<ICarRepository>().Get(1)).Returns(existingCar);

            InventoryManager manager = new InventoryManager(mockDataRepositoryFactory.Object);

            Car retrievedCar = manager.GetCar(1);

            Assert.IsTrue(retrievedCar == existingCar);
        }
开发者ID:afrancocode,项目名称:CarRental,代码行数:13,代码来源:InventoryManagerTests.cs


示例17: UpdateCar_UpdateExisting

        public void UpdateCar_UpdateExisting()
        {
            Car existingCar = new Car() { CarId = 1 };
            Car updatedCar = new Car() { CarId = 1 };

            Mock<IDataRepositoryFactory> mockDataRepositoryFactory = new Mock<IDataRepositoryFactory>();
            mockDataRepositoryFactory.Setup(mock => mock.GetDataRepository<ICarRepository>().Update(existingCar)).Returns(updatedCar);

            InventoryManager manager = new InventoryManager(mockDataRepositoryFactory.Object);

            Car updateCarResults = manager.UpdateCar(existingCar);

            Assert.IsTrue(updateCarResults == updatedCar);
        }
开发者ID:jasonweibel,项目名称:TrainingMaterial,代码行数:14,代码来源:InventoryManagerTests.cs


示例18: UpdateCar_AddNew

        public void UpdateCar_AddNew()
        {
            Car newCar = new Car();
            Car addedCar = new Car() { CarId = 1 };

            Mock<IDataRepositoryFactory> mockDataRepositoryFactory = new Mock<IDataRepositoryFactory>();
            mockDataRepositoryFactory.Setup(mock => mock.GetDataRepository<ICarRepository>().Add(newCar)).Returns(addedCar);

            InventoryManager manager = new InventoryManager(mockDataRepositoryFactory.Object);

            Car updateCarResults = manager.UpdateCar(newCar);

            Assert.IsTrue(updateCarResults == addedCar);
        }
开发者ID:jasonweibel,项目名称:TrainingMaterial,代码行数:14,代码来源:InventoryManagerTests.cs


示例19: UpdateCar_update_existing

        public void UpdateCar_update_existing()
        {
            Car existingCar = new Car() { CarId = 1 };
            Car updatedCar = new Car() { CarId = 1 };

            var mockRepositoryFactory = new Mock<IDataRepositoryFactory>();
            mockRepositoryFactory.Setup(obj => obj.GetDataRepository<ICarRepository>().Update(existingCar)).Returns(updatedCar);

            var manager = new InventoryManager(mockRepositoryFactory.Object);

            var results = manager.UpdateCar(existingCar);

            Assert.IsTrue(results == updatedCar);
        }
开发者ID:fbarbirato,项目名称:CarRental,代码行数:14,代码来源:InventoryManagerTest.cs


示例20: UpdateCar_add_new

        public void UpdateCar_add_new()
        {
            var newCar = new Car();
            var addedCar = new Car() { CarId = 1 };

            var mockRepositoryFactory = new Mock<IDataRepositoryFactory>();
            mockRepositoryFactory.Setup(obj => obj.GetDataRepository<ICarRepository>().Add(newCar)).Returns(addedCar);

            var manager = new InventoryManager(mockRepositoryFactory.Object);

            var results = manager.UpdateCar(newCar);

            Assert.IsTrue(results == addedCar);
        }
开发者ID:fbarbirato,项目名称:CarRental,代码行数:14,代码来源:InventoryManagerTest.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# InventorySlot类代码示例发布时间:2022-05-24
下一篇:
C# InventoryItemBase类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap