Esempio n. 1
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;
             }
         }
     }
 }