/// <summary> /// Invokes the highlight editor for the selected objects. /// </summary> /// <returns><b>true</b> if editor was closed with the OK button.</returns> public bool InvokeHighlightEditor() { using (HighlightEditorForm form = new HighlightEditorForm(FDesigner.ActiveReport)) { form.Conditions = First.Highlight; if (form.ShowDialog() == DialogResult.OK) { SetConditions(form.Conditions); return(true); } } return(false); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object Value) { edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); Report report = context.Instance is Base ? (context.Instance as Base).Report : (((object[])context.Instance)[0] as Base).Report; SelectedTextObjects objects = new SelectedTextObjects(report.Designer); objects.Update(); using (HighlightEditorForm editor = new HighlightEditorForm(report)) { editor.Conditions = objects.First.Highlight; if (editor.ShowDialog() == DialogResult.OK) { objects.SetConditions(editor.Conditions); } } return(Value); }