Exemplo n.º 1
0
        /// <summary>Callback from UI Button. Parses the text in <see cref="countText"/> as an int and sets it as the new item count, refreshing all the views</summary>
        public void UpdateItems()
        {
            int newCount;

            int.TryParse(countText.text, out newCount);

            // Generating some random models
            var models = new BasicModel[newCount];

            for (int i = 0; i < newCount; ++i)
            {
                models[i]          = new BasicModel();
                models[i].title    = "Item " + i;
                models[i].imageURL = C.GetRandomSmallImageURL();
            }
            _GridAdapter.ChangeModels(models);
        }
Exemplo n.º 2
0
 public void Remove(BasicModel newModel)
 {
     _Data.Add(newModel);
     ChangeItemCountTo(_Data.Count);
 }