public void UpdateChildListeners_ViewNames(global::SimplePdfViewer.ViewModel.NameViewModel obj) { if (obj != cache_ViewNames) { if (cache_ViewNames != null) { ((global::System.ComponentModel.INotifyPropertyChanged)cache_ViewNames).PropertyChanged -= PropertyChanged_ViewNames; cache_ViewNames = null; } if (obj != null) { cache_ViewNames = obj; ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_ViewNames; } } }
private void Update_ViewNames(global::SimplePdfViewer.ViewModel.NameViewModel obj, int phase) { this.bindingsTracking.UpdateChildListeners_ViewNames(obj); if (obj != null) { if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0) { this.Update_ViewNames_SelectedBook(obj.SelectedBook, phase); this.Update_ViewNames_book(obj.book, phase); this.Update_ViewNames_SelectedIndex(obj.SelectedIndex, phase); } } else { if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0) { this.UpdateFallback_ViewNames_SelectedBook(phase); } } }
public void PropertyChanged_ViewNames(object sender, global::System.ComponentModel.PropertyChangedEventArgs e) { Books_obj1_Bindings bindings; if (WeakRefToBindingObj.TryGetTarget(out bindings)) { string propName = e.PropertyName; global::SimplePdfViewer.ViewModel.NameViewModel obj = sender as global::SimplePdfViewer.ViewModel.NameViewModel; if (global::System.String.IsNullOrEmpty(propName)) { if (obj != null) { bindings.Update_ViewNames_SelectedBook(obj.SelectedBook, DATA_CHANGED); bindings.Update_ViewNames_book(obj.book, DATA_CHANGED); bindings.Update_ViewNames_SelectedIndex(obj.SelectedIndex, DATA_CHANGED); } else { bindings.UpdateFallback_ViewNames_SelectedBook(DATA_CHANGED); } } else { switch (propName) { case "SelectedBook": { if (obj != null) { bindings.Update_ViewNames_SelectedBook(obj.SelectedBook, DATA_CHANGED); } else { bindings.UpdateFallback_ViewNames_SelectedBook(DATA_CHANGED); } break; } case "book": { if (obj != null) { bindings.Update_ViewNames_book(obj.book, DATA_CHANGED); } break; } case "SelectedIndex": { if (obj != null) { bindings.Update_ViewNames_SelectedIndex(obj.SelectedIndex, DATA_CHANGED); } break; } default: break; } } } }