SVGExportForm.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System.Windows.Forms;
  2. using FastReport.Export;
  3. using FastReport.Export.Svg;
  4. using FastReport.Utils;
  5. namespace FastReport.Forms
  6. {
  7. /// <summary>
  8. /// Form for <see cref="SVGExport"/>.
  9. /// For internal use only.
  10. /// </summary>
  11. public partial class SVGExportForm : BaseExportForm
  12. {
  13. /// <inheritdoc/>
  14. public override void Init(ExportBase export)
  15. {
  16. base.Init(export);
  17. SVGExport SVGExport = Export as SVGExport;
  18. comboBox1.SelectedIndex = (int)SVGExport.ImageFormat;
  19. cbEmbdImgs.Checked = SVGExport.EmbedPictures;
  20. cbToMultipleFiles.Checked = SVGExport.HasMultipleFiles;
  21. }
  22. /// <inheritdoc/>
  23. protected override void Done()
  24. {
  25. base.Done();
  26. SVGExport SVGExport = Export as SVGExport;
  27. SVGExport.ImageFormat = (SVGImageFormat)comboBox1.SelectedIndex;
  28. SVGExport.EmbedPictures = cbEmbdImgs.Checked;
  29. SVGExport.HasMultipleFiles = cbToMultipleFiles.Checked;
  30. }
  31. /// <inheritdoc/>
  32. public override void Localize()
  33. {
  34. base.Localize();
  35. MyRes res = new MyRes("Export,SVG");
  36. Text = res.Get("");
  37. cbEmbdImgs.Text = res.Get("EmbPic");
  38. res = new MyRes("Export,Misc");
  39. gbOptions.Text = res.Get("Options");
  40. lblImageFormat.Text = res.Get("Pictures");
  41. cbToMultipleFiles.Text = res.Get("ToMultipleFiles");
  42. }
  43. /// <summary>
  44. /// Initializes a new instance of the <see cref="SVGExportForm"/> class.
  45. /// </summary>
  46. public SVGExportForm()
  47. {
  48. InitializeComponent();
  49. }
  50. }
  51. }