C# Class CTCOfficeGUI.TrackBlockGraphic

Inheritance: System.Windows.Forms.UserControl
Afficher le fichier Open project: johnselker/Bazinga1186 Class Usage Examples

Méthodes publiques

Méthode Description
Blink ( ) : void

Causes the graphic to "blink" to show as selected

SetScale ( double scale ) : bool

Sets the scale of the track block relative to the screen

Scale is represented as a ratio of actual length units per pixel, e.g. 10 miles/pixel would be set as 0.1

StopBlinking ( ) : void

Causes the graphic to stop blinking

TrackBlockGraphic ( TrackBlock block, double scale ) : System

Primary constructor for the track block graphic class

Méthodes protégées

Méthode Description
OnPaint ( PaintEventArgs e ) : void

Paint override that draws the block control

Private Methods

Méthode Description
CalculateArrowPoints ( ) : void

Calculates the points for drawing arrows

DrawArrows ( Graphics g, Pen p ) : void

Draws the arrows indicating the allowed direction of travel of the block

GetDrawColor ( ) : Color

Gets the color the block should draw in

OnClick ( object sender, EventArgs e ) : void

Catch and rethrow of the click event. Necessary to allow picture boxes to throw the click event as well

Method Details

Blink() public méthode

Causes the graphic to "blink" to show as selected
public Blink ( ) : void
Résultat void

OnPaint() protected méthode

Paint override that draws the block control
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs Paint event arguments (from .NET)
Résultat void

SetScale() public méthode

Sets the scale of the track block relative to the screen
Scale is represented as a ratio of actual length units per pixel, e.g. 10 miles/pixel would be set as 0.1
public SetScale ( double scale ) : bool
scale double Scale to display
Résultat bool

StopBlinking() public méthode

Causes the graphic to stop blinking
public StopBlinking ( ) : void
Résultat void

TrackBlockGraphic() public méthode

Primary constructor for the track block graphic class
public TrackBlockGraphic ( TrackBlock block, double scale ) : System
block TrackBlock Track block object this graphic represents
scale double Scaling constant for the screen
Résultat System