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

Abstract class use as base class of all draw tool class
Afficher le fichier Open project: AMEE/revit Class Usage Examples

Protected Properties

Свойство Type Description
m_backGroundPen System.Drawing.Pen
m_foreGroundPen System.Drawing.Pen
m_lines List>
m_points List
m_preMovePoint Point
m_type ToolType

Méthodes publiques

Méthode 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 méthode

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
Résultat void

GetLines() public méthode

Get all lines drawn in pictureBox
public GetLines ( ) : List>
Résultat List>

ITool() public méthode

Default constructor
public ITool ( ) : System
Résultat System

OnMidMouseDown() public méthode

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
Résultat void

OnMouseDown() public méthode

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
Résultat void

OnMouseMove() public méthode

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
Résultat void

OnMouseUp() public méthode

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
Résultat void

OnRightMouseClick() public méthode

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
Résultat void

Property Details

m_backGroundPen protected_oe property

Background pen used to erase the preview line
protected Pen,System.Drawing m_backGroundPen
Résultat System.Drawing.Pen

m_foreGroundPen protected_oe property

Foreground pen used to draw lines
protected Pen,System.Drawing m_foreGroundPen
Résultat System.Drawing.Pen

m_lines protected_oe property

Field used to store lines
protected List> m_lines
Résultat List>

m_points protected_oe property

Field used to store points of a line
protected List m_points
Résultat List

m_preMovePoint protected_oe property

Store the mouse position when mouse move in pictureBox
protected Point m_preMovePoint
Résultat Point

m_type protected_oe property

ToolType is enum type indicate draw tools.
protected ToolType m_type
Résultat ToolType