コード例 #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();
        }
コード例 #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);
        }
コード例 #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;
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
 protected abstract void Bind(UIViewModel viewModel);