Ejemplo n.º 1
0
 //break power on selected murphy block
 private void powerFailureButton_Click(object sender, EventArgs e)
 {
     TrackControllerModule.causeFailure(selectedBlock_Murphy.blockId);
     selectedBlock_Murphy.isPowerBroken = true;
     TrainSimulation.MBOWindow.setUpdateNeed();
     if (selectedBlock.blockId == selectedBlock_Murphy.blockId)
     {
         updateFailureButtons();
     }
 }
Ejemplo n.º 2
0
        //close a block (from CTC originally)
        public void closeBlock(int blockId)
        {
            Block currBlock = findBlock(blockId);

            currBlock.isCircuitBroken = false;
            currBlock.isPowerBroken   = false;
            currBlock.isRailBroken    = true;
            TrackControllerModule.causeFailure(currBlock.blockId);
            if (selectedBlock.blockId == currBlock.blockId)
            {
                railStatus.Text              = "Rail - BROKEN";
                trackCircuitStatus.Text      = "Track Circuit - OK";
                powerStatus.Text             = "Power - OK";
                railStatus.BackColor         = Color.Red;
                trackCircuitStatus.BackColor = Color.Lime;
                powerStatus.BackColor        = Color.Lime;
            }
        }