HypernovaDesktop Components · docs
Binarymission
WPF › Project Management › ProjectSchedule

ProjectSchedule

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.ProjectManagement

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
CalendarGets the working calendar the plan was scheduled on: the one the Early and Late indexes of each ScheduledTask count on.
CriticalPathGets the ids of the critical work – tasks and milestones, not summaries – in date order.
LinksGets the links that were honoured, in the order they were given.
ProblemsGets everything in the input that could not be used as written, and what was done about it.
ProjectDurationGets the plan's length in working days, from ProjectStart to the end of the last task.
ProjectFinishGets the last day any task is scheduled on: the date the plan finishes.
ProjectStartGets the first working day of the earliest task.
RootsGets the ids of the top-level tasks, in plan order.
TasksGets every task in outline order: each summary followed by its subtasks, as the Gantt chart lists them with every summary open.
Methods
FindFinds a scheduled task by its id.

Properties

Calendar

public WorkCalendar Calendar

Gets the working calendar the plan was scheduled on: the one the Early and Late indexes of each ScheduledTask count on.

CriticalPath

public IReadOnlyList<string> CriticalPath

Gets the ids of the critical work – tasks and milestones, not summaries – in date order.

Value
The ids of every task whose ScheduledTask.IsCritical is true, ordered by start, then finish, then plan order. Never null.

Problems

public IReadOnlyList<ScheduleProblem> 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

public int ProjectDuration

Gets the plan's length in working days, from ProjectStart to the end of the last task.

ProjectFinish

public DateTime 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

public DateTime 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

public IReadOnlyList<string> Roots

Gets the ids of the top-level tasks, in plan order.

Value
Never null. Each one's subtasks are in its ScheduledTask.Children.

Tasks

public IReadOnlyList<ScheduledTask> 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

public ScheduledTask Find(string id)

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.