public void SetFormatting(ReportComponentBase c) { if (c != null) { if (Border != null && c.FlagUseBorder) { c.Border = Border.Clone(); } if (c.FlagUseFill) { c.Fill = Fill.Clone(); } } if (c is TextObject) { TextObject c1 = c as TextObject; if (Font != null) { c1.Font = Font; } c1.HorzAlign = HorzAlign; c1.VertAlign = VertAlign; c1.TextFill = TextFill.Clone(); c1.Angle = Angle; } }
/// <summary> /// Invokes the fill editor. /// </summary> /// <param name="fill">The fill to edit.</param> /// <returns>The new fill.</returns> public static FillBase EditFill(FillBase fill) { using (FillEditorForm editor = new FillEditorForm()) { editor.Fill = fill.Clone(); if (editor.ShowDialog() == DialogResult.OK) { return(editor.Fill); } } return(fill); }