Esempio n. 1
0
                public void PropertyChanged__vm(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    TravelPlanPage_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::TravelApp.ViewModels.TravelPlanViewModel obj = sender as global::TravelApp.ViewModels.TravelPlanViewModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update__vm_UserName(obj.UserName, DATA_CHANGED);
                                bindings.Update__vm_SelectedItem(obj.SelectedItem, DATA_CHANGED);
                                bindings.Update__vm_ControlButtonsVisible(obj.ControlButtonsVisible, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "UserName":
                            {
                                if (obj != null)
                                {
                                    bindings.Update__vm_UserName(obj.UserName, DATA_CHANGED);
                                }
                                break;
                            }

                            case "SelectedItem":
                            {
                                if (obj != null)
                                {
                                    bindings.Update__vm_SelectedItem(obj.SelectedItem, DATA_CHANGED);
                                }
                                break;
                            }

                            case "ControlButtonsVisible":
                            {
                                if (obj != null)
                                {
                                    bindings.Update__vm_ControlButtonsVisible(obj.ControlButtonsVisible, DATA_CHANGED);
                                }
                                break;
                            }

                            default:
                                break;
                            }
                        }
                    }
                }
Esempio n. 2
0
 public void UpdateChildListeners__vm(global::TravelApp.ViewModels.TravelPlanViewModel 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;
         }
     }
 }
Esempio n. 3
0
 private void Update__vm(global::TravelApp.ViewModels.TravelPlanViewModel obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners__vm(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update__vm_UserName(obj.UserName, phase);
         }
         if ((phase & (NOT_PHASED | (1 << 0))) != 0)
         {
             this.Update__vm_Travelplans(obj.Travelplans, phase);
         }
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update__vm_SelectedItem(obj.SelectedItem, phase);
             this.Update__vm_ControlButtonsVisible(obj.ControlButtonsVisible, phase);
         }
     }
 }