C# Class CTCOfficeGUI.TrackBlockGraphic

Inheritance: System.Windows.Forms.UserControl
Datei anzeigen Open project: johnselker/Bazinga1186 Class Usage Examples

Public Methods

Method 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

Protected Methods

Method Description
OnPaint ( PaintEventArgs e ) : void

Paint override that draws the block control

Private Methods

Method 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 method

Causes the graphic to "blink" to show as selected
public Blink ( ) : void
return void

OnPaint() protected method

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

SetScale() public method

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
return bool

StopBlinking() public method

Causes the graphic to stop blinking
public StopBlinking ( ) : void
return void

TrackBlockGraphic() public method

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
return System