Example #1
0
 /// <summary>
 /// The <see cref="Control.Click"/> event handler for the
 ///   <see cref="Button"/> <see cref="btnSecondary"/>.
 ///   Updates the presentation screen.
 /// </summary>
 /// <param name="sender">
 /// Source of the event.
 /// </param>
 /// <param name="e">
 /// An empty <see cref="EventArgs"/>.
 /// </param>
 private void BtnSecondaryClick(object sender, EventArgs e)
 {
     if (RecordModule.CheckForCorrectPresentationScreenResolution(SecondaryScreen.GetSecondaryScreen().Bounds.Size))
     {
         this.btnPrimary.Checked = !this.btnSecondary.Checked;
         this.SubmitPresentationScreenToSettings();
     }
     else
     {
         this.btnSecondary.Checked = false;
     }
 }
Example #2
0
        /// <summary>
        /// The <see cref="Control.Click"/> event handler for the
        /// <see cref="Button"/> <see cref="btnPreviewSlideshow"/>.
        /// Starts a <see cref="PresenterModule"/> with the given slides.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">An empty <see cref="EventArgs"/></param>
        private void BtnPreviewSlideshowClick(object sender, EventArgs e)
        {
            if (!RecordModule.CheckForCorrectPresentationScreenResolution(PresentationScreen.GetPresentationResolution()))
            {
                return;
            }

            PresenterModule objPresenter = new PresenterModule();

            // Create a newly randomized trial list.
            TrialCollection trials = this.slideshow.GetRandomizedTrials();

            // Create a hardcopy of the trials.
            TrialCollection copyOfTrials = (TrialCollection)trials.Clone();

            // Set slide list of presenter
            objPresenter.TrialList = copyOfTrials;

            // Show presenter form, that starts presentation.
            objPresenter.ShowDialog();

            // Update slideshow pictures of newly created trials
            Document.ActiveDocument.ExperimentSettings.SlideShow.UpdateExperimentPathOfResources(Document.ActiveDocument.ExperimentSettings.SlideResourcesPath);
        }