public void UpdateChildListeners_Organization(global::ViewModels.OrganizationViewModel obj) { if (obj != cache_Organization) { if (cache_Organization != null) { ((global::System.ComponentModel.INotifyPropertyChanged)cache_Organization).PropertyChanged -= PropertyChanged_Organization; cache_Organization = null; } if (obj != null) { cache_Organization = obj; ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_Organization; } } }
private void Update_Organization(global::ViewModels.OrganizationViewModel obj, int phase) { this.bindingsTracking.UpdateChildListeners_Organization(obj); if (obj != null) { if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0) { this.Update_Organization_SelectedPerson(obj.SelectedPerson, phase); this.Update_Organization_People(obj.People, phase); this.Update_Organization_SelectedIndex(obj.SelectedIndex, phase); } } else { if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0) { this.UpdateFallback_Organization_SelectedPerson(phase); } } }
public void PropertyChanged_Organization(object sender, global::System.ComponentModel.PropertyChangedEventArgs e) { MainPage_obj1_Bindings bindings; if (WeakRefToBindingObj.TryGetTarget(out bindings)) { string propName = e.PropertyName; global::ViewModels.OrganizationViewModel obj = sender as global::ViewModels.OrganizationViewModel; if (global::System.String.IsNullOrEmpty(propName)) { if (obj != null) { bindings.Update_Organization_SelectedPerson(obj.SelectedPerson, DATA_CHANGED); bindings.Update_Organization_People(obj.People, DATA_CHANGED); bindings.Update_Organization_SelectedIndex(obj.SelectedIndex, DATA_CHANGED); } else { bindings.UpdateFallback_Organization_SelectedPerson(DATA_CHANGED); } } else { switch (propName) { case "SelectedPerson": { if (obj != null) { bindings.Update_Organization_SelectedPerson(obj.SelectedPerson, DATA_CHANGED); } else { bindings.UpdateFallback_Organization_SelectedPerson(DATA_CHANGED); } break; } case "People": { if (obj != null) { bindings.Update_Organization_People(obj.People, DATA_CHANGED); } break; } case "SelectedIndex": { if (obj != null) { bindings.Update_Organization_SelectedIndex(obj.SelectedIndex, DATA_CHANGED); } break; } default: break; } } } }