Exemplo n.º 1
0
        public BindableInt Set(T lookup, int value, int?min = null, int?max = null)
        {
            BindableInt bindable = GetBindable <int>(lookup) as BindableInt;

            if (bindable == null)
            {
                bindable = new BindableInt(value);
                addBindable(lookup, bindable);
            }
            else
            {
                bindable.Value = value;
            }

            if (min.HasValue)
            {
                bindable.MinValue = min.Value;
            }
            if (max.HasValue)
            {
                bindable.MaxValue = max.Value;
            }

            return(bindable);
        }
Exemplo n.º 2
0
        public BindableInt Set(T lookup, int value)
        {
            BindableInt bindable = GetBindable <int>(lookup) as BindableInt;

            if (bindable == null)
            {
                bindable = new BindableInt(value);
                addBindable(lookup, bindable);
            }
            else
            {
                bindable.Value = value;
            }

            return(bindable);
        }