using System; using System.Collections.Generic; using System.Text; using System.Drawing; using FastReport.Utils; namespace FastReport { /// /// Represents a style. /// /// /// /// Style class holds border, fill, text fill and font settings. It can be applied to any report object of /// type. /// /// /// The Report object holds list of styles in its property. Each style has /// unique name. To apply a style to the report component, set its /// property to the style name. /// /// public class Style : StyleBase { private string name; /// /// Gets or sets a name of the style. /// /// /// The name must be unique. /// public string Name { get { return name; } set { name = value; } } /// public override void Serialize(FRWriter writer) { writer.ItemName = "Style"; writer.WriteStr("Name", Name); base.Serialize(writer); } /// public override void Assign(StyleBase source) { base.Assign(source); Name = (source as Style).Name; } /// /// Creates exact copy of this Style. /// /// Copy of this style. public Style Clone() { Style result = new Style(); result.Assign(this); return result; } /// /// Initializes a new instance of the class with default settings. /// public Style() { Name = ""; ApplyBorder = true; ApplyFill = true; ApplyTextFill = true; ApplyFont = true; } } }