private void Update_ViewModel(global::TwitchClient.ViewModels.ShellViewModel obj, int phase) { this.bindingsTracking.UpdateChildListeners_ViewModel(obj); if (obj != null) { if ((phase & (NOT_PHASED | (1 << 0))) != 0) { this.Update_ViewModel_LoadedCommand(obj.LoadedCommand, phase); } if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0) { this.Update_ViewModel_IsBackEnabled(obj.IsBackEnabled, phase); this.Update_ViewModel_Selected(obj.Selected, phase); } if ((phase & (NOT_PHASED | (1 << 0))) != 0) { this.Update_ViewModel_AuthCommand(obj.AuthCommand, phase); } if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0) { this.Update_ViewModel_SearchParam(obj.SearchParam, phase); } if ((phase & (NOT_PHASED | (1 << 0))) != 0) { this.Update_ViewModel_ThemeCommand(obj.ThemeCommand, phase); this.Update_ViewModel_SearchCommand(obj.SearchCommand, phase); this.Update_ViewModel_ItemInvokedCommand(obj.ItemInvokedCommand, phase); } } }
public void PropertyChanged_ViewModel(object sender, global::System.ComponentModel.PropertyChangedEventArgs e) { ShellPage_obj1_Bindings bindings = TryGetBindingObject(); if (bindings != null) { string propName = e.PropertyName; global::TwitchClient.ViewModels.ShellViewModel obj = sender as global::TwitchClient.ViewModels.ShellViewModel; if (global::System.String.IsNullOrEmpty(propName)) { if (obj != null) { bindings.Update_ViewModel_IsBackEnabled(obj.IsBackEnabled, DATA_CHANGED); bindings.Update_ViewModel_Selected(obj.Selected, DATA_CHANGED); bindings.Update_ViewModel_SearchParam(obj.SearchParam, DATA_CHANGED); } } else { switch (propName) { case "IsBackEnabled": { if (obj != null) { bindings.Update_ViewModel_IsBackEnabled(obj.IsBackEnabled, DATA_CHANGED); } break; } case "Selected": { if (obj != null) { bindings.Update_ViewModel_Selected(obj.Selected, DATA_CHANGED); } break; } case "SearchParam": { if (obj != null) { bindings.Update_ViewModel_SearchParam(obj.SearchParam, DATA_CHANGED); } break; } default: break; } } } }
public void UpdateChildListeners_ViewModel(global::TwitchClient.ViewModels.ShellViewModel 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; } } }