HypernovaDesktop Components · docs
Binarymission
WPF › Project Management › ScheduledTask

ScheduledTask

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

One task as scheduled: the dates the links allow, how much it can slip, whether it is critical, and where it sits in the outline.

public sealed class ScheduledTask

Remarks

Dates and indexes

Start, Finish, LateStartDate and LateFinishDate are calendar dates, and inclusive: the first and last working days of the task. The Early and Late values are the same thing as positions in the count of working days of ProjectSchedule.Calendar (index 0 is its Origin). On that count a task occupies [EarlyStart, EarlyFinish): EarlyFinish is the first index after the task, which is exactly where a finish-to-start successor begins. Use the indexes for arithmetic and the dates for display.

Float and the critical path

TotalFloat is how many working days the task can slip before the project's finish moves; FreeFloat how many before any task after it moves. A task with no total float is IsCritical: any delay to it delays the whole plan.

A ScheduledTask is a snapshot, made afresh each time the plan is scheduled. Change the plan through Task, the ProjectTask it came from.

Examples

foreach (ScheduledTask task in schedule.Tasks)
{
    string indent = new string(' ', task.Depth * 2);
    Console.WriteLine("{0}{1} {2}: {3:d} to {4:d}, {5} days, float {6}{7}",
        indent, task.Wbs, task.Name, task.Start, task.Finish, task.Duration,
        task.TotalFloat, task.IsCritical ? " (critical)" : "");
}

See also

Members at a glance

Properties
AssigneeGets the task's ProjectTask.Assignee.
BaselineFinishGets the task's ProjectTask.BaselineFinish: the originally agreed last day, or null.
BaselineStartGets the task's ProjectTask.BaselineStart: the originally agreed start, or null.
CategoryGets the task's ProjectTask.Category.
ChildrenGets the ids of the tasks directly under this one.
DepthGets how deep the task sits in the outline.
DurationGets the task's length in working days.
EarlyFinishGets the earliest the task can finish, as a working-day index.
EarlyStartGets the earliest the task can start, as a working-day index.
FinishGets the last working day the task is scheduled on.
FreeFloatGets how many working days the task can slip without moving any task that follows it.
IdGets the task's ProjectTask.Id.
IsCollapsedGets whether a summary asked to start with its subtasks hidden (ProjectTask.IsCollapsed). Always false for a task that is not a summary.
IsCriticalGets whether the task is on the critical path: it has no float, so any delay to it delays the whole plan.
IsMilestoneGets whether the task is a milestone: no length, drawn as a diamond.
IsSummaryGets whether the task has subtasks, so that its dates, length and progress are rolled up from theirs.
LateFinishGets the latest the task can finish without moving the project's finish, as a working-day index.
LateFinishDateGets the latest last day the task can have without moving the project's finish.
LateStartGets the latest the task can start without moving the project's finish, as a working-day index.
LateStartDateGets the latest first day the task can have without moving the project's finish.
NameGets the task's ProjectTask.Name, or its id when the name is null.
ParentIdGets the id of the summary the task sits under.
ProgressGets how much of the task is done, as a percentage.
StartGets the first working day the task is scheduled on.
StatusGets the task's ProjectTask.Status.
TaskGets the task this was scheduled from: the application's own object.
TotalFloatGets how many working days the task can slip without moving the project's finish.
WbsGets the task's outline number, as the Gantt chart's first column and its Predecessors cells write it.
Methods
ToStringReturns the task's name, for the debugger.

Properties

Assignee

public string Assignee

Gets the task's ProjectTask.Assignee.

BaselineFinish

public DateTime? BaselineFinish

Gets the task's ProjectTask.BaselineFinish: the originally agreed last day, or null.

BaselineStart

public DateTime? BaselineStart

Gets the task's ProjectTask.BaselineStart: the originally agreed start, or null.

Category

public string Category

Gets the task's ProjectTask.Category.

Children

public IReadOnlyList<string> Children

Gets the ids of the tasks directly under this one.

Value
The subtasks' ids in plan order; empty for a task that is not a summary. Never null.

Depth

public int Depth

Gets how deep the task sits in the outline.

Value
0 for a top-level task, 1 for its subtasks, and so on.

Duration

public int Duration

Gets the task's length in working days.

Value
For work, its own duration; 0 for a milestone; for a summary, the working days from its earliest subtask's start to its latest subtask's finish.

EarlyFinish

public int EarlyFinish

Gets the earliest the task can finish, as a working-day index.

Value
The index just after the task's last day, so EarlyFinish - EarlyStart is its Duration. The date of the last day is Finish.

EarlyStart

public int EarlyStart

Gets the earliest the task can start, as a working-day index.

Value
The index of the task's first day on ProjectSchedule.Calendar; the date is Start.

Finish

public DateTime Finish

Gets the last working day the task is scheduled on.

Value
A date with no time of day, inclusive. For a milestone, the same as Start: the day it falls on, which for a milestone that follows a finish is that finishing day.

FreeFloat

public int FreeFloat

Gets how many working days the task can slip without moving any task that follows it.

Value
Never negative. For a task with no successors – including the links out of the summaries it sits in – the room left before the project's finish. For a summary, the same as TotalFloat.

Id

public string Id

Gets the task's ProjectTask.Id.

IsCollapsed

public bool IsCollapsed

Gets whether a summary asked to start with its subtasks hidden (ProjectTask.IsCollapsed). Always false for a task that is not a summary.

IsCritical

public bool IsCritical

Gets whether the task is on the critical path: it has no float, so any delay to it delays the whole plan.

Value
For work and milestones, true when TotalFloat is zero or less. A summary is critical when any task inside it is.

IsMilestone

public bool IsMilestone

Gets whether the task is a milestone: no length, drawn as a diamond.

Value
true for a task with a duration of zero or with ProjectTask.IsMilestone set; always false for a summary.

IsSummary

public bool IsSummary

Gets whether the task has subtasks, so that its dates, length and progress are rolled up from theirs.

LateFinish

public int LateFinish

Gets the latest the task can finish without moving the project's finish, as a working-day index.

Value
The index just after the latest last day; the date is LateFinishDate.

LateFinishDate

public DateTime LateFinishDate

Gets the latest last day the task can have without moving the project's finish.

LateStart

public int LateStart

Gets the latest the task can start without moving the project's finish, as a working-day index.

Value
The date is LateStartDate.

LateStartDate

public DateTime LateStartDate

Gets the latest first day the task can have without moving the project's finish.

Name

public string Name

Gets the task's ProjectTask.Name, or its id when the name is null.

ParentId

public string ParentId

Gets the id of the summary the task sits under.

Value
The parent's id, or null for a top-level task – including one whose ProjectTask.ParentId was refused as unknown or circular.

Progress

public double Progress

Gets how much of the task is done, as a percentage.

Value
From 0 to 100. For work, the task's ProjectTask.Progress brought into that range; for a summary, the progress of the work inside it weighted by duration, to one decimal place.

Start

public DateTime Start

Gets the first working day the task is scheduled on.

Value
A date with no time of day. For a milestone, the day it falls on.

Status

public string Status

Gets the task's ProjectTask.Status.

Task

public ProjectTask Task

Gets the task this was scheduled from: the application's own object.

TotalFloat

public int TotalFloat

Gets how many working days the task can slip without moving the project's finish.

Value
LateStart - EarlyStart. Zero on the critical path; negative when a date the task must start on already makes the plan late. For a summary, the least float of any work inside it.

Wbs

public string Wbs

Gets the task's outline number, as the Gantt chart's first column and its Predecessors cells write it.

Value
Text such as 1, 1.2 or 1.2.3, numbered in plan order from 1 at each level.

Methods

ToString

public override string ToString()

Returns the task's name, for the debugger.

Returns

The Name.