DxfExportForm.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using FastReport.Export;
  2. using FastReport.Export.Dxf;
  3. using FastReport.Utils;
  4. using System.Windows.Forms;
  5. namespace FastReport.Forms
  6. {
  7. /// <summary>
  8. /// Form for <see cref="DxfExport"/>.
  9. /// For internal use only.
  10. /// </summary>
  11. public partial class DxfExportForm : BaseExportForm
  12. {
  13. #region Public Constructors
  14. /// <summary>
  15. /// Initializes a new instance of the <see cref="DxfExportForm"/> class.
  16. /// </summary>
  17. public DxfExportForm()
  18. {
  19. InitializeComponent();
  20. }
  21. #endregion Public Constructors
  22. #region Public Methods
  23. /// <inheritdoc/>
  24. public override void Init(ExportBase export)
  25. {
  26. base.Init(export);
  27. DxfExport dxfExport = Export as DxfExport;
  28. cbFillMode.SelectedIndex = dxfExport.FillMode == DxfFillMode.Border ? 0 : 1;
  29. nuBarcodesGap.Value = (decimal)dxfExport.BarcodesGap;
  30. }
  31. /// <inheritdoc/>
  32. public override void Localize()
  33. {
  34. base.Localize();
  35. MyRes res = new MyRes("Export,Dxf");
  36. Text = res.Get("");
  37. this.lblDxfFillMode.Text = res.Get("FillMode");
  38. this.cbFillMode.Items[0] = res.Get("FillModeBorder");
  39. this.cbFillMode.Items[1] = res.Get("FillModeSolid");
  40. this.label1.Text = res.Get("BarcodesGap");
  41. }
  42. #endregion Public Methods
  43. #region Protected Methods
  44. /// <inheritdoc/>
  45. protected override void Done()
  46. {
  47. base.Done();
  48. DxfExport dxfExport = Export as DxfExport;
  49. dxfExport.FillMode = cbFillMode.SelectedIndex == 0 ? DxfFillMode.Border : DxfFillMode.Solid;
  50. dxfExport.BarcodesGap = (float)nuBarcodesGap.Value;
  51. }
  52. #endregion Protected Methods
  53. }
  54. }