Esempio n. 1
0
 public void UnRegisterRelationProperty(string origin, NotifyBase target_owner, params string[] target_prop)
 {
     if (PropertyRelations.TryGetValue(origin, out var rel))
     {
         rel.RelatedProps.RemoveWhere(x => x.Owner == target_owner && target_prop.Contains(x.PropertyName));
     }
 }
Esempio n. 2
0
        public static                             NotifyDescriptor[] GetDescriptors(NotifyBase Sender, params string[] props)
        {
            var f = new List <NotifyDescriptor>();

            foreach (var item in props)
            {
                f.Add(new NotifyDescriptor(Sender, item));
            }
            return(f.ToArray());
        }
Esempio n. 3
0
 public void RegisterRelationProperty(string origin, NotifyBase target_owner, params string[] target_prop)
 {
     if (!PropertyRelations.TryGetValue(origin, out var rel))
     {
         PropertyRelations[origin] = rel = new PropertyRelation();
     }
     foreach (var prop in target_prop)
     {
         var desc = new NotifyDescriptor(target_owner, prop);
         if (!rel.RelatedProps.Contains(desc))
         {
             rel.RelatedProps.Add(desc);
         }
     }
 }
Esempio n. 4
0
 public void RegisterItemRelationProperty(string origin, NotifyBase target_owner, params string[] target_prop)
 {
     if (!ItemPropertyRelations.TryGetValue(origin, out var rel))
     {
         ItemPropertyRelations[origin] = rel = new PropertyRelation();
     }
     foreach (var prop in target_prop)
     {
         var temp = new NotifyDescriptor(target_owner, prop);
         if (rel.RelatedProps.Contains(temp))
         {
             continue;
         }
         rel.RelatedProps.Add(temp);
     }
 }
Esempio n. 5
0
 public NotifyDescriptor(NotifyBase Owner, string Prop)
 {
     this.Owner   = Owner;
     PropertyName = Prop;
 }