SimpleProgressGauge.DesignExt.cs 983 B

12345678910111213141516171819202122232425262728293031
  1. using System.Windows.Forms;
  2. namespace FastReport.Gauge.Simple.Progress
  3. {
  4. public partial class SimpleProgressGauge : IHasEditor
  5. {
  6. /// <inheritdoc/>
  7. public override void OnBeforeInsert(int flags)
  8. {
  9. base.OnBeforeInsert(flags);
  10. // to avoid applying last formatting
  11. Border.Lines = BorderLines.All;
  12. }
  13. /// <inheritdoc />
  14. bool IHasEditor.InvokeEditor()
  15. {
  16. SimpleProgressGauge oldGauge = (SimpleProgressGauge)Clone();
  17. using (SimpleProgressGaugeEditorForm gaugeEditor = new SimpleProgressGaugeEditorForm(this))
  18. {
  19. if (gaugeEditor.ShowDialog() != DialogResult.OK)
  20. {
  21. SimpleProgressPointer ptr = Pointer as SimpleProgressPointer;
  22. ptr = oldGauge.Pointer as SimpleProgressPointer;
  23. }
  24. return true;
  25. //OnChange();
  26. }
  27. }
  28. }
  29. }