void Construct()
        {
            int i;
            Rectangle transitionRect;
            Rectangle maxTransTimeRect;
            Rectangle aveTransTimeRect;
            Rectangle minTransTimeRect;
            Rectangle[] behColorRectArray;

            // This assert could go away if this form were to ever need to be used for a matrix
            // without colums but is left in for now because it isn't being used that
            // way currently.  For now at the very least there will always be a need
            // for 1+ the number of behavior number of columns.
            CopyControls();

            m_numTrials = NORMAL_TRIALS_FACTOR/m_matrix.RowCount;
            NumTrialsButton.Text = "" + m_numTrials;

            //--------------------------------------------------------------------------//
            // Set up the results bitmap display (the main display on the form).
            //-----------------------------------------------------------------//
            // Copy the attributes from the group box that defines the display area into
            // the rectangle passed into the bitmap manager
            transitionRect = new Rectangle();
            transitionRect.X = DisplayGroupBox.Location.X;
            transitionRect.Y = DisplayGroupBox.Location.Y;
            transitionRect.Width = DisplayGroupBox.Width;
            transitionRect.Height = DisplayGroupBox.Height;


            //--------------------------------------------------------------------------//
            // Allocate and and format the behavior key on the form
            //-----------------------------------------------------//
            if(m_displayType == MBSDEFAULTS.BITMAPDISPLAYTYPE.INITIAL_BEHAVIOR)
            {
                // Initial behavior display
                // Do not display a transition-from-behavior behavior name.
                BehaviorNameLabel.Text = "";
                BehaviorNumberLabel.Visible = false;
            }
            else
            {
                // Behavior transition display
                // Display a transition-from-behavior behavior name.
                BehaviorNameLabel.Text = m_behaviorNameArray[m_behaviorIndex];
                BehaviorNumberLabel.Visible = true;
                BehaviorNumberLabel.Text = "" + "(" + (m_behaviorIndex+1) + ")";
            }

            // Fill in names on the behavior key.  Put empty strings on unused behaviors.
            for(i=0; i<MBGUICONSTANTS.MAXNUMBEHAVIORS; i++)
            {
                if(i<m_numBehaviors)
                {
                    m_transitionLabelArray[i].Text = m_behaviorNameArray[i];
                    m_transitionLabelNumberArray[i].Visible = true;
                }
                else
                {
                    m_transitionLabelArray[i].Text = "";
                    m_transitionLabelNumberArray[i].Visible = false;
                }
            }

            // Copy the attributes from the group box that defines the size and placement
            // of the maximum transition color-code key display area into a rectangle
            // passed into the bitmap manager
            maxTransTimeRect = new Rectangle();
            maxTransTimeRect.X = DurationGroupBoxMax.Location.X;
            maxTransTimeRect.Y = DurationGroupBoxMax.Location.Y;
            maxTransTimeRect.Width = DurationGroupBoxMax.Width;
            maxTransTimeRect.Height = DurationGroupBoxMax.Height;

            // Copy the attributes from the group box that defines the size and placement
            // of the ave transition color-code key display area into a rectangle
            // passed into the bitmap manager
            aveTransTimeRect = new Rectangle();
            aveTransTimeRect.X = DurationGroupBoxAve.Location.X;
            aveTransTimeRect.Y = DurationGroupBoxAve.Location.Y;
            aveTransTimeRect.Width = DurationGroupBoxAve.Width;
            aveTransTimeRect.Height = DurationGroupBoxAve.Height;

            // Copy the attributes from the group box that defines the size and placement
            // of the minimum transition color-code key display area into a rectangle
            // passed into the bitmap manager
            minTransTimeRect = new Rectangle();
            minTransTimeRect.X = DurationGroupBoxMin.Location.X;
            minTransTimeRect.Y = DurationGroupBoxMin.Location.Y;
            minTransTimeRect.Width = DurationGroupBoxMin.Width;
            minTransTimeRect.Height = DurationGroupBoxMin.Height;

            // Copy the attributes from the group box that defines the size and placement
            // of the individual behavior color-code key display area into a rectangle
            // passed into the bitmap manager
            behColorRectArray = new Rectangle[m_numBehaviors];
            for(i=0; i<m_numBehaviors; i++)
            {
                behColorRectArray[i].X = m_transitionGroupBoxArray[i].Location.X;
                behColorRectArray[i].Y = m_transitionGroupBoxArray[i].Location.Y;
                behColorRectArray[i].Width = m_transitionGroupBoxArray[i].Width;
                behColorRectArray[i].Height = m_transitionGroupBoxArray[i].Height;
            }

            m_bitmapMgr = new CBitmapSingleBehaviorTimeTransitionManager(this,
                m_displayType, // display type, either initial behavor or behavior transition
                transitionRect, // bitmap setup of the main (results) display
                maxTransTimeRect, // bitmap setup of the maximum time rectangle key
                aveTransTimeRect, // bitmap setup of the average time rectangles key
                minTransTimeRect, // bitmap setup of the minimum time rectangle key
                behColorRectArray // bitmaps setup of the behavior rectangles key
                );

            RunTransitionOverTimeTest(CUtil.CopyMatrix(m_matrix)); // Generate and display initial data
        }
        public void InitializeBehaviorTransitionAsAFunctionOfTimeBitMapVars()
        {
            int i;
            Rectangle transitionRect;
            Rectangle maxTransTimeRect; 
            Rectangle aveTransTimeRect;
            Rectangle minTransTimeRect;
            Rectangle[] behColorRectArray;
            
            transitionRect = new Rectangle();
            transitionRect.X = DisplayGroupBox.Location.X;
            transitionRect.Y = DisplayGroupBox.Location.Y;
            transitionRect.Width = DisplayGroupBox.Width;
            transitionRect.Height = DisplayGroupBox.Height;

            maxTransTimeRect = new Rectangle();
            maxTransTimeRect.X = DurationGroupBoxMax.Location.X;
            maxTransTimeRect.Y = DurationGroupBoxMax.Location.Y;
            maxTransTimeRect.Width = DurationGroupBoxMax.Width;
            maxTransTimeRect.Height = DurationGroupBoxMax.Height;

            aveTransTimeRect = new Rectangle();
            aveTransTimeRect.X = DurationGroupBoxAve.Location.X;
            aveTransTimeRect.Y = DurationGroupBoxAve.Location.Y;
            aveTransTimeRect.Width = DurationGroupBoxAve.Width;
            aveTransTimeRect.Height = DurationGroupBoxAve.Height;

            minTransTimeRect = new Rectangle();
            minTransTimeRect.X = DurationGroupBoxMin.Location.X;
            minTransTimeRect.Y = DurationGroupBoxMin.Location.Y;
            minTransTimeRect.Width = DurationGroupBoxMin.Width;
            minTransTimeRect.Height = DurationGroupBoxMin.Height;

            behColorRectArray = new Rectangle[m_numBehaviorsDefined];
            for(i=0; i<m_numBehaviorsDefined; i++)
            {
                behColorRectArray[i].X = m_transitionGroupBoxArray[i].Location.X;
                behColorRectArray[i].Y = m_transitionGroupBoxArray[i].Location.Y;
                behColorRectArray[i].Width = m_transitionGroupBoxArray[i].Width;
                behColorRectArray[i].Height = m_transitionGroupBoxArray[i].Height;
            }

            m_bitmapMgr = new CBitmapSingleBehaviorTimeTransitionManager(this,
                m_displayType,
                transitionRect,
                maxTransTimeRect,
                aveTransTimeRect,
                minTransTimeRect,
                behColorRectArray);
        }