/// <summary> /// The <see cref="Control.Click"/> event handler for the /// <see cref="Button"/> <see cref="btnImage"/>. /// Raises the <see cref="OpenStimulusDesignerForm(SlideDesignModule,string)"/> /// form with adapted properties for image stimuli. /// </summary> /// <param name="sender">Source of the event.</param> /// <param name="e">An empty <see cref="EventArgs"/></param> private void btnImage_Click(object sender, EventArgs e) { SlideDesignModule newImages = new SlideDesignModule(StimuliTypes.Image); newImages.Text = "Create new images slide ..."; newImages.Icon = Properties.Resources.Images; newImages.Description = "Image stimuli can be used to present one or more images to the subject."; newImages.SlideName = this.GetUnusedSlideName(); this.OpenStimulusDesignerForm(newImages, string.Empty); }
/// <summary> /// The <see cref="Control.Click"/> event handler for the /// <see cref="Button"/> <see cref="btnRtfInstruction"/>. /// Raises the <see cref="OpenStimulusDesignerForm(SlideDesignModule,string)"/> /// form with adapted properties for instructional RTF formatted stimuli. /// </summary> /// <param name="sender">Source of the event.</param> /// <param name="e">An empty <see cref="EventArgs"/></param> private void btnRtfInstruction_Click(object sender, EventArgs e) { SlideDesignModule newInstruction = new SlideDesignModule(StimuliTypes.RTFInstruction); newInstruction.Text = "Create new rich text formatted instruction slide ..."; newInstruction.Icon = Properties.Resources.Instruction; newInstruction.Description = "Rich text instruction stimuli can be used to present a message with different fonts and colors."; newInstruction.SlideName = this.GetUnusedSlideName(); this.OpenStimulusDesignerForm(newInstruction, string.Empty); }
/// <summary> /// The <see cref="Control.Click"/> event handler for the /// <see cref="Button"/> <see cref="btnInstruction"/>. /// Raises the <see cref="OpenStimulusDesignerForm(SlideDesignModule,string)"/> /// form with adapted properties for instructional stimuli. /// </summary> /// <param name="sender">Source of the event.</param> /// <param name="e">An empty <see cref="EventArgs"/></param> private void btnInstruction_Click(object sender, EventArgs e) { SlideDesignModule newInstruction = new SlideDesignModule(StimuliTypes.Instruction); newInstruction.Text = "Create new instruction slide ..."; newInstruction.Icon = Properties.Resources.Instruction; newInstruction.Description = "Instruction stimuli can be used to present a message or a multiple choice question to the subject."; newInstruction.SlideName = this.GetUnusedSlideName(); this.OpenStimulusDesignerForm(newInstruction, string.Empty); }
/////////////////////////////////////////////////////////////////////////////// // Construction and Initializing methods // /////////////////////////////////////////////////////////////////////////////// #region CONSTRUCTION /// <summary> /// Initializes a new instance of the BrowserDialog class. /// </summary> public BrowserDialog() { this.InitializeComponent(); this.webBrowserPreview.Navigated += webBrowserPreview_Navigated; // Timing Tab SlideDesignModule.FillKeyCombo(this.cbbKeys); this.rdbTime.Checked = true; this.nudTime.Value = SlideDesignModule.SLIDEDURATIONINS; }
/// <summary> /// The <see cref="Control.Click"/> event handler for the /// <see cref="Button"/> <see cref="btnBlank"/>. /// Raises the <see cref="OpenStimulusDesignerForm(SlideDesignModule,string)"/> /// form with adapted properties for blank slides. /// </summary> /// <param name="sender">Source of the event.</param> /// <param name="e">An empty <see cref="EventArgs"/></param> private void btnBlank_Click(object sender, EventArgs e) { SlideDesignModule newBlank = new SlideDesignModule(StimuliTypes.Blank); newBlank.Text = "Create new blank slide ..."; newBlank.Icon = Properties.Resources.Blank; newBlank.Description = "Blank slides can be used to fill in a pause or just simple colored slides."; newBlank.SlideName = this.GetUnusedSlideName(); this.OpenStimulusDesignerForm(newBlank, string.Empty); }
/// <summary> /// The <see cref="Control.Click"/> event handler for the /// <see cref="Button"/> <see cref="btnMixed"/>. /// Raises the <see cref="OpenStimulusDesignerForm(SlideDesignModule,string)"/> /// form with adapted properties for mixed stimuli. /// </summary> /// <param name="sender">Source of the event.</param> /// <param name="e">An empty <see cref="EventArgs"/></param> private void btnMixed_Click(object sender, EventArgs e) { SlideDesignModule newMixed = new SlideDesignModule(StimuliTypes.None); newMixed.Text = "Create new mixed stimuli slide ..."; newMixed.Icon = Properties.Resources.Images; newMixed.Description = "Mixed text, image and vector graphic stimuli can be used to " + "present images along with a caption or multiple choice questions with images as answers " + "and a rectangle around the question."; newMixed.SlideName = this.GetUnusedSlideName(); this.OpenStimulusDesignerForm(newMixed, string.Empty); }
/////////////////////////////////////////////////////////////////////////////// // Defining Constants // /////////////////////////////////////////////////////////////////////////////// #region CONSTANTS #endregion //CONSTANTS /////////////////////////////////////////////////////////////////////////////// // Defining Variables, Enumerations, Events // /////////////////////////////////////////////////////////////////////////////// #region FIELDS #endregion //FIELDS /////////////////////////////////////////////////////////////////////////////// // Construction and Initializing methods // /////////////////////////////////////////////////////////////////////////////// #region CONSTRUCTION /// <summary> /// Initializes a new instance of the DesktopDialog class. /// </summary> public DesktopDialog() { this.InitializeComponent(); SlideDesignModule.FillKeyCombo(this.cbbKeys); this.nudTime.Value = SlideDesignModule.SLIDEDURATIONINS; foreach (Slide slide in Document.ActiveDocument.ExperimentSettings.SlideShow.Slides) { if (!this.cbbCategory.Items.Contains(slide.Category)) { this.cbbCategory.Items.Add(slide.Category); } } }
/// <summary> /// Opens a <see cref="SlideDesignModule"/> form, waits for successful /// design and updates slideshow with the designed <see cref="Slide"/>. /// </summary> /// <param name="newDesignForm">A <see cref="SlideDesignModule"/> with the design form to display.</param> /// <param name="nodeID">Contains the node ID (which is the Node.Name property) of the node that is /// modified or "" if this should be a new slide.</param> private void OpenStimulusDesignerForm(SlideDesignModule newDesignForm, string nodeID) { string oldSlidename = newDesignForm.SlideName; if (newDesignForm.ShowDialog() == DialogResult.OK) { Slide newSlide = newDesignForm.Slide; string newSlidename = newSlide.Name; if (nodeID != string.Empty) { this.OverwriteSlide(newSlide, nodeID); } else { this.AddSlide(newSlide); } this.SlideShowModified(); } }
/// <summary> /// <see cref="Control.Click"/> event handler /// for the <see cref="btnRemoveCondition"/> <see cref="Button"/> /// Removes the selected <see cref="StopCondition"/> items from /// the <see cref="lsbStopConditions"/> list. /// </summary> /// <param name="sender">Source of the event.</param> /// <param name="e">An empty <see cref="EventArgs"/></param> private void btnRemoveCondition_Click(object sender, EventArgs e) { SlideDesignModule.DeleteSelectedItems(this.lsbStopConditions); }