using System; using System.Windows.Forms; namespace FastReport.Gauge { public partial class GaugeObject : IHasEditor { /// public override void OnBeforeInsert(int flags) { base.OnBeforeInsert(flags); // to avoid applying last formatting Border.Lines = BorderLines.All; } /// public bool InvokeEditor() { return InvokeEditor(GetGaugeEditor); } internal virtual GaugeEditorForm GetGaugeEditor => throw new NotImplementedException(); internal virtual bool InvokeEditor(GaugeEditorForm gaugeEditor) { var oldGauge = Clone(); using (gaugeEditor) { if (gaugeEditor.ShowDialog() != DialogResult.OK) { this.Assign(oldGauge); return false; } } return true; } } }