CTCOfficeGUI.MainScreen.Initialize C# (CSharp) Method

Initialize() private method

Initializes the screen
private Initialize ( string filename ) : bool
filename string Filename of the track layout
return bool
        private bool Initialize(string filename)
        {
            bool result = false;

            if (!string.IsNullOrEmpty(filename))
            {
                List<TrackBlock> blocks = m_ctcController.LoadTrackLayout(filename);

                if (blocks != null)
                {
                    Point p = m_ctcController.GetLayoutPosition();
                    Size s = m_ctcController.GetLayoutSize();
                    trackDisplayPanel.SetTrackLayout(blocks, s, p);
                    result = true;
                }
            }

            return result;
        }