コード例 #1
0
 /// <summary>
 /// Handles the Click event of RenderingSettingsButton object.
 /// </summary>
 private void renderingSettingsButton_Click(object sender, EventArgs e)
 {
     // create rendering settings dialog
     using (RenderingSettingsForm renderingSettingsDialog =
                new RenderingSettingsForm(_renderingSettings))
     {
         // if rendering setting must be updated
         if (renderingSettingsDialog.ShowDialog() == DialogResult.OK)
         {
             // update rendering settings
             _renderingSettings = renderingSettingsDialog.RenderingSettings;
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// Sets the rendering settings if necessary.
 /// </summary>
 /// <param name="image">The image.</param>
 /// <param name="encoder">The encoder.</param>
 /// <param name="defaultRenderingSettings">The default rendering settings.</param>
 public static void SetRenderingSettingsIfNeed(
     VintasoftImage image, EncoderBase encoder, RenderingSettings defaultRenderingSettings)
 {
     if (encoder == null || !(encoder is IPdfEncoder))
     {
         if (image.IsVectorImage)
         {
             RenderingSettingsForm settingsForm = new RenderingSettingsForm(defaultRenderingSettings.CreateClone());
             if (settingsForm.ShowDialog() == DialogResult.OK)
             {
                 image.RenderingSettings = settingsForm.RenderingSettings;
             }
         }
     }
 }
コード例 #3
0
 /// <summary>
 /// Sets the rendering settings if necessary.
 /// </summary>
 /// <param name="images">The images.</param>
 /// <param name="encoder">The encoder.</param>
 /// <param name="defaultRenderingSettings">The default rendering settings.</param>
 public static void SetRenderingSettingsIfNeed(
     ImageCollection images, EncoderBase encoder, RenderingSettings defaultRenderingSettings)
 {
     if (encoder == null || !(encoder is IPdfEncoder))
     {
         for (int i = 0; i < images.Count; i++)
         {
             if (images[i].IsVectorImage)
             {
                 RenderingSettingsForm settingsForm = new RenderingSettingsForm(defaultRenderingSettings.CreateClone());
                 if (settingsForm.ShowDialog() == DialogResult.OK)
                 {
                     images.SetRenderingSettings(settingsForm.RenderingSettings);
                 }
                 else
                 {
                     return;
                 }
                 break;
             }
         }
     }
 }