예제 #1
0
                public void PropertyChanged_vm(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    TripView_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::TZDriver.ViewModels.TripViewModel obj = sender as global::TZDriver.ViewModels.TripViewModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_vm_CurrentTripDataRepo(obj.CurrentTripDataRepo, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "CurrentTripDataRepo":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_vm_CurrentTripDataRepo(obj.CurrentTripDataRepo, DATA_CHANGED);
                                }
                                break;
                            }

                            default:
                                break;
                            }
                        }
                    }
                }
예제 #2
0
 private void Update_vm(global::TZDriver.ViewModels.TripViewModel obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_vm(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_vm_CurrentTripDataRepo(obj.CurrentTripDataRepo, phase);
         }
     }
 }
예제 #3
0
 public void UpdateChildListeners_vm(global::TZDriver.ViewModels.TripViewModel obj)
 {
     if (obj != cache_vm)
     {
         if (cache_vm != null)
         {
             ((global::System.ComponentModel.INotifyPropertyChanged)cache_vm).PropertyChanged -= PropertyChanged_vm;
             cache_vm = null;
         }
         if (obj != null)
         {
             cache_vm = obj;
             ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_vm;
         }
     }
 }