CTCOfficeGUI.InfoPanel.UpdateDisplay C# (CSharp) Method

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
        public void UpdateDisplay(List<TrackBlock> blocks, List<ITrain> trains)
        {
            if (InvokeRequired)
            {
                Invoke(m_updateDelegate, blocks, trains);
            }
            else
            {
                //No reason to check if the block or train is in the list, faster to just update anyway
                if (m_displayedBlock != null)
                {
                    SetTrackBlockInfo(m_displayedBlock);
                }
                else if (m_displayedTrain != null)
                {
                    SetTrainInfo(m_displayedTrain);
                }
            }
        }