HypernovaDesktop Components · docs
Binarymission
WinForms › Project Management › ProjectTask

ProjectTask

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

One task in a plan: a piece of work, a summary that groups other tasks, or a milestone.

public class ProjectTask : INotifyPropertyChanged

Inherits from / implements: INotifyPropertyChanged

Remarks

A task is a summary when another task names it as its ParentId; a summary's dates are worked out from its subtasks, so its own Start and Duration only hold the subtasks back. A task with a duration of zero, or with IsMilestone set, is a milestone. Dates are calendar dates. Only the date part of a DateTime is kept, so a value read from a database as midnight UTC and one typed as a local date plan the same day.

Members at a glance

ProjectTaskCreates an empty task. Give it at least an Id.
ProjectTaskCreates a task with an id, a name and a length in working days.
AssigneeWho is doing the work. The task board can split its lanes by this.
BaselineFinishThe originally agreed last day.
BaselineStartThe originally agreed start, drawn under the bar for comparison.
CategoryA grouping the application chooses. The task board can split its lanes by this.
ConstraintHow Start or Finish constrains the task.
DurationLength in working days. Zero makes the task a milestone. Null works it out from Start and Finish, and failing that it is one day. Negative values are read as zero.
FinishThe planned last working day. Used when Duration is null, and as the date a FinishNoEarlierThan constraint holds.
IdIdentifies the task in links, in ParentId and in every event the charts raise. Two tasks with the same id are reported as a problem, and the first is used.
IsCollapsedWhether a summary task starts with its subtasks hidden.
IsMilestoneDraws the task as a milestone, whatever its duration says.
NameWhat the task is called, which is also what it is announced as.
ParentIdThe id of the summary task this one belongs to, or null for a top-level task. An id that is not in the plan puts the task at the top level and is reported as a problem.
ProgressPercentage complete, 0 to 100. Values outside that range are clamped.
RankPosition on the task board within its column, lower first. The board writes this when a card is moved; nothing else reads it, so reordering a board never moves a date.
StartThe planned start. The task is never scheduled before it, though its links may push it later. Null lets the task start as soon as its links and the project start allow. A weekend or holiday is read as the next working day.
StatusThe workflow state, such as "To do" or "Done". The task board's columns are these.
TagAnything the application wants to keep with the task. The charts never read it.
CloneA copy of the task with every property, Tag included.
OnPropertyChangedRaises PropertyChanged.
ToStringThe name, for the debugger and for list boxes.
PropertyChangedRaised when any property changes.

Constructors

ProjectTask

public ProjectTask()

Creates an empty task. Give it at least an Id.

ProjectTask

public ProjectTask(string id, string name, int? duration

Creates a task with an id, a name and a length in working days.

id
The task's id, unique in its plan.
name
What the task is called.
duration
Length in working days; zero makes a milestone. Null for a summary.

Properties

Assignee

public string Assignee

Who is doing the work. The task board can split its lanes by this.

BaselineFinish

public DateTime? BaselineFinish

The originally agreed last day.

BaselineStart

public DateTime? BaselineStart

The originally agreed start, drawn under the bar for comparison.

Category

public string Category

A grouping the application chooses. The task board can split its lanes by this.

Constraint

public TaskConstraintKind Constraint

How Start or Finish constrains the task.

Duration

public int? Duration

Length in working days. Zero makes the task a milestone. Null works it out from Start and Finish, and failing that it is one day. Negative values are read as zero.

Finish

public DateTime? Finish

The planned last working day. Used when Duration is null, and as the date a FinishNoEarlierThan constraint holds.

Id

public string Id

Identifies the task in links, in ParentId and in every event the charts raise. Two tasks with the same id are reported as a problem, and the first is used.

IsCollapsed

public bool IsCollapsed

Whether a summary task starts with its subtasks hidden.

IsMilestone

public bool IsMilestone

Draws the task as a milestone, whatever its duration says.

Name

public string Name

What the task is called, which is also what it is announced as.

ParentId

public string ParentId

The id of the summary task this one belongs to, or null for a top-level task. An id that is not in the plan puts the task at the top level and is reported as a problem.

Progress

public double Progress

Percentage complete, 0 to 100. Values outside that range are clamped.

Rank

public double? Rank

Position on the task board within its column, lower first. The board writes this when a card is moved; nothing else reads it, so reordering a board never moves a date.

Start

public DateTime? Start

The planned start. The task is never scheduled before it, though its links may push it later. Null lets the task start as soon as its links and the project start allow. A weekend or holiday is read as the next working day.

Status

public string Status

The workflow state, such as "To do" or "Done". The task board's columns are these.

Tag

public object Tag

Anything the application wants to keep with the task. The charts never read it.

Methods

Clone

public ProjectTask Clone()

A copy of the task with every property, Tag included.

Returns. The copy.

OnPropertyChanged

protected virtual void OnPropertyChanged(string propertyName)

Raises PropertyChanged.

propertyName
The property that changed.

ToString

public override string ToString()

The name, for the debugger and for list boxes.

Returns. The task's name, or its id when it has none.

Events

PropertyChanged

public event PropertyChangedEventHandler PropertyChanged

Raised when any property changes.