C# Class CTCOfficeGUI.InfoPanel

Class for displaying text information to the user
Inheritance: System.Windows.Forms.UserControl
Afficher le fichier Open project: johnselker/Bazinga1186

Méthodes publiques

Méthode Description
ClearInfo ( ) : void

Hides the labels

InfoPanel ( ) : System

Primary constructor for the info panel

SetInfo ( string name, string>.Dictionary information ) : void

Sets the information to display

SetTrackBlockInfo ( TrackBlock block ) : void

Sets the text information for a track block

SetTrainInfo ( ITrain train ) : void

Sets the text information for a train

SetTrainYardInfo ( TrackBlock b ) : void

Displays info about the train yard

UpdateDisplay ( List blocks, List trains ) : void

Updates the display

Private Methods

Méthode Description
AdjustLabelPositions ( ) : void

Adjusts the location of the field labels to align nicely

GetBlockFailureStateString ( TrackBlock block ) : string>.KeyValuePair

Gets the failure state string for the given track block

There are 8 different possible strings, so this chunk of code gets ugly

Method Details

ClearInfo() public méthode

Hides the labels
public ClearInfo ( ) : void
Résultat void

InfoPanel() public méthode

Primary constructor for the info panel
public InfoPanel ( ) : System
Résultat System

SetInfo() public méthode

Sets the information to display
public SetInfo ( string name, string>.Dictionary information ) : void
name string
information string>.Dictionary Dictionary of field:value information
Résultat void

SetTrackBlockInfo() public méthode

Sets the text information for a track block
public SetTrackBlockInfo ( TrackBlock block ) : void
block TrackBlock Track block
Résultat void

SetTrainInfo() public méthode

Sets the text information for a train
public SetTrainInfo ( ITrain train ) : void
train ITrain Train
Résultat void

SetTrainYardInfo() public méthode

Displays info about the train yard
public SetTrainYardInfo ( TrackBlock b ) : void
b TrackBlock Track block
Résultat void

UpdateDisplay() public méthode

Updates the display
public UpdateDisplay ( List blocks, List trains ) : void
blocks List List of track blocks
trains List List of trains
Résultat void