Esempio n. 1
0
 public ListNotifyBinding(Action notify, ListProperty <Type> _source)
 {
     this.Enabled = true;
     this.notify  = notify;
     _source.AddBinding(this);
     this.sources = new IProperty[] { _source };
 }
Esempio n. 2
0
        public void CopyTo(IListProperty dest)
        {
            ListProperty <Type> list = (ListProperty <Type>)dest;

            list.Clear();
            for (int i = 0; i < this.list.Count; i++)
            {
                list.Add(this.list[i]);
            }
        }
Esempio n. 3
0
 public ListBinding(ListProperty <Type> _destination, ListProperty <Type2> _source, Func <Type2, Type> _transform, Func <Type2, bool> _filter)
 {
     this.Enabled     = true;
     this.destination = _destination;
     this.transform   = _transform;
     this.filter      = _filter;
     _source.AddBinding(this);
     this.sources = new IProperty[] { _source };
     this.OnChanged(_source);
 }
Esempio n. 4
0
 public void Delete()
 {
     for (int i = 0; i < this.sources.Length; i++)
     {
         this.sources[i].RemoveBinding(this);
     }
     this.sources     = null;
     this.destination = null;
     this.transform   = null;
     this.filter      = null;
     this.mapping.Clear();
 }
Esempio n. 5
0
 public void OnChanged(IProperty property)
 {
     if (this.Enabled)
     {
         this.Clear(property);
         ListProperty <Type2> source = (ListProperty <Type2>) this.sources[0];
         for (int i = 0; i < source.Count; i++)
         {
             this.Add(source[i], property);
         }
     }
 }
Esempio n. 6
0
 public ListBinding(ListProperty <Type> _destination, ListProperty <Type2> _source, Func <Type2, Type> _transform)
     : this(_destination, _source, _transform, (x) => true)
 {
 }