private static Paragraph MakeParagraph([NotNull] Section sec, int fontSize, SpaceAfter spaceAfter = SpaceAfter.Small) { var para = sec.AddParagraph(); para.Format.Alignment = ParagraphAlignment.Justify; para.Format.Font.Name = "Arial"; para.Format.Font.Size = fontSize; para.Format.Font.Bold = false; switch (spaceAfter) { case SpaceAfter.Large: para.Format.SpaceAfter = "0.5cm"; break; case SpaceAfter.Small: para.Format.SpaceAfter = "0.25cm"; break; default: throw new ArgumentOutOfRangeException(nameof(spaceAfter), spaceAfter, null); } para.Format.Font.Color = Colors.Black; return(para); }
public bool Matches(object obj) { var other = obj as CustomStyle; if (other == null) { return(false); } if (!Name.Equals(other.Name)) { return(false); } if (!Font.Equals(other.Font)) { return(false); } if (!Color.Equals(other.Color)) { return(false); } if (!Background.Equals(other.Background)) { return(false); } if (!SpaceBefore.Equals(other.SpaceBefore)) { return(false); } if (!SpaceAfter.Equals(other.SpaceAfter)) { return(false); } return(true); }