Gantt Chart Control  1.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Braincase.GanttChart.Chart Class Reference

Gantt Chart control More...

Inherits UserControl.

Public Member Functions

 Chart ()
 Construct a gantt chart More...
 
bool TryGetRow (Task task, out int row)
 Get the line number of the specified task More...
 
bool TryGetTask (int row, out Task task)
 Get the task at the specified line number More...
 
void Init (ProjectManager< Task, object > project)
 Initialize this Chart with a Project More...
 
void Print (PrintDocument document, float scale=1.0f)
 Print the Chart to the specified PrintDocument. More...
 
Bitmap Print (float scale=1.0f)
 Print the Chart to the specified Image More...
 
ChartInfo GetChartInfo (Point mouse)
 Get information about the chart area at the mouse coordinate of the chart More...
 
void SetToolTip (Task task, string text)
 Set tool tip for the specified task More...
 
string GetToolTip (Task task)
 Get tool tip currently set for the specified task More...
 
void ClearToolTip (Task task)
 Clear tool tip for the specified task More...
 
void ClearToolTips ()
 Clear all tool tips More...
 
void ScrollTo (DateTime datetime)
 Scroll to the specified DateTime More...
 
void ScrollTo (Task task)
 Scroll to the specified task More...
 
void BeginBillboardMode (Graphics graphics)
 Begin billboard mode. Graphics must orginate from Chart and be same as that used in EndBillboardMode. More...
 
void EndBillboardMode (Graphics graphics)
 End billboard mode. Graphics must orginate from Chart and be same as that used in BeginBillboardMode. More...
 

Public Attributes

Func< TaskCreateTaskDelegate = delegate() { return new Task(); }
 Delegate method for creating a new Task. Creates Task by default. More...
 

Protected Member Functions

override void OnPaint (PaintEventArgs e)
 Raises the System.Windows.Forms.Control.Paint event More...
 
override void OnMouseMove (MouseEventArgs e)
 Raises the System.Windows.Forms.Control.MouseMove event More...
 
override void OnMouseClick (MouseEventArgs e)
 Raises the System.Windows.Forms.Control.MouseClick event More...
 
override void OnMouseDown (MouseEventArgs e)
 Raises the System.Windows.Forms.Control.MouseDown event More...
 
override void OnMouseUp (MouseEventArgs e)
 Raises the System.Windows.Forms.Control.MouseUp event More...
 
override void OnMouseDoubleClick (MouseEventArgs e)
 Raises the System.Windows.Forms.Control.MouseDoubleClick event More...
 
virtual void OnTaskMouseOver (TaskMouseEventArgs e)
 Raises the TaskMouseOver event More...
 
virtual void OnTaskMouseOut (TaskMouseEventArgs e)
 Raises the TaskMouseOver event More...
 
virtual void OnTaskMouseDrag (TaskDragDropEventArgs e)
 Raises the TaskMouseDrag( event More...
 
virtual void OnTaskMouseDrop (TaskDragDropEventArgs e)
 Raises the TaskMouseDrop event More...
 
virtual void OnTaskMouseClick (TaskMouseEventArgs e)
 Raises the TaskMouseClick event More...
 
virtual void OnTaskMouseDoubleClick (TaskMouseEventArgs e)
 Raises the TaskMouseDoubleClick event More...
 
virtual void OnTaskSelected (TaskMouseEventArgs e)
 Raises the TaskSelected event More...
 
virtual void OnTaskDeselecting (TaskMouseEventArgs e)
 Raises the TaskDeselecting event More...
 
virtual void OnPaintOverlay (ChartPaintEventArgs e)
 Raises the PaintOverlay event More...
 
override void Dispose (bool disposing)
 Clean up any resources being used. More...
 

Properties

IEnumerable< TaskSelectedTasks [get]
 Get the selected tasks More...
 
Task SelectedTask [get]
 Get the latest selected task More...
 
int HeaderOneHeight [get, set]
 Get or set header1 pixel height More...
 
string FullDateStringFormat [get, set]
 Get or set the DateTime string format. Default value is D/M/YYYY More...
 
int HeaderTwoHeight [get, set]
 Get or set header2 pixel height More...
 
int BarSpacing [get, set]
 Get or set pixel distance from top of each Task to the next More...
 
int BarHeight [get, set]
 Get or set pixel height of each Task More...
 
int BarWidth [get, set]
 Get or set pixel width of each unit of period More...
 
TaskFormat TaskFormat [get, set]
 Get or set format for Tasks More...
 
TaskFormat CriticalTaskFormat [get, set]
 Get or set format for critical Tasks More...
 
HeaderFormat HeaderFormat [get, set]
 Get or set format for headers More...
 
RelationFormat RelationFormat [get, set]
 Get or set format for relations More...
 
bool AllowTaskDragDrop [get, set]
 Get or set whether dragging of Tasks is allowed. Set to false when not dragging to skip drag(drop) tracking. More...
 
bool ShowRelations [get, set]
 Get or set whether to show relations More...
 
bool ShowTaskLabels [get, set]
 Get or set whether to show task labels More...
 
bool AccumulateRelationsOnGroup [get, set]
 Get or set whether to accumulate relations on group tasks and show relations even when group is collapsed. (Not working well; still improving on it) More...
 
bool ShowSlack [get, set]
 Get or set whether to show slack More...
 
TimeScaleDisplay TimeScaleDisplay [get, set]
 Get or set the time scale display format More...
 

Events

EventHandler< TaskMouseEventArgsTaskMouseOver = null
 Occurs when the mouse is moving over a Task More...
 
EventHandler< TaskMouseEventArgsTaskMouseOut = null
 Occurs when the mouse leaves a Task More...
 
EventHandler< TaskMouseEventArgsTaskMouseClick = null
 Occurs when a Task is clicked More...
 
EventHandler< TaskMouseEventArgsTaskMouseDoubleClick = null
 Occurs when a Task is double clicked by the mouse More...
 
EventHandler
< TaskDragDropEventArgs
TaskMouseDrag = null
 Occurs when a Task is being dragged by the mouse More...
 
EventHandler
< TaskDragDropEventArgs
TaskMouseDrop = null
 Occurs when a dragged Task is being dropped by releasing any previously pressed mouse button. More...
 
EventHandler< TaskMouseEventArgsTaskSelected = null
 Occurs when a task is selected. More...
 
EventHandler< TaskMouseEventArgsTaskDeselecting = null
 Occurs before one or more tasks are being deselected. All Task in Chart.SelectedTasks will be deselected. More...
 
EventHandler< TaskPaintEventArgsPaintTask = null
 Occurs before a Task gets painted More...
 
EventHandler< ChartPaintEventArgsPaintOverlay = null
 Occurs before overlays get painted More...
 
EventHandler
< HeaderPaintEventArgs
PaintHeader = null
 Occurs before the header gets painted More...
 

Detailed Description

Gantt Chart control

Constructor & Destructor Documentation

Braincase.GanttChart.Chart.Chart ( )

Construct a gantt chart

Member Function Documentation

void Braincase.GanttChart.Chart.BeginBillboardMode ( Graphics  graphics)

Begin billboard mode. Graphics must orginate from Chart and be same as that used in EndBillboardMode.

Parameters
graphics
void Braincase.GanttChart.Chart.ClearToolTip ( Task  task)

Clear tool tip for the specified task

Parameters
task
void Braincase.GanttChart.Chart.ClearToolTips ( )

Clear all tool tips

override void Braincase.GanttChart.Chart.Dispose ( bool  disposing)
protected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.
void Braincase.GanttChart.Chart.EndBillboardMode ( Graphics  graphics)

End billboard mode. Graphics must orginate from Chart and be same as that used in BeginBillboardMode.

Parameters
graphics
ChartInfo Braincase.GanttChart.Chart.GetChartInfo ( Point  mouse)

Get information about the chart area at the mouse coordinate of the chart

Parameters
mouse
Returns
string Braincase.GanttChart.Chart.GetToolTip ( Task  task)

Get tool tip currently set for the specified task

Parameters
task
text
Returns
void Braincase.GanttChart.Chart.Init ( ProjectManager< Task, object >  project)

Initialize this Chart with a Project

Parameters
project
override void Braincase.GanttChart.Chart.OnMouseClick ( MouseEventArgs  e)
protected

Raises the System.Windows.Forms.Control.MouseClick event

Parameters
e
override void Braincase.GanttChart.Chart.OnMouseDoubleClick ( MouseEventArgs  e)
protected

Raises the System.Windows.Forms.Control.MouseDoubleClick event

Parameters
e
override void Braincase.GanttChart.Chart.OnMouseDown ( MouseEventArgs  e)
protected

Raises the System.Windows.Forms.Control.MouseDown event

Parameters
e
override void Braincase.GanttChart.Chart.OnMouseMove ( MouseEventArgs  e)
protected

Raises the System.Windows.Forms.Control.MouseMove event

Parameters
e
override void Braincase.GanttChart.Chart.OnMouseUp ( MouseEventArgs  e)
protected

Raises the System.Windows.Forms.Control.MouseUp event

Parameters
e
override void Braincase.GanttChart.Chart.OnPaint ( PaintEventArgs  e)
protected

Raises the System.Windows.Forms.Control.Paint event

Parameters
e
virtual void Braincase.GanttChart.Chart.OnPaintOverlay ( ChartPaintEventArgs  e)
protectedvirtual

Raises the PaintOverlay event

Parameters
e
virtual void Braincase.GanttChart.Chart.OnTaskDeselecting ( TaskMouseEventArgs  e)
protectedvirtual

Raises the TaskDeselecting event

Parameters
e
virtual void Braincase.GanttChart.Chart.OnTaskMouseClick ( TaskMouseEventArgs  e)
protectedvirtual

Raises the TaskMouseClick event

Parameters
e
virtual void Braincase.GanttChart.Chart.OnTaskMouseDoubleClick ( TaskMouseEventArgs  e)
protectedvirtual

Raises the TaskMouseDoubleClick event

Parameters
e
virtual void Braincase.GanttChart.Chart.OnTaskMouseDrag ( TaskDragDropEventArgs  e)
protectedvirtual

Raises the TaskMouseDrag( event

Parameters
e
virtual void Braincase.GanttChart.Chart.OnTaskMouseDrop ( TaskDragDropEventArgs  e)
protectedvirtual

Raises the TaskMouseDrop event

Parameters
e
virtual void Braincase.GanttChart.Chart.OnTaskMouseOut ( TaskMouseEventArgs  e)
protectedvirtual

Raises the TaskMouseOver event

Parameters
e
virtual void Braincase.GanttChart.Chart.OnTaskMouseOver ( TaskMouseEventArgs  e)
protectedvirtual

Raises the TaskMouseOver event

Parameters
e
virtual void Braincase.GanttChart.Chart.OnTaskSelected ( TaskMouseEventArgs  e)
protectedvirtual

Raises the TaskSelected event

Parameters
e
void Braincase.GanttChart.Chart.Print ( PrintDocument  document,
float  scale = 1.0f 
)

Print the Chart to the specified PrintDocument.

Bitmap Braincase.GanttChart.Chart.Print ( float  scale = 1.0f)

Print the Chart to the specified Image

Parameters
scaleScale to print the image at.
void Braincase.GanttChart.Chart.ScrollTo ( DateTime  datetime)

Scroll to the specified DateTime

Parameters
datetime
void Braincase.GanttChart.Chart.ScrollTo ( Task  task)

Scroll to the specified task

Parameters
task
void Braincase.GanttChart.Chart.SetToolTip ( Task  task,
string  text 
)

Set tool tip for the specified task

Parameters
task
text
bool Braincase.GanttChart.Chart.TryGetRow ( Task  task,
out int  row 
)

Get the line number of the specified task

Parameters
task
row
Returns
bool Braincase.GanttChart.Chart.TryGetTask ( int  row,
out Task  task 
)

Get the task at the specified line number

Parameters
row
task
Returns

Member Data Documentation

Func<Task> Braincase.GanttChart.Chart.CreateTaskDelegate = delegate() { return new Task(); }

Delegate method for creating a new Task. Creates Task by default.

Property Documentation

bool Braincase.GanttChart.Chart.AccumulateRelationsOnGroup
getset

Get or set whether to accumulate relations on group tasks and show relations even when group is collapsed. (Not working well; still improving on it)

bool Braincase.GanttChart.Chart.AllowTaskDragDrop
getset

Get or set whether dragging of Tasks is allowed. Set to false when not dragging to skip drag(drop) tracking.

int Braincase.GanttChart.Chart.BarHeight
getset

Get or set pixel height of each Task

int Braincase.GanttChart.Chart.BarSpacing
getset

Get or set pixel distance from top of each Task to the next

int Braincase.GanttChart.Chart.BarWidth
getset

Get or set pixel width of each unit of period

TaskFormat Braincase.GanttChart.Chart.CriticalTaskFormat
getset

Get or set format for critical Tasks

string Braincase.GanttChart.Chart.FullDateStringFormat
getset

Get or set the DateTime string format. Default value is D/M/YYYY

HeaderFormat Braincase.GanttChart.Chart.HeaderFormat
getset

Get or set format for headers

int Braincase.GanttChart.Chart.HeaderOneHeight
getset

Get or set header1 pixel height

int Braincase.GanttChart.Chart.HeaderTwoHeight
getset

Get or set header2 pixel height

RelationFormat Braincase.GanttChart.Chart.RelationFormat
getset

Get or set format for relations

Task Braincase.GanttChart.Chart.SelectedTask
get

Get the latest selected task

IEnumerable<Task> Braincase.GanttChart.Chart.SelectedTasks
get

Get the selected tasks

bool Braincase.GanttChart.Chart.ShowRelations
getset

Get or set whether to show relations

bool Braincase.GanttChart.Chart.ShowSlack
getset

Get or set whether to show slack

bool Braincase.GanttChart.Chart.ShowTaskLabels
getset

Get or set whether to show task labels

TaskFormat Braincase.GanttChart.Chart.TaskFormat
getset

Get or set format for Tasks

TimeScaleDisplay Braincase.GanttChart.Chart.TimeScaleDisplay
getset

Get or set the time scale display format

Event Documentation

EventHandler<HeaderPaintEventArgs> Braincase.GanttChart.Chart.PaintHeader = null

Occurs before the header gets painted

EventHandler<ChartPaintEventArgs> Braincase.GanttChart.Chart.PaintOverlay = null

Occurs before overlays get painted

EventHandler<TaskPaintEventArgs> Braincase.GanttChart.Chart.PaintTask = null

Occurs before a Task gets painted

EventHandler<TaskMouseEventArgs> Braincase.GanttChart.Chart.TaskDeselecting = null

Occurs before one or more tasks are being deselected. All Task in Chart.SelectedTasks will be deselected.

EventHandler<TaskMouseEventArgs> Braincase.GanttChart.Chart.TaskMouseClick = null

Occurs when a Task is clicked

EventHandler<TaskMouseEventArgs> Braincase.GanttChart.Chart.TaskMouseDoubleClick = null

Occurs when a Task is double clicked by the mouse

EventHandler<TaskDragDropEventArgs> Braincase.GanttChart.Chart.TaskMouseDrag = null

Occurs when a Task is being dragged by the mouse

EventHandler<TaskDragDropEventArgs> Braincase.GanttChart.Chart.TaskMouseDrop = null

Occurs when a dragged Task is being dropped by releasing any previously pressed mouse button.

EventHandler<TaskMouseEventArgs> Braincase.GanttChart.Chart.TaskMouseOut = null

Occurs when the mouse leaves a Task

EventHandler<TaskMouseEventArgs> Braincase.GanttChart.Chart.TaskMouseOver = null

Occurs when the mouse is moving over a Task

EventHandler<TaskMouseEventArgs> Braincase.GanttChart.Chart.TaskSelected = null

Occurs when a task is selected.


The documentation for this class was generated from the following files: