using FastReport.Gauge; using System; using System.ComponentModel; using System.Drawing.Design; namespace FastReport.TypeEditors { internal class LabelEditor : UITypeEditor { public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) { return UITypeEditorEditStyle.Modal; } public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object Value) { GaugeLabel label = (GaugeLabel)Value; GaugeObject gauge = label.Parent; GaugeEditorForm gaugeEditor = gauge.GetGaugeEditor; gaugeEditor.ActivePage = GaugeEditorPage.Label; if (gauge.InvokeEditor(gaugeEditor)) { gauge.Report.Designer.SetModified(this, "Change"); } return gauge.Label; } } }