/// <summary>
        /// A new trial Form. This constructor is used if an existing block of trial are subject to change.
        /// </summary>
        /// <param name="sessionForm">The sessionForm which invoked this form.</param>
        /// <param name="editNumber">The trial block number that has to be changed.</param>
        public TrialForm(SessionForm sessionForm, int editNumber)
        {
            addTrial        = false;
            this.editNumber = editNumber;
            InitializeComponent();
            this.sessionForm               = sessionForm;
            this.trial                     = sessionForm.Experiment.SessionList.TrialList[editNumber];
            trialNumberFromTextBox.Text    = trial.NumberTrials.ToString();
            groupNameTextBox.Text          = trial.TrialName;
            durationTextBox.Text           = trial.Duration.ToString();
            fixationMarkerCheckBox.Checked = trial.FixationMarker;
            horizontalCheckBox.Checked     = trial.GridDisplayHorizontal;
            verticalCheckBox.Checked       = trial.GridDisplayVertical;
            bouncingCheckBox.Checked       = trial.Bouncing;

            if (trial.Bouncing == true)
            {
                bouncingTextBox.Text = trial.BouncingDistance.ToString();
            }
            startingDistanceTextBox.Text        = trial.StartingDistance.ToString();
            backgroundPictureBox.BackColor      = Color.FromArgb(trial.BackgroundColor);
            foregroundColorPictureBox.BackColor = Color.FromArgb(trial.ForegroundColor);

            this.mObjectList = sessionForm.Experiment.SessionList.TrialList[editNumber].MObjectList;
            maxObjectsNumber = trial.NumberObjects;
            updateObjectList(maxObjectsNumber);
            checkButtonStatus();
        }
 /// <summary>
 /// A new trial Form.
 /// </summary>
 /// <param name="sessionForm">The sessionForm which invoked this form.</param>
 public TrialForm(SessionForm sessionForm)
 {
     InitializeComponent();
     this.sessionForm = sessionForm;
 }