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; }
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); }
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(); }
protected bool setLinkType(e_linkType lType) { if (!enabled) { return(false); } return(false); }
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; } }
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(); }
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; }
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"); } }
protected bool setLinkType(e_linkType lType) { if(!enabled) return false; return false; }