Esempio n. 1
0
        /// <summary>
        /// The <see cref="Control.Click"/> event handler for the
        /// <see cref="Button"/> <see cref="btnInstruction"/>.
        /// Shows a <see cref="TextDialog"/> to define a textual
        /// instruction that is added to all imported slides.
        /// </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)
        {
            TextDialog dlg = new TextDialog();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                VGText text = dlg.NewText;
                this.cbbDesignedItem.Items.Add(text);
                this.cbbDesignedItem.SelectedItem = text;
            }
        }
Esempio n. 2
0
 /// <summary>
 /// <see cref="Control.TextChanged"/> event handler
 /// for the <see cref="TextBox"/> <see cref="txbInstructions"/>
 /// Updates the selected <see cref="VGText"/> element with the modified
 /// instruction.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">A empty <see cref="EventArgs"/></param>
 private void txbInstructions_TextChanged(object sender, EventArgs e)
 {
     if (this.designPicture.SelectedElement != null && !this.isInitializingSelectedShape)
     {
         if (this.designPicture.SelectedElement is VGText)
         {
             VGText text = (VGText)this.designPicture.SelectedElement;
             text.StringToDraw = this.txbInstructions.Text;
             this.designPicture.DrawForeground(true);
         }
     }
 }