public Hashtable TopologischeSorte(Hashtable arbeitPacket) { List<Task> sortierte = new List<Task>(); int ohne = 0; foreach (Object key in keys) { Task task = (Task)ArbeitPacketReverse[key]; if (task.Vorgang.Count == 0) { sortierte.Insert(0, task); ohne++; } else { int i = 0; int count = task.Vorgang.Count; while (count > 0 && i < sortierte.Count) { if (task.Vorgang.Contains(sortierte[i])) { count--; } i++; } if (count != 0) sortierte.Insert(ohne, task); else sortierte.Insert(i, task); } } textBox1.Text += "************************"; Hashtable reverse = new Hashtable(); foreach (Task t in sortierte.Reverse<Task>()) { if (reverse.Count == 0) { t.SE = t.FE; t.SA = t.SE - t.Dauer; textBox1.Text += "REVERSE: ..." + t + "- "; reverse.Add(t.Name, t); } else { t.computeTermin2(); textBox1.Text += "REVERSE: ..." + t + "- "; reverse.Add(t.Name, t); //} } return reverse; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)