private void buttonDrawDiagram_Click(object sender, EventArgs e) { DataTable dt = (DataTable)dataGridViewTasks.DataSource; List<PeriodicTask> taskSet = new List<PeriodicTask>(); foreach (DataRow dr in dt.Rows) taskSet.Add(new PeriodicTask(dr)); long LCM = GetLCM_forWorkload(dt); FormTimeDiagram form = new FormTimeDiagram(); form.SetTask(taskSet[0], 0, LCM); form.ShowDialog(); }
private void buttonSchduleEDF_Click(object sender, EventArgs e) { DataTable dt = (DataTable)dataGridViewTasks.DataSource; List<PeriodicTask> taskSet = new List<PeriodicTask>(); foreach (DataRow dr in dt.Rows) taskSet.Add(new PeriodicTask(dr)); long LCM = GetLCM_forWorkload(dt); Scheduler edf = new Scheduler(taskSet, 0, LCM); edf.ScheduleEDF(); FormTimeDiagram form = new FormTimeDiagram(); form.SetTask(edf.ListListEventOutput, 0, LCM); form.ShowDialog(); }