GameScript.showInventory C# (CSharp) Method

showInventory() private method

private showInventory ( ) : void
return void
    private void showInventory()
    {
        txtPnlItemsId1.text = "";
        txtPnlItemsId2.text = "";
        txtPnlItemsId3.text = "";
        txtPnlItemsId4.text = "";

        txtPnlItemsAmount1.text = "";
        txtPnlItemsAmount2.text = "";
        txtPnlItemsAmount3.text = "";
        txtPnlItemsAmount4.text = "";

        txtPnlItems1.text = "";
        txtPnlItems2.text = "";
        txtPnlItems3.text = "";
        txtPnlItems4.text = "";

        for (int i = 0; i < Spil.PlayerData.Inventory.Items.Count; i++)
        {
            if (i >= pnlItemsCurrentPage * 4 && i < (pnlItemsCurrentPage + 1) * 4)
            {
                if (i % 4 == 0)
                {
                    txtPnlItemsId1.text = "Id: " + Spil.PlayerData.Inventory.Items[i].Id.ToString();
                    txtPnlItemsAmount1.text = "X: " + Spil.PlayerData.Inventory.Items[i].Amount.ToString();
                    txtPnlItems1.text = Spil.PlayerData.Inventory.Items[i].Name;
                }
                if (i % 4 == 1)
                {
                    txtPnlItemsId2.text = "Id: " + Spil.PlayerData.Inventory.Items[i].Id.ToString();
                    txtPnlItemsAmount2.text = "X: " + Spil.PlayerData.Inventory.Items[i].Amount.ToString();
                    txtPnlItems2.text = Spil.PlayerData.Inventory.Items[i].Name;
                }
                if (i % 4 == 2)
                {
                    txtPnlItemsId3.text = "Id: " + Spil.PlayerData.Inventory.Items[i].Id.ToString();
                    txtPnlItemsAmount3.text = "X: " + Spil.PlayerData.Inventory.Items[i].Amount.ToString();
                    txtPnlItems3.text = Spil.PlayerData.Inventory.Items[i].Name;
                }
                if (i % 4 == 3)
                {
                    txtPnlItemsId4.text = "Id: " + Spil.PlayerData.Inventory.Items[i].Id.ToString();
                    txtPnlItemsAmount4.text = "X: " + Spil.PlayerData.Inventory.Items[i].Amount.ToString();
                    txtPnlItems4.text = Spil.PlayerData.Inventory.Items[i].Name;
                }
            }
        }
    }