ShapeObject.DesignExt.cs 815 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections;
  3. using System.Windows.Forms;
  4. using System.Drawing;
  5. using System.Drawing.Drawing2D;
  6. using System.Drawing.Design;
  7. using System.ComponentModel;
  8. using FastReport.Utils;
  9. using FastReport.TypeEditors;
  10. using FastReport.Forms;
  11. namespace FastReport
  12. {
  13. partial class ShapeObject : IHasEditor
  14. {
  15. #region Public Methods
  16. /// <inheritdoc/>
  17. public bool InvokeEditor()
  18. {
  19. using (FillEditorForm editor = new FillEditorForm())
  20. {
  21. editor.Fill = Fill.Clone();
  22. if (editor.ShowDialog() == DialogResult.OK)
  23. {
  24. Fill = editor.Fill;
  25. return true;
  26. }
  27. return false;
  28. }
  29. }
  30. /// <inheritdoc/>
  31. public override void OnBeforeInsert(int flags)
  32. {
  33. shape = (ShapeKind)flags;
  34. }
  35. #endregion
  36. }
  37. }