Beispiel #1
0
 private void Update_item(global::LostAndFound.Models.Item obj, int phase)
 {
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | (1 << 0))) != 0)
         {
             this.Update_item_Title(obj.Title, phase);
         }
     }
 }
 public bool SetDataRoot(global::System.Object newDataRoot)
 {
     this.bindingsTracking.ReleaseAllListeners();
     if (newDataRoot != null)
     {
         this.dataRoot = (global::LostAndFound.Models.Item)newDataRoot;
         return(true);
     }
     return(false);
 }
                public void PropertyChanged_(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    userFound_obj2_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::LostAndFound.Models.Item obj = sender as global::LostAndFound.Models.Item;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_Title(obj.Title, DATA_CHANGED);
                                bindings.Update_Place(obj.Place, DATA_CHANGED);
                                bindings.Update_CreateDatetime(obj.CreateDatetime, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "Title":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_Title(obj.Title, DATA_CHANGED);
                                }
                                break;
                            }

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

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

                            default:
                                break;
                            }
                        }
                    }
                }
 // Update methods for each path node used in binding steps.
 private void Update_(global::LostAndFound.Models.Item obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_Title(obj.Title, phase);
             this.Update_Place(obj.Place, phase);
             this.Update_CreateDatetime(obj.CreateDatetime, phase);
         }
     }
 }
 private void Update_item(global::LostAndFound.Models.Item obj, int phase)
 {
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | (1 << 0))) != 0)
         {
             this.Update_item_Place(obj.Place, phase);
             this.Update_item_CreateUserName(obj.CreateUserName, phase);
             this.Update_item_CreateDatetime(obj.CreateDatetime, phase);
             this.Update_item_Content(obj.Content, phase);
             this.Update_item_Category(obj.Category, phase);
             this.Update_item_Title(obj.Title, phase);
         }
     }
 }
                public void UpdateChildListeners_(global::LostAndFound.Models.Item obj)
                {
                    userFound_obj2_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        if (bindings.dataRoot != null)
                        {
                            ((global::System.ComponentModel.INotifyPropertyChanged)bindings.dataRoot).PropertyChanged -= PropertyChanged_;
                        }
                        if (obj != null)
                        {
                            bindings.dataRoot = obj;
                            ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_;
                        }
                    }
                }