Exemplo n.º 1
0
    /// <summary>
    /// Opens a <see cref="DesktopDialog"/> form, waits for successful
    /// design and updates slideshow with the designed <see cref="Slide"/>.
    /// </summary>
    /// <param name="newDesignForm">A <see cref="DesktopDialog"/> with the desktop 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 OpenDesktopDesignerForm(DesktopDialog newDesignForm, string nodeID)
    {
      if (newDesignForm.ShowDialog() == DialogResult.OK)
      {
        Slide newSlide = newDesignForm.Slide;
        if (nodeID != string.Empty)
        {
          this.OverwriteSlide(newSlide, nodeID);
        }
        else
        {
          this.AddSlide(newSlide);
        }

        this.SlideShowModified();
      }
    }
Exemplo n.º 2
0
 /// <summary>
 /// The <see cref="Control.Click"/> event handler for the
 /// <see cref="Button"/> <see cref="btnDesktop"/>.
 /// Raises the <see cref="OpenStimulusDesignerForm(SlideDesignModule,string)"/>
 /// form with adapted properties for desktop stimuli.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">An empty <see cref="EventArgs"/></param>
 private void btnDesktop_Click(object sender, EventArgs e)
 {
   var newDesktop = new DesktopDialog { SlideName = this.GetUnusedSlideName() };
   this.OpenDesktopDesignerForm(newDesktop, string.Empty);
 }
Exemplo n.º 3
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 OpenDesktopDesignForm(SlideshowTreeNode treeNode, Slide currentSlide)
 {
   DesktopDialog newDesktopDesignForm = new DesktopDialog();
   newDesktopDesignForm.Slide = (Slide)currentSlide.Clone();
   this.OpenDesktopDesignerForm(newDesktopDesignForm, treeNode.Name);
 }