private void Update_SettingVM(global::MyerList.ViewModel.SettingPageViewModel obj, int phase) { this.bindingsTracking.UpdateChildListeners_SettingVM(obj); if (obj != null) { if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0) { this.Update_SettingVM_EnableGesture(obj.EnableGesture, phase); this.Update_SettingVM_ShowKeyboard(obj.ShowKeyboard, phase); this.Update_SettingVM_IsAddToBottom(obj.IsAddToBottom, phase); this.Update_SettingVM_EnableTile(obj.EnableTile, phase); this.Update_SettingVM_CurrentLanguage(obj.CurrentLanguage, phase); } } }
public void UpdateChildListeners_SettingVM(global::MyerList.ViewModel.SettingPageViewModel obj) { if (obj != cache_SettingVM) { if (cache_SettingVM != null) { ((global::System.ComponentModel.INotifyPropertyChanged)cache_SettingVM).PropertyChanged -= PropertyChanged_SettingVM; cache_SettingVM = null; } if (obj != null) { cache_SettingVM = obj; ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_SettingVM; } } }
public void PropertyChanged_SettingVM(object sender, global::System.ComponentModel.PropertyChangedEventArgs e) { SettingPage_obj1_Bindings bindings; if (WeakRefToBindingObj.TryGetTarget(out bindings)) { string propName = e.PropertyName; global::MyerList.ViewModel.SettingPageViewModel obj = sender as global::MyerList.ViewModel.SettingPageViewModel; if (global::System.String.IsNullOrEmpty(propName)) { if (obj != null) { bindings.Update_SettingVM_EnableGesture(obj.EnableGesture, DATA_CHANGED); bindings.Update_SettingVM_ShowKeyboard(obj.ShowKeyboard, DATA_CHANGED); bindings.Update_SettingVM_IsAddToBottom(obj.IsAddToBottom, DATA_CHANGED); bindings.Update_SettingVM_EnableTile(obj.EnableTile, DATA_CHANGED); bindings.Update_SettingVM_CurrentLanguage(obj.CurrentLanguage, DATA_CHANGED); } } else { switch (propName) { case "EnableGesture": { if (obj != null) { bindings.Update_SettingVM_EnableGesture(obj.EnableGesture, DATA_CHANGED); } break; } case "ShowKeyboard": { if (obj != null) { bindings.Update_SettingVM_ShowKeyboard(obj.ShowKeyboard, DATA_CHANGED); } break; } case "IsAddToBottom": { if (obj != null) { bindings.Update_SettingVM_IsAddToBottom(obj.IsAddToBottom, DATA_CHANGED); } break; } case "EnableTile": { if (obj != null) { bindings.Update_SettingVM_EnableTile(obj.EnableTile, DATA_CHANGED); } break; } case "CurrentLanguage": { if (obj != null) { bindings.Update_SettingVM_CurrentLanguage(obj.CurrentLanguage, DATA_CHANGED); } break; } default: break; } } } else { ReleaseAllListeners(); } }