private bool ApplyFilters(DataBindingBase arg) { var oneWay = arg as OneWayDataBinding; var dataBinding = arg as DataBinding; if (oneWay) { if (_filterBy == FilterType.None) { return(true); } if (oneWay.Connection == null) { return(false); } return(_filterBy == FilterType.Bound ? oneWay.Connection.IsBound : !oneWay.Connection.IsBound); } else if (dataBinding) { if (_filterBy == FilterType.None) { return(true); } if (dataBinding.Connection == null) { return(false); } return(_filterBy == FilterType.Bound ? dataBinding.Connection.IsBound : !dataBinding.Connection.IsBound); } else { return(false); } }
private void DrawBindings(DataBindingBase item) { if (item is OneWayDataBinding) { DrawOneWay(item as OneWayDataBinding); } else if (item is DataBinding) { DrawBinding(item as DataBinding); } }
private static bool TestDataBinding(DataBindingBase binding, Type testCaseType, out Stack <string> errors) { var ict = binding as IConnectionTestEventReciver; ict?.PreConnectionTest(); var testCase = Activator.CreateInstance(testCaseType, new[] { binding }) as IDataBindingTestCase; var rValue = testCase.ExecuteTest() == true; errors = testCase.Errors; ict?.PostConnectionTest(); return(rValue); }
public override void OnInspectorGUI() { if (!(target is CollectionViewSource myClass)) { return; } _srcIndex = myClass.SrcCollectionName is null ? -1 : DataBindingBase.GetIndexOfBindablePropertyInfo(myClass.SrcCollectionName, ViewModelProvider.GetViewModelType(myClass.ViewModelName), myClass.SrcCollections); base.OnInspectorGUI(); }
protected virtual void OnEnable() { BindingBase = target as DataBindingBase; if (AdapterLookup.Count <= 0) { CollectAdapters(); } if (ViewCollectionChangedHandlerTypes.Count <= 0) { CollectViewHandlers(); } }
public VisibilityBindingTestCase(DataBindingBase binder) : base(binder) { }
public TwoWayDataBindingTestCase(DataBindingBase binder) : base(binder) { _binder = binder as TwoWayDataBinding; }
private object ApplyOrder(DataBindingBase arg) { return(_orderBy == OrderType.GameObject ? arg.gameObject.name : arg.ViewModelName); }
public CollectionViewSourceTestCase(DataBindingBase binder) : base(binder) { _binder = binder as CollectionViewSource; }
public OneWayDataBindingTestCase(DataBindingBase binder) : base(binder) { _binder = binder as OneWayDataBinding; }
public DataBindingTestCaseBase(DataBindingBase binder) { _binder = binder as DataBindingBase; }