RadialGauge.DesignExt.cs 816 B

1234567891011121314151617181920212223242526272829
  1. using FastReport.Utils;
  2. using System.Windows.Forms;
  3. namespace FastReport.Gauge.Radial
  4. {
  5. public partial class RadialGauge : IHasEditor
  6. {
  7. /// <inheritdoc/>
  8. public override void OnBeforeInsert(int flags)
  9. {
  10. base.OnBeforeInsert(flags);
  11. // to avoid applying last formatting
  12. Border.Lines = BorderLines.None;
  13. }
  14. /// <inheritdoc />
  15. bool IHasEditor.InvokeEditor()
  16. {
  17. GaugeObject oldGauge = (GaugeObject)Clone();
  18. using (RadialGaugeEditorForm gaugeEditor = new RadialGaugeEditorForm(this))
  19. {
  20. if (gaugeEditor.ShowDialog() != DialogResult.OK)
  21. this.Scale = oldGauge.Scale;
  22. }
  23. return true;
  24. //OnChange();
  25. }
  26. }
  27. }