Ejemplo n.º 1
0
 public TreeChangeEventArgs(
     EntityTreeEventTiming enTiming,
     EntityTreeChangeInfo oChangeInfo)
 {
     this.Timing     = enTiming;
     this.ChangeInfo = oChangeInfo;
 }
Ejemplo n.º 2
0
 public void PostTreeChange(EntityTreeChangeInfo oChangeInfo)
 {
     TreeChangeNotify(
         EntityTreeEventTiming.PostChange,
         oChangeInfo
         );
 }
Ejemplo n.º 3
0
 private void PreTreeChange(EntityTreeChangeInfo oChangeInfo)
 {
     TreeChangeNotify(
         EntityTreeEventTiming.PreChange,
         oChangeInfo
         );
 }
Ejemplo n.º 4
0
 private void FireTreeChangeEvent(
     EntityTreeEventTiming enTiming,
     EntityTreeChangeInfo oChangeInfo)
 {
     if (this.OnTreeChange != null)
     {
         OnTreeChange(
             new TreeChangeEventArgs(enTiming, oChangeInfo)
             );
     }
 }
Ejemplo n.º 5
0
            public AutoTreeChangeNotify(
                IEntityBase oTarget,
                EntityTreeChange enChange,
                IEntityBase oParentEntity,
                IEntityBase oChildEntity,
                EntityRelation enParentChildRelation,
                object oAdditionalInfo)
            {
                m_oTarget = oTarget;

                m_oChangeInfo = m_oTarget.PreTreeChange(
                    enChange,
                    oParentEntity,
                    oChildEntity,
                    enParentChildRelation,
                    oAdditionalInfo);
            }
Ejemplo n.º 6
0
        public EntityTreeChangeInfo PostTreeChange(
            EntityTreeChange enChange,
            IEntityBase oParentEntity,
            IEntityBase oChildEntity,
            EntityRelation enParentChildRelation,
            object oAdditionalInfo)
        {
            EntityTreeChangeInfo oChangeInfo = new EntityTreeChangeInfo(
                enChange,
                oParentEntity,
                oChildEntity,
                enParentChildRelation,
                oAdditionalInfo);

            PostTreeChange(oChangeInfo);

            return(oChangeInfo);
        }
Ejemplo n.º 7
0
        public virtual void TreeChangeNotify(
            EntityTreeEventTiming enTiming,
            EntityTreeChangeInfo oChangeInfo)
        {
            // Fire event
            FireTreeChangeEvent(
                enTiming,
                oChangeInfo);

            // Call 'Template method' event
            OnTreeChangeHandler(
                enTiming,
                oChangeInfo);

            IEntityBase oParent = OwnerParent as IEntityBase;

            if (oParent != null)
            {
                // Notify parent
                oParent.TreeChangeNotify(
                    enTiming,
                    oChangeInfo);
            }
        }
Ejemplo n.º 8
0
 // May be overriden in inherited entities
 protected virtual void OnTreeChangeHandler(
     EntityTreeEventTiming enTiming,
     EntityTreeChangeInfo oChangeInfo)
 {
 }