Exemple #1
0
 public void BindData <TData>(ObservableProperty <TData> property, Action <TData> cb)
 {
     CanClearListeners.TryAdd(property);
     cb?.Invoke(property);
     property.AddListener(cb);
 }
Exemple #2
0
 public void BindData <TData1, TData2, TData3>(ObservableProperty <TData1> property, ObservableProperty <TData2> property2, ObservableProperty <TData3> property3, Action <TData1, TData2, TData3> cb)
 {
     AddClearable(property.AddListener((data1) => cb?.Invoke(data1, property2, property3)));
     AddClearable(property2.AddListener((data2) => cb?.Invoke(property, data2, property3)));
     AddClearable(property3.AddListener((data3) => cb?.Invoke(property, property2, data3)));
 }
Exemple #3
0
 public void BindData <TData>(ObservableProperty <TData> property, Action <TData> cb)
 {
     AddClearable(property.AddListener(cb));
 }
Exemple #4
0
 public void BindData <TData1, TData2>(ObservableProperty <TData1> property, ObservableProperty <TData2> property2, Action <TData1, TData2> cb)
 {
     AddClearable(property.AddListener(data1 => cb?.Invoke(data1, property2)));
     AddClearable(property2.AddListener(data2 => cb?.Invoke(property, data2)));
 }
Exemple #5
0
 public void BindDropDown(Dropdown dropdown, ObservableProperty <int> property,
                          BindableList <Dropdown.OptionData> listProperty = null)
 {
     TwoWayBind(dropdown, property);
     BindList(dropdown, listProperty);
 }