public void PropertyChanged_ViewModel(object sender, global::System.ComponentModel.PropertyChangedEventArgs e) { BindingPage_obj1_Bindings bindings; if (WeakRefToBindingObj.TryGetTarget(out bindings)) { string propName = e.PropertyName; global::App7.Model.BindingModel obj = sender as global::App7.Model.BindingModel; if (global::System.String.IsNullOrEmpty(propName)) { if (obj != null) { bindings.Update_ViewModel_Nombre(obj.Nombre, DATA_CHANGED); bindings.Update_ViewModel_Edad(obj.Edad, DATA_CHANGED); bindings.Update_ViewModel_Apellido(obj.Apellido, DATA_CHANGED); } } else { switch (propName) { case "Nombre": { if (obj != null) { bindings.Update_ViewModel_Nombre(obj.Nombre, DATA_CHANGED); } break; } case "Edad": { if (obj != null) { bindings.Update_ViewModel_Edad(obj.Edad, DATA_CHANGED); } break; } case "Apellido": { if (obj != null) { bindings.Update_ViewModel_Apellido(obj.Apellido, DATA_CHANGED); } break; } default: break; } } } }
private void Update_ViewModel(global::App7.Model.BindingModel obj, int phase) { this.bindingsTracking.UpdateChildListeners_ViewModel(obj); if (obj != null) { if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0) { this.Update_ViewModel_Nombre(obj.Nombre, phase); this.Update_ViewModel_Edad(obj.Edad, phase); this.Update_ViewModel_Apellido(obj.Apellido, phase); } } }
public void UpdateChildListeners_ViewModel(global::App7.Model.BindingModel obj) { if (obj != cache_ViewModel) { if (cache_ViewModel != null) { ((global::System.ComponentModel.INotifyPropertyChanged)cache_ViewModel).PropertyChanged -= PropertyChanged_ViewModel; cache_ViewModel = null; } if (obj != null) { cache_ViewModel = obj; ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_ViewModel; } } }