示例#1
0
 private void Update_Character(global::CharacterLibrary.CharacterInstance obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_Character(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_Character_Name(obj.Name, phase);
             this.Update_Character_Description(obj.Description, phase);
         }
     }
 }
示例#2
0
 public void UpdateChildListeners_Character(global::CharacterLibrary.CharacterInstance obj)
 {
     if (obj != cache_Character)
     {
         if (cache_Character != null)
         {
             ((global::System.ComponentModel.INotifyPropertyChanged)cache_Character).PropertyChanged -= PropertyChanged_Character;
             cache_Character = null;
         }
         if (obj != null)
         {
             cache_Character = obj;
             ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_Character;
         }
     }
 }
示例#3
0
                public void PropertyChanged_Character(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    MainPage_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::CharacterLibrary.CharacterInstance obj = sender as global::CharacterLibrary.CharacterInstance;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_Character_Name(obj.Name, DATA_CHANGED);
                                bindings.Update_Character_Description(obj.Description, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "Name":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_Character_Name(obj.Name, DATA_CHANGED);
                                }
                                break;
                            }

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

                            default:
                                break;
                            }
                        }
                    }
                }