public override void Connect() { var viewModelBinding = GetViewModelBinding(); selectionPropertyBinder = new PropertyBinder(this.gameObject, viewModelSelectionPropertyName, uiSelectionPropertyName, boundComponentType, CreateAdapter(selectionViewModelToUIAdapter), viewModelBinding.BoundViewModel); optionsPropertyBinder = new PropertyBinder(this.gameObject, viewModelOptionsPropertyName, uiOptionsPropertyName, boundComponentType, CreateAdapter(optionsAdapter), viewModelBinding.BoundViewModel); selectionChangedEventBinder = new EventBinder(this.gameObject, "set_" + viewModelSelectionPropertyName, uiEventName, boundComponentType, CreateAdapter(selectionUIToViewModelAdapter), viewModelBinding); }
public override void Disconnect() { if (propertyBinder != null) { propertyBinder.Dispose(); propertyBinder = null; } }
public override void Connect() { propertyBinder = new PropertyBinder(this.gameObject, viewModelPropertyName, uiPropertyName, boundComponentType, CreateAdapter(adapterTypeName), GetViewModel()); }
public override void Connect() { var viewModelBinding = GetViewModelBinding(); propertyBinder = new PropertyBinder(this.gameObject, viewModelPropertyName, uiPropertyName, boundComponentType, CreateAdapter(viewModelToUIAdapterName), viewModelBinding.BoundViewModel); eventBinder = new EventBinder(this.gameObject, "set_" + viewModelPropertyName, // Call the setter on the bound property uiEventName, boundComponentType, CreateAdapter(uiToViewModelAdapterName), viewModelBinding); }
public override void Disconnect() { if (selectionPropertyBinder != null) { selectionPropertyBinder.Dispose(); selectionPropertyBinder = null; } if (optionsPropertyBinder != null) { optionsPropertyBinder.Dispose(); optionsPropertyBinder = null; } if (selectionChangedEventBinder != null) { selectionChangedEventBinder.Dispose(); selectionChangedEventBinder = null; } }