/// <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);
 }
 /// <summary>
 /// The <see cref="Control.Click"/> event handler for the
 /// <see cref="Button"/> <see cref="btnFlash"/>.
 /// Raises the <see cref="OpenStimulusDesignerForm(SlideDesignModule,string)"/>
 /// form with adapted properties for flash stimuli.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">An empty <see cref="EventArgs"/></param>
 private void btnFlash_Click(object sender, EventArgs e)
 {
   SlideDesignModule newFlash = new SlideDesignModule(StimuliTypes.Flash);
   newFlash.Text = "Create new flash movie slide ...";
   newFlash.Icon = Properties.Resources.FlashPlayerIcon;
   newFlash.Description = "Flash movie stimuli are used to present a shockwave flash object (.swf - file).";
   newFlash.SlideName = this.GetUnusedSlideName();
   this.OpenStimulusDesignerForm(newFlash, string.Empty);
 }
 /// <summary>
 /// The <see cref="Control.Click"/> event handler for the
 /// <see cref="Button"/> <see cref="btnShapes"/>.
 /// Raises the <see cref="OpenStimulusDesignerForm(SlideDesignModule,string)"/>
 /// form with adapted properties for shape stimuli.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">An empty <see cref="EventArgs"/></param>
 private void btnShapes_Click(object sender, EventArgs e)
 {
   SlideDesignModule newShapes = new SlideDesignModule(StimuliTypes.Shape);
   newShapes.Text = "Create new shapes slide ...";
   newShapes.Icon = Properties.Resources.Shape;
   newShapes.Description = "Shape stimuli can be used to present different shapes to the subject.";
   newShapes.SlideName = this.GetUnusedSlideName();
   this.OpenStimulusDesignerForm(newShapes, 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);
 }
Exemple #7
0
    /// <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();
      }
    }
Exemple #8
0
 /// <summary>
 /// This method opens the given slide in a new <see cref="SlideDesignModule"/> form
 /// for modification.
 /// </summary>
 /// <param name="treeNode">The <see cref="SlideshowTreeNode"/> that indicates the slide.</param>
 /// <param name="currentSlide">The <see cref="Slide"/> to be edited.</param>
 private void OpenSlideDesignForm(SlideshowTreeNode treeNode, Slide currentSlide)
 {
   SlideDesignModule newStimulusDesignForm = new SlideDesignModule(StimuliTypes.None);
   newStimulusDesignForm.Slide = (Slide)currentSlide.Clone();
   this.OpenStimulusDesignerForm(newStimulusDesignForm, treeNode.Name);
 }