ProjectSchedule
A plan as scheduled: every task's dates and float, the links that were honoured, the critical path, the project's start and finish, and anything in the input that could not be used.
public sealed class ProjectSchedule
Remarks
Get one from ProjectScheduler.Schedule(), or from a chart's
Schedule property, which is the schedule the chart is drawing. A schedule is a snapshot: it
does not change when the plan does. Schedule again (or read the chart's property again) after a
change.
Nothing in it is ever null: an empty plan gives empty lists, and a plan with
bad data gives everything that could be scheduled plus the Problems.
Examples
ProjectSchedule schedule = gantt.Schedule;
summaryText.Text = string.Format("{0:d} to {1:d}: {2} working days",
schedule.ProjectStart, schedule.ProjectFinish, schedule.ProjectDuration);
// The work that cannot slip without moving the finish, in date order.
foreach (string id in schedule.CriticalPath)
{
ScheduledTask task = schedule.Find(id);
criticalList.Items.Add(task.Name + " - " + task.Finish.ToString("d"));
}See also
Members at a glance
| Properties | |
|---|---|
Calendar | Gets the working calendar the plan was scheduled on: the one the Early and Late
indexes of each ScheduledTask count on. |
CriticalPath | Gets the ids of the critical work – tasks and milestones, not summaries – in date order. |
Links | Gets the links that were honoured, in the order they were given. |
Problems | Gets everything in the input that could not be used as written, and what was done about it. |
ProjectDuration | Gets the plan's length in working days, from ProjectStart to the end of the last
task. |
ProjectFinish | Gets the last day any task is scheduled on: the date the plan finishes. |
ProjectStart | Gets the first working day of the earliest task. |
Roots | Gets the ids of the top-level tasks, in plan order. |
Tasks | Gets every task in outline order: each summary followed by its subtasks, as the Gantt chart lists them with every summary open. |
| Methods | |
Find | Finds a scheduled task by its id. |
Properties
Calendar
Gets the working calendar the plan was scheduled on: the one the Early and Late
indexes of each ScheduledTask count on.
CriticalPath
Gets the ids of the critical work – tasks and milestones, not summaries – in date order.
- Value
- The ids of every task whose
ScheduledTask.IsCriticalistrue, ordered by start, then finish, then plan order. Nevernull.
Links
Gets the links that were honoured, in the order they were given.
- Value
- Never
null. Links that were left out are inProblems.
Problems
Gets everything in the input that could not be used as written, and what was done about it.
- Value
- Never
null; empty for a clean plan.
See also
ProjectDuration
Gets the plan's length in working days, from ProjectStart to the end of the last
task.
ProjectFinish
Gets the last day any task is scheduled on: the date the plan finishes.
- Value
- A date with no time of day. For a plan that ends in a milestone, the milestone's date.
ProjectStart
Gets the first working day of the earliest task.
- Value
- A date with no time of day; for a plan with no work in it, the calendar's
Origin.
Roots
Gets the ids of the top-level tasks, in plan order.
- Value
- Never
null. Each one's subtasks are in itsScheduledTask.Children.
Tasks
Gets every task in outline order: each summary followed by its subtasks, as the Gantt chart lists them with every summary open.
- Value
- One entry per task that could be scheduled; a task left out as a duplicate is not here.
Never
null.
Methods
Find
Finds a scheduled task by its id.
Parameters
id- The task's
ProjectTask.Id, compared exactly.
Returns
The scheduled task, or null when id is
null or no task in the schedule has it.