Beispiel #1
0
    private void CreateAndFillCatalogGroups(List <CatalogItemModel> items)
    {
        if (items.Any())
        {
            items.ForEach(i =>
            {
                var groups = GetImplementation().GetCatalogGroupsByItem(i);
                groups.ForEach(groupName =>
                {
                    _groupsController.AddGroup(groupName);
                    _itemsController.AddItemToContainer(groupName, i);
                });
            });
        }
        else
        {
            _groupsController.AddGroup("ALL");
        }

        _groupsController.SelectDefault();
    }
    void InitStoreUi(StoreItems items)
    {
        XsollaStore.Instance.GetListOfItemGroups(XsollaSettings.StoreProjectId, groups =>
        {
            _groupsController.CreateGroups(items, groups);
            _itemsController.CreateItems(items);

            _itemsTabControl.Init();
            _extraController.Init();

            _groupsController.SelectDefault();
            XsollaStore.Instance.GetVirtualCurrencyPackagesList(XsollaSettings.StoreProjectId, _itemsController.AddVirtualCurrencyPackage, ShowError);
            XsollaStore.Instance.GetVirtualCurrencyList(
                XsollaSettings.StoreProjectId,
                currencies =>
            {
                _itemsTabControl.VirtualCurrencyBalance.SetCurrencies(currencies);
                RefreshVirtualCurrencyBalance();
            }, ShowError);
        }, ShowError);
    }