Esempio n. 1
0
        private void CounterButtonClick(object sender, EventArgs e)
        {
            var view = sender as View;

            switch (view.Id)
            {
            case Resource.Id.SubtractCountButton:
                CounterItem.Count--;
                break;

            case Resource.Id.AddCountButton:
                CounterItem.Count++;
                break;

            case Resource.Id.SubtractTenCountButton:
                CounterItem.Count -= 10;
                break;

            case Resource.Id.AddTenCountButton:
                CounterItem.Count += 10;
                break;
            }

            SetCounterItem(CounterItem);

            CounterChange?.Invoke(CounterItem, AdapterPosition);
        }
 private void OnCounterChange(CounterItem item, int postion)
 {
     CounterChange?.Invoke(item, postion);
 }