public IActionResult Index(string Category) { var Cat = _context.GetAllCats(); var Item = _context.GetAllItems(); var Cont = _context.GetAllContacts(); if (Category == "sortHL") { Item = _context.Highlow(); } else if (Category == "sortLH") { Item = _context.LowHigh(); } else if (Category != null && Category != "All") { Item = _context.GetFromCat(Category); } var MyView = new CatItemView { Items = Item, Cats = Cat }; return(View(MyView)); }
public ViewResult Admin(bool access) { var Cont = _context.GetAllContacts(); var Items = _context.GetAllItems(); var MyView = new CatItemView() { Items = Items, Conts = Cont }; return(View(MyView)); }
public void Show(Action callback = null) { this.callback = callback; descriptionText.text = Localization.Get("rentCatBuy", catItem.type.localizedName, catItem.level); priceText.text = iapManager.cat.priceLocalized; catView = Instantiate(catItem.type.itemViewPrefab) as CatItemView; catView.transform.SetParent(catParent, false); catView.transform.localScale = 2 * Vector3.one; catView.footer.SetActive(false); gameObject.SetActive(true); }
public void AddToList(CatItem catItem) { CatItemView itemView = Instantiate(catItem.type.itemViewPrefab) as CatItemView; itemView.transform.localScale = catListScale; itemView.transform.SetParent(catItemGrid.transform, false); itemView.Init(catItem, catItemView => { Install(catItemView.catItem, showCoins: true); }); catItemList.Add(itemView); if (itemView.particleController != null) { itemView.particleController.OFF(); } (catItemGrid.transform as RectTransform).sizeDelta = new Vector2( catItemList.Count * (catItemGrid.cellSize.x + catItemGrid.spacing.x) + catItemGrid.spacing.x * 2, (catItemGrid.transform as RectTransform).sizeDelta.y); }
public void Show(CatSlot slot) { if (!AddCat()) { return; } rentCatNextSession = user.gameSessions + balance.rentCat.frequency + rentCats[catItem.type] * (int)((float)balance.rentCat.frequency * 0.3f); descriptionText.text = Localization.Get("rentCat", catItem.type.localizedName, catItem.level); catView = Instantiate(catItem.type.itemViewPrefab); catView.transform.SetParent(catParent, false); catView.transform.localScale = 2 * Vector3.one; catView.footer.SetActive(false); gameObject.SetActive(true); Analytic.EventProperties("RentCat", catItem.type.name, "RENT"); }