HTMLExportForm.cs 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using System;
  2. using System.Windows.Forms;
  3. using FastReport.Export;
  4. using FastReport.Export.Html;
  5. using FastReport.Utils;
  6. namespace FastReport.Forms
  7. {
  8. /// <summary>
  9. /// Form for <see cref="HTMLExport"/>.
  10. /// For internal use only.
  11. /// </summary>
  12. public partial class HTMLExportForm : BaseExportForm
  13. {
  14. /// <inheritdoc/>
  15. public override void Init(ExportBase export)
  16. {
  17. base.Init(export);
  18. HTMLExport htmlExport = Export as HTMLExport;
  19. cbWysiwyg.Checked = htmlExport.Wysiwyg;
  20. cbPictures.Checked = htmlExport.Pictures;
  21. cbSinglePage.Checked = htmlExport.SinglePage;
  22. cbSubFolder.Checked = htmlExport.SubFolder;
  23. cbNavigator.Checked = htmlExport.Navigator;
  24. cbLayers.Checked = htmlExport.Layers;
  25. cbEmbPic.Checked = htmlExport.EmbedPictures;
  26. cbNotRotateLandscapePage.Checked = htmlExport.NotRotateLandscapePage;
  27. cbHighQualitySVG.Checked = htmlExport.HighQualitySVG;
  28. cbUsePageBreaks.Checked = htmlExport.PageBreaks;
  29. }
  30. /// <inheritdoc/>
  31. protected override void Done()
  32. {
  33. base.Done();
  34. HTMLExport htmlExport = Export as HTMLExport;
  35. htmlExport.Layers = cbLayers.Checked;
  36. htmlExport.Wysiwyg = cbWysiwyg.Checked;
  37. htmlExport.Pictures = cbPictures.Checked;
  38. htmlExport.SinglePage = cbSinglePage.Checked;
  39. htmlExport.SubFolder = cbSubFolder.Checked;
  40. htmlExport.Navigator = cbNavigator.Checked;
  41. htmlExport.EmbedPictures = cbEmbPic.Checked;
  42. htmlExport.NotRotateLandscapePage = cbNotRotateLandscapePage.Checked;
  43. htmlExport.HighQualitySVG = cbHighQualitySVG.Checked;
  44. htmlExport.PageBreaks = cbUsePageBreaks.Checked;
  45. }
  46. /// <inheritdoc/>
  47. public override void Localize()
  48. {
  49. base.Localize();
  50. MyRes res = new MyRes("Export,Html");
  51. Text = res.Get("");
  52. cbLayers.Text = res.Get("Layers");
  53. cbSinglePage.Text = res.Get("SinglePage");
  54. cbSubFolder.Text = res.Get("SubFolder");
  55. cbNavigator.Text = res.Get("Navigator");
  56. cbEmbPic.Text = res.Get("EmbPic");
  57. cbHighQualitySVG.Text = res.Get("HighQualitySVG");
  58. cbNotRotateLandscapePage.Text = res.Get("NotRotateLandscapePage");
  59. cbUsePageBreaks.Text = res.Get("UsePageBreaks");
  60. res = new MyRes("Export,Misc");
  61. gbOptions.Text = res.Get("Options");
  62. cbWysiwyg.Text = res.Get("Wysiwyg");
  63. cbPictures.Text = res.Get("Pictures");
  64. }
  65. /// <summary>
  66. /// Initializes a new instance of the <see cref="HTMLExportForm"/> class.
  67. /// </summary>
  68. public HTMLExportForm()
  69. {
  70. InitializeComponent();
  71. }
  72. private void cbPictures_CheckedChanged(object sender, EventArgs e)
  73. {
  74. if (cbPictures.Checked)
  75. cbEmbPic.Visible = true;
  76. else cbEmbPic.Visible = false;
  77. }
  78. }
  79. }