Beispiel #1
0
 public completeLink getNewLink(lineClass master, lineClass slave, e_TskLim limitType)
 {
     completeLink cLink = new completeLink();
     cLink.slave = slave;
     cLink.master = master;
     cLink.reinitLink(limitType);
     return cLink;
 }
Beispiel #2
0
        public bool addLineClass(lineClass lClass, int number)
        {
            if (number <= 0 || number > array.Length || lClass == null) return false;
            int[] indexes = getRandomCells(number);

            for (int i = 0; i < indexes.Length; i++)
            {
                e_DependType depend = getRandomDepend();
                if (depend == e_DependType.Master) array[indexes[i]].master = lClass;
                else array[indexes[i]].slave = lClass;
                array[indexes[i]].reinitLink(array[indexes[i]].link.GetLimit());
            }
            return true;
        }
        public testLinkManager(lineClass myTask = null)
        {
            if (myTask == null)
                myTask = new lineClass(new DateTime(2010, 5, 1), 30);
            else this.myTask = myTask;

            color = new colorOut(); 
            color.addObject(1, ConsoleColor.Red);

            lManager = new linkManager(myTask);

            lManager.event_linkAdded += handler_linkAdded;
            lManager.event_linkDeleted += handler_linkDeleted;
            lManager.event_activeLinkDateChanged += handler_activeLinkDateChanged;
            lManager.event_newActiveLink += handler_newActiveLink;
        }
Beispiel #4
0
 public void reinitSlave(DateTime slaveStart, double slaveDuration)
 {
     slave = new lineClass(slaveStart, slaveDuration);
 }
Beispiel #5
0
 public void reinitMaster(DateTime masterStart, double masterDuration)
 {
     master = new lineClass(masterStart, masterDuration);
 }
Beispiel #6
0
 public completeLink(DateTime masterStart, double masterDuration, DateTime slaveStart, double slaveDuration,
     e_TskLim linkDependType)
 {
     master = new lineClass(masterStart, masterDuration);
     slave = new lineClass(slaveStart, slaveDuration);
     link = new simpleLink(master, master, slave, slave, linkDependType);
 }