Esempio n. 1
0
        protected override void Bind(UIViewModel viewModel)
        {
            var d = Delegate.CreateDelegate(typeof(Action <int>), this, "OnChangeValue");
            var e = (EventInt)viewModel.BindProperty(bindPropertyName, d);

            bindView.text = e.Value.ToString();
        }
Esempio n. 2
0
        protected override void Bind(UIViewModel viewModel)
        {
            var d = Delegate.CreateDelegate(typeof(Action <Comparator>), this, "OnChangeValue");
            var e = viewModel.BindProperty(bindPropertyName, d) as EventValueType <Comparator>;

            bindView.preserveAspect = true;
            bindView.sprite         = GetImage(e.Value);
        }
Esempio n. 3
0
        protected override void Bind(UIViewModel viewModel)
        {
            var d = Delegate.CreateDelegate(typeof(Action <Sprite>), this, "OnChangeValue");
            var e = viewModel.BindProperty(bindPropertyName, d) as EventSprite;

            bindView.preserveAspect = true;
            bindView.sprite         = e.Value;
        }
        protected override void Bind(UIViewModel viewModel)
        {
            var ad         = Delegate.CreateDelegate(typeof(Action <M>), this, "OnAddEvent");
            var rd         = Delegate.CreateDelegate(typeof(Action <M>), this, "OnRemoveEvent");
            var bindedList = viewModel.BindCollectionProperty(bindPropertyName, ad, rd) as EventList <M>;

            for (int i = 0; i < bindedList.Count; ++i)
            {
                var item = Spawn(bindedList[i]);
                item.gameObject.SetActive(true);
                spawnedViews.Add(item);
                addEvent?.Invoke(item);
            }
        }
 protected abstract void Bind(UIViewModel viewModel);