C# Class Revit.SDK.Samples.NewOpenings.CS.ITool

Abstract class use as base class of all draw tool class
Datei anzeigen Open project: AMEE/revit Class Usage Examples

Protected Properties

Property Type Description
m_backGroundPen System.Drawing.Pen
m_foreGroundPen System.Drawing.Pen
m_lines List>
m_points List
m_preMovePoint Point
m_type ToolType

Public Methods

Method Description
Draw ( Graphics graphic ) : void

Draw geometries contained in the tool. which class derived from this class must implement this abstract method

GetLines ( ) : List>

Get all lines drawn in pictureBox

ITool ( ) : System

Default constructor

OnMidMouseDown ( Graphics graphic, MouseEventArgs e ) : void

Mouse middle key down event handler

OnMouseDown ( Graphics graphic, MouseEventArgs e ) : void

Mouse down event handler

OnMouseMove ( Graphics graphic, MouseEventArgs e ) : void

Mouse move event handler

OnMouseUp ( Graphics graphic, MouseEventArgs e ) : void

Mouse up event handler

OnRightMouseClick ( Graphics graphic, MouseEventArgs e ) : void

Right mouse click event handler

Method Details

Draw() public abstract method

Draw geometries contained in the tool. which class derived from this class must implement this abstract method
public abstract Draw ( Graphics graphic ) : void
graphic System.Drawing.Graphics Graphics object, used to draw geometry
return void

GetLines() public method

Get all lines drawn in pictureBox
public GetLines ( ) : List>
return List>

ITool() public method

Default constructor
public ITool ( ) : System
return System

OnMidMouseDown() public method

Mouse middle key down event handler
public OnMidMouseDown ( Graphics graphic, MouseEventArgs e ) : void
graphic System.Drawing.Graphics Graphics object, used to draw geometry
e MouseEventArgs Mouse event argument
return void

OnMouseDown() public method

Mouse down event handler
public OnMouseDown ( Graphics graphic, MouseEventArgs e ) : void
graphic System.Drawing.Graphics Graphics object, used to draw geometry
e MouseEventArgs Mouse event argument
return void

OnMouseMove() public method

Mouse move event handler
public OnMouseMove ( Graphics graphic, MouseEventArgs e ) : void
graphic System.Drawing.Graphics Graphics object, used to draw geometry
e MouseEventArgs Mouse event argument
return void

OnMouseUp() public method

Mouse up event handler
public OnMouseUp ( Graphics graphic, MouseEventArgs e ) : void
graphic System.Drawing.Graphics Graphics object, used to draw geometry
e MouseEventArgs Mouse event argument
return void

OnRightMouseClick() public method

Right mouse click event handler
public OnRightMouseClick ( Graphics graphic, MouseEventArgs e ) : void
graphic System.Drawing.Graphics Graphics object, used to draw geometry
e MouseEventArgs Mouse event argument
return void

Property Details

m_backGroundPen protected_oe property

Background pen used to erase the preview line
protected Pen,System.Drawing m_backGroundPen
return System.Drawing.Pen

m_foreGroundPen protected_oe property

Foreground pen used to draw lines
protected Pen,System.Drawing m_foreGroundPen
return System.Drawing.Pen

m_lines protected_oe property

Field used to store lines
protected List> m_lines
return List>

m_points protected_oe property

Field used to store points of a line
protected List m_points
return List

m_preMovePoint protected_oe property

Store the mouse position when mouse move in pictureBox
protected Point m_preMovePoint
return Point

m_type protected_oe property

ToolType is enum type indicate draw tools.
protected ToolType m_type
return ToolType