public void InitEventWatcher() { var rBoundEvent = DataBindingTypeResolve.MakeViewDataBindingEvent(this.gameObject, this.EventPath); if (rBoundEvent != null) { this.mUnityEventWatcher = new UnityEventWatcher(rBoundEvent.Component, rBoundEvent.Name, this.SyncFromView); } else { Debug.LogErrorFormat("Can not parse bound event: {0}.", this.EventPath); } }
public void InitEventWatcher(Action <EventArg> rAction) { var rBoundEvent = DataBindingTypeResolve.MakeViewDataBindingEvent(this.gameObject, this.ViewEvent); if (rBoundEvent != null) { this.mUnityEventWatcher = new UnityEventWatcher(rBoundEvent.Component, rBoundEvent.Name, rAction); } else { Debug.LogErrorFormat("Can not parse bound event: {0}.", this.ViewEvent); } }
public override void GetPaths() { base.GetPaths(); var rViewModelProps = new List <BindableMember <PropertyInfo> >( DataBindingTypeResolve.GetListViewModelProperties(this.gameObject)); this.ModelPaths = DataBindingTypeResolve.GetAllViewModelPaths(rViewModelProps).ToArray(); if (string.IsNullOrEmpty(this.ViewModelPath)) { this.ViewModelPath = this.ModelPaths.Length > 0 ? this.ModelPaths[0] : ""; } }
public void GetPaths() { ViewModelClasses = DataBindingTypeResolve.GetAllViewModels().ToArray(); }
public virtual void GetPaths() { this.TemplateViewModels = DataBindingTypeResolve.GetAllViewModels().ToArray(); }
public void GetAllViewModelDataSources() { this.ViewModels = new List <ViewModelDataSource>(this.GetComponentsInChildren <ViewModelDataSource>(true)); this.EventBindings = new List <EventBinding>(this.GetComponentsInChildren <EventBinding>(true)); this.ViewModelClasses = DataBindingTypeResolve.GetAllViews().ToArray(); }
public UnityEventWatcher(Component rComp, string rEventName, Action <EventArg> rAction) { var rBindableEvent = DataBindingTypeResolve.GetBoundEvent(rEventName, rComp); this.mUnityEventBinder = UnityEventBinderFactory.Create(rBindableEvent?.UnityEvent, rAction); }
public void GetAllViewModelDataSources() { ViewModels = new List <ViewModelDataSource>(GetComponentsInChildren <ViewModelDataSource>(true)); EventBindings = new List <EventBinding>(GetComponentsInChildren <EventBinding>(true)); ViewControllerClasses = DataBindingTypeResolve.GetAllViews().ToArray(); }
public void InitEventWatcher() { var rBoundEvent = DataBindingTypeResolve.MakeViewDataBindingEvent(this.gameObject, this.EventPath); this.mUnityEventWatcher = new UnityEventWatcher(rBoundEvent.Component, rBoundEvent.Name, this.SyncFromView); }