public override void Draw()
    {
        if (vItemsListLoaded)
        {
          if (gameVItemInfoArray == null)
          {
        gameVItemInfoArray = MNDirect.GetVItemsProvider().GetGameVItemsList();
          }

          for (int index = 0; index < gameVItemInfoArray.Length; index++)
          {
          //___\/___ for Currencies
        if (((gameVItemInfoArray[index].Model & (int)MNVItemsProvider.VITEM_IS_CURRENCY_MASK) != 0))
        {
          if (GUILayout.Button(gameVItemInfoArray[index].Name))
          {
            gameVItemInfo = gameVItemInfoArray[index];
            PPSDemoMain.stackView.Push(new PPSDemoVirtualItemsInfoView(gameVItemInfo));
          }
        }
          }
        }
        else
        {
          GUILayout.Label(PPSDemoCommonInfo.InformationUpdatingMessage);
        }
    }
    public override void Draw()
    {
        if (!vShopPacksDetailUpdated)
        {
          vShopCategoryInfo = MNDirect.GetVShopProvider().FindVShopCategoryById(vShopPackItem.CategoryId);
          vShopPacksDetailUpdated = true;
          shopPacksDetailToShow = MNDirect.GetVItemsProvider().FindGameVItemById(vShopPackItem.Delivery[0].VItemId);
        }

        if (vShopPackItem != null)
        {
          GUILayout.Label("Pack ID: " + vShopPackItem.Id);
          GUILayout.Label("Name: " + vShopPackItem.Name);
          GUILayout.Label("Category: " + vShopCategoryInfo.Name);

          GUILayout.Label("Items in pack: ");

          GUILayout.Label("Item name: " + shopPacksDetailToShow.Name);
          GUILayout.Label("Quantity: " + vShopPackItem.Delivery[0].Amount);
          GUILayout.Label("Price: $ " + (float)vShopPackItem.PriceValue/100);
          GUILayout.Label("");
          GUILayout.Label("Description: ");
          GUILayout.Label(vShopPackItem.Description);

          GUILayout.Toggle((vShopPackItem.Model & 1) != 0,"Is Hidden");
          GUILayout.Toggle((vShopPackItem.Model & 2) != 0,"Hold Sales");

          GUILayout.Label("Application Parametres");
          GUI.enabled = false;
          GUILayout.TextArea(vShopPackItem.AppParams);
          GUI.enabled = true;
        }
        else
        {
          GUILayout.Label(PPSDemoCommonInfo.InformationUpdatingMessage);
        }
    }
 public PPSDemoVirtualItemsInfoView(MNVItemsProvider.GameVItemInfo gameVItemInfo)
 {
     viewName = "Virtual Item info";
     this.gameVItemInfo = gameVItemInfo;
 }
        public MNVItemsProvider.GameVItemInfo[] GetGameVItemsList()
        {
            MNTools.DLog("MNVItemsProvider:GetGameVItemsList");

              if (Application.platform == RuntimePlatform.Android) {
            List<object> deserializedArray = MNUnityCommunicator.Serializer.DeserializeArray(
              MNVItemsProviderUnityClass.CallStatic<string>("getGameVItemsList"),
              typeof(MNVItemsProvider.GameVItemInfo));

            MNVItemsProvider.GameVItemInfo[] resultArray = new MNVItemsProvider.GameVItemInfo[deserializedArray.Count];

            for (int index = 0;index < deserializedArray.Count;index++) {
              resultArray[index] = (MNVItemsProvider.GameVItemInfo)(deserializedArray[index]);
            }

            return resultArray;
              }
              else {
            return new MNVItemsProvider.GameVItemInfo[0];
              }
        }
    public override void Draw()
    {
        if (PPSDemoInfoStorage.currentUserInfo != null)
           {
        if (!vItemsListUpdated)
        {
          if (MNDirect.GetVItemsProvider().IsGameVItemsListNeedUpdate() && isGameVItemsListNeedUpdate)
          {
        MNDirect.GetVItemsProvider().VItemsListUpdated += new MNVItemsProvider.VItemsListUpdatedEventHandler(OnGameVItemsListUpdated);
        MNDirect.GetVItemsProvider().DoGameVItemsListUpdate();
        isGameVItemsListNeedUpdate = false;
          }
          vItemsListUpdated = true;
          playerVItemInfoArrayNeedUpdate = true;
        }

        if (vItemsListUpdated)
        {
          if (playerVItemInfoArrayNeedUpdate)
          {
        playerVItemInfoArray = MNDirect.GetVItemsProvider().GetPlayerVItemList();
        playerVItemInfoArrayNeedUpdate = false;
        gameVItemInfoArray = new MNVItemsProvider.GameVItemInfo[playerVItemInfoArray.Length];

        for (int index = 0; index < playerVItemInfoArray.Length; index++)
        {
          gameVItemInfoArray[index] = MNDirect.GetVItemsProvider().FindGameVItemById(playerVItemInfoArray[index].Id);
        }
          }
          if (playerVItemInfoArray != null)
          {
        GUILayout.Label("Total " + playerVItemInfoArray.Length);
        GUILayout.Label("Items: ");
        for (int index = 0;index < playerVItemInfoArray.Length;index++)
        {
          gameVItemInfo = gameVItemInfoArray[index];
          if (!((gameVItemInfo.Model & (int)MNVItemsProvider.VITEM_IS_CURRENCY_MASK) != 0))
          {
            GUILayout.Label(" " + gameVItemInfoArray[index].Name + " "+ playerVItemInfoArray[index].Count);
          }
        }

        GUILayout.Label("Coins: ");
        for (int index = 0;index < playerVItemInfoArray.Length;index++)
        {
          gameVItemInfo = gameVItemInfoArray[index];
          if (((gameVItemInfo.Model & (int)MNVItemsProvider.VITEM_IS_CURRENCY_MASK) != 0))
          {
            GUILayout.Label(" " + gameVItemInfoArray[index].Name + " "+ playerVItemInfoArray[index].Count);
          }
        }
          }
        }
        else
        {
          GUILayout.Label(PPSDemoCommonInfo.InformationUpdatingMessage);
        }
           }
           else
           {
         GUILayout.Label(PPSDemoCommonInfo.NotLoggedInMessage);
           }
    }
        public static MNVItemsProvider.GameVItemInfo MNVItemsProviderGameVItemInfoFromDictionary(IDictionary deserializedObject)
        {
            if (deserializedObject == null) {
            return null;
              }

              MNVItemsProvider.GameVItemInfo typedResult = new MNVItemsProvider.GameVItemInfo();

              typedResult.Description = (string)deserializedObject["Description"];
              typedResult.Id = Convert.ToInt32(deserializedObject["Id"]);
              typedResult.Model = Convert.ToInt32(deserializedObject["Model"]);
              typedResult.Name = (string)deserializedObject["Name"];
              typedResult.Params = (string)deserializedObject["Params"];

              return typedResult;
        }