public ListNotifyBinding(Action notify, ListProperty <Type> _source) { this.Enabled = true; this.notify = notify; _source.AddBinding(this); this.sources = new IProperty[] { _source }; }
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]); } }
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); }
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(); }
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); } } }
public ListBinding(ListProperty <Type> _destination, ListProperty <Type2> _source, Func <Type2, Type> _transform) : this(_destination, _source, _transform, (x) => true) { }