C# Class TrainControllerLib.TrainOperator

Inheritance: System.Windows.Forms.Form
Show file Open project: johnselker/Bazinga1186 Class Usage Examples

Public Methods

Method Description
TrainOperator ( ) : System

Primary constructor, to be used for a module demo ONLY

TrainOperator ( ITrain myTrain, TrainControllerLib.TrainController myTrainController ) : System

Secondary constructor, to be used by the CTC

Private Methods

Method Description
BrakeFailure_Click ( object sender, EventArgs e ) : void

Simulate a Brake Failure

CircuitFailure_Click ( object sender, EventArgs e ) : void

Simulate a Track Circuit Failure

CreateTrain_Click ( object sender, EventArgs e ) : void

Start the GUI, and create a train and train controller if in a demo

EmergencyBrake_Click ( object sender, EventArgs e ) : void

Engage the train's emergency brake

EngineFailure_Click ( object sender, EventArgs e ) : void

Simulate an Engine Failure

EnterSpeed_Click ( object sender, EventArgs e ) : void

Send a manual speed command to the train controller

GetRedlineSchedule ( ) : Queue

Gets the redline schedule

PowerFailure_Click ( object sender, EventArgs e ) : void

Simulate a Track Power Failure

Update ( object sender, EventArgs e ) : void

Refresh the GUI, and update the train controller if in a demo

UpdateDisplay ( object sender, EventArgs e ) : void

Update the current speed and position of the train

Method Details

TrainOperator() public method

Primary constructor, to be used for a module demo ONLY
public TrainOperator ( ) : System
return System

TrainOperator() public method

Secondary constructor, to be used by the CTC
public TrainOperator ( ITrain myTrain, TrainControllerLib.TrainController myTrainController ) : System
myTrain ITrain The train associated with this GUI
myTrainController TrainControllerLib.TrainController The train controller associated with this GUI
return System