Ejemplo n.º 1
0
        public void setLink(e_linkType tLink)
        {
            e_sideType precSide = __hlp.getSideType(_link, e_linkObject.precursor);

            if (precSide == e_sideType.Finish_) _parent.event_finishChanged += __precursor_Handler;
            else _parent.event_startChanged += __precursor_Handler;
        }
Ejemplo n.º 2
0
        public static e_sideType getSideType(e_linkType type, e_linkObject tObject)
        {
            KeyValuePair <e_sideType, e_sideType> result = decomposeLink(type);
            e_sideType precursor = result.Key;
            e_sideType follower  = result.Value;

            return((tObject == e_linkObject.follower) ? follower : precursor);
        }
Ejemplo n.º 3
0
 protected virtual void linkDates(IPeriod precursor, IPeriod follower, e_linkType lType)
 {
     if (enabled != true) return;
     _parent = precursor;
     _child = follower;
     _type = lType;
     //_sideChild = __hlp.getSideType(lType, e_linkObject.follower);
     //_sideParent = __hlp.getSideType(lType, e_linkObject.precursor);
     linkDates();
 }
Ejemplo n.º 4
0
        protected bool setLinkType(e_linkType lType)
        {
            if (!enabled)
            {
                return(false);
            }


            return(false);
        }
Ejemplo n.º 5
0
        public void setLink(e_linkType tLink)
        {
            e_sideType precSide = __hlp.getSideType(_link, e_linkObject.precursor);

            if (precSide == e_sideType.Finish_)
            {
                _parent.event_finishChanged += __precursor_Handler;
            }
            else
            {
                _parent.event_startChanged += __precursor_Handler;
            }
        }
Ejemplo n.º 6
0
 protected virtual void linkDates(IPeriod precursor, IPeriod follower, e_linkType lType)
 {
     if (enabled != true)
     {
         return;
     }
     _parent = precursor;
     _child  = follower;
     _type   = lType;
     //_sideChild = __hlp.getSideType(lType, e_linkObject.follower);
     //_sideParent = __hlp.getSideType(lType, e_linkObject.precursor);
     linkDates();
 }
Ejemplo n.º 7
0
        protected virtual void resetLink()
        {
            _parent.event_finishChanged -= _handler_precursorDateChanged;
            _parent.event_startChanged  -= _handler_precursorDateChanged;

            _child.event_finishChanged -= _handler_followerDateChanged;
            _child.event_startChanged  -= _handler_followerDateChanged;

            _child  = null;
            _parent = null;

            _type       = e_linkType.none;
            _sideChild  = (int)0;
            _sideParent = (int)0;

            datePrecursor = null;
            dateFollower  = null;
        }
Ejemplo n.º 8
0
        public static KeyValuePair <e_sideType, e_sideType> decomposeLink(e_linkType link)
        {
            switch (link)
            {
            case e_linkType.FinishFinish:
                return(new KeyValuePair <e_sideType, e_sideType>(e_sideType.Finish_, e_sideType._Finish));

            case e_linkType.FinishStart:
                return(new KeyValuePair <e_sideType, e_sideType>(e_sideType.Finish_, e_sideType._Start));

            case e_linkType.StartStart:
                return(new KeyValuePair <e_sideType, e_sideType>(e_sideType.Start_, e_sideType._Start));

            case e_linkType.StartFinish:
                return(new KeyValuePair <e_sideType, e_sideType>(e_sideType.Start_, e_sideType._Finish));

            default:
                throw new Exception("argument link has no value");
            }
        }
Ejemplo n.º 9
0
        protected bool setLinkType(e_linkType lType)
        {
            if(!enabled) return false;

            return false;
        }
Ejemplo n.º 10
0
        protected virtual void resetLink()
        {
            _parent.event_finishChanged -= _handler_precursorDateChanged;
            _parent.event_startChanged -= _handler_precursorDateChanged;

            _child.event_finishChanged -= _handler_followerDateChanged;
            _child.event_startChanged -= _handler_followerDateChanged;

            _child = null;
            _parent = null;

            _type = e_linkType.none;
            _sideChild = (int)0;
            _sideParent = (int)0;

            datePrecursor = null;
            dateFollower = null;
        }