Example #1
0
        public linkFactory(IProject project, Action destroyMethod)
        {
            _ID = new identity(eEntity.factory);
            dctLinks = new Dictionary<string, link>();

            _project = project;
            project.event_projectDelete += handler_projectDelete;

            destroyMethod = deleteThis;
        }
Example #2
0
 public ILink getLink(identity ID)
 {
     return getLink(ID.ID);
 }
Example #3
0
 public ILink createLink(identity PrecursorID, identity FollowerID, eLnkType type)
 {
     return createLink(PrecursorID, FollowerID, type, 0);
 }
Example #4
0
 public void deleteLink(identity ID)
 {
     deleteLink(ID.ID);
 }
Example #5
0
 public void copy(identity IDobject)
 {
     _ID   = new Guid(IDobject._ID.ToString());
     _type = IDobject.type;
 }
Example #6
0
        public ILink createLink(identity PrecursorID, identity FollowerID, eLnkType type, double delay)
        {
            link newLink = new link(_project,
                _project.getTaskFactory().getTask(PrecursorID),
                _project.getTaskFactory().getTask(FollowerID),
                type, delay);

            newLink.event_linkDeleted += handler_linkDelete;
            addElement(newLink);

            return newLink;
        }
Example #7
0
 public identity(identity IDobject)
     : this(IDobject.type, IDobject.ID)
 {
 }
Example #8
0
        private void onDeleteLink()
        {
            EventHandler<EA_value<identity>> handler = event_linkDeleted;
            if(handler != null) event_linkDeleted(this, new EA_value<identity>(_ID));

            tpManager.clear();
            tpManager = null;

            lnkLimit = null;

            _project.getLinkFactory().event_linkFactoryDelete -= handler_factoryDelete;
            _project = null;
            _ID = null;

            _precursor = _follower = null;
        }
Example #9
0
        public link(IProject Project, ITask Precursor, ITask Follower, eLnkType type, double delay = 0)
        {
            _ID = new identity(eEntity.link);

            _project = Project;
            _project.getLinkFactory().event_linkFactoryDelete += handler_factoryDelete;

            _precursor = Precursor;
            _follower = Follower;

            lnkLimit = new limit(link.lnk2lim(type), __hlp.initDate);
            tpManager = new typeManager(this, type, delay);
        }
Example #10
0
 public void copy(identity IDobject)
 {
     _ID = new Guid(IDobject._ID.ToString());
     _type = IDobject.type;
 }
Example #11
0
 public identity(identity IDobject)
     : this(IDobject.type, IDobject.ID)
 {
 }