C# Class CTCOfficeGUI.InfoPanel

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

Public Methods

Method 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

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

Hides the labels
public ClearInfo ( ) : void
return void

InfoPanel() public method

Primary constructor for the info panel
public InfoPanel ( ) : System
return System

SetInfo() public method

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

SetTrackBlockInfo() public method

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

SetTrainInfo() public method

Sets the text information for a train
public SetTrainInfo ( ITrain train ) : void
train ITrain Train
return void

SetTrainYardInfo() public method

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

UpdateDisplay() public method

Updates the display
public UpdateDisplay ( List blocks, List trains ) : void
blocks List List of track blocks
trains List List of trains
return void