public void UpdateChildListeners_ViewModel(global::Ioespt.UWP.DeviceControl.ViewModels.AddDevicePageViewModel 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; } } }
private void Update_ViewModel(global::Ioespt.UWP.DeviceControl.ViewModels.AddDevicePageViewModel obj, int phase) { this.bindingsTracking.UpdateChildListeners_ViewModel(obj); if (obj != null) { if ((phase & (NOT_PHASED | (1 << 0))) != 0) { this.Update_ViewModel_networks(obj.networks, phase); } if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0) { this.Update_ViewModel_selectedNetwork(obj.selectedNetwork, phase); this.Update_ViewModel_password(obj.password, phase); } } }
public void UpdateChildListeners_ViewModel(global::Ioespt.UWP.DeviceControl.ViewModels.AddDevicePageViewModel 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; } } }
public void PropertyChanged_ViewModel(object sender, global::System.ComponentModel.PropertyChangedEventArgs e) { AddDevicePage_obj1_Bindings bindings; if (WeakRefToBindingObj.TryGetTarget(out bindings)) { string propName = e.PropertyName; global::Ioespt.UWP.DeviceControl.ViewModels.AddDevicePageViewModel obj = sender as global::Ioespt.UWP.DeviceControl.ViewModels.AddDevicePageViewModel; if (global::System.String.IsNullOrEmpty(propName)) { if (obj != null) { bindings.Update_ViewModel_selectedNetwork(obj.selectedNetwork, DATA_CHANGED); bindings.Update_ViewModel_password(obj.password, DATA_CHANGED); } } else { switch (propName) { case "selectedNetwork": { if (obj != null) { bindings.Update_ViewModel_selectedNetwork(obj.selectedNetwork, DATA_CHANGED); } break; } case "password": { if (obj != null) { bindings.Update_ViewModel_password(obj.password, DATA_CHANGED); } break; } default: break; } } } }