/// <summary> /// Sets the horizontal justification of the values of all columns. /// </summary> /// <param name="partsList">The <see cref="PartsList"/> instance that this extension method affects.</param> /// <param name="valueHorizontalJustification">The horizontal justification value.</param> /// <exception cref="ArgumentNullException"><paramref name="partsList"/> is <c>null</c>.</exception> public static void SetColumnValuesHorizontalJustification( this PartsList partsList, HorizontalTextAlignmentEnum valueHorizontalJustification ) { if (partsList == null) { throw new ArgumentNullException(nameof(partsList)); } foreach (PartsListColumn column in partsList.PartsListColumns) { column.ValueHorizontalJustification = valueHorizontalJustification; } }
public TextStyle addTextStyle(TextStyle oldStyle, string name, double scale = 1, bool italic = true, HorizontalTextAlignmentEnum hor = HorizontalTextAlignmentEnum.kAlignTextCenter, VerticalTextAlignmentEnum vert = VerticalTextAlignmentEnum.kAlignTextMiddle, double size = 3.5, string font = "GOST Common", bool bold = true, bool underline = false) { TextStyle newStyle = (TextStyle)oldStyle.Copy(name); newStyle.Bold = bold; newStyle.Underline = underline; newStyle.Font = font; newStyle.FontSize = size / 10; newStyle.HorizontalJustification = hor; newStyle.VerticalJustification = vert; newStyle.Italic = italic; newStyle.WidthScale = scale; return(newStyle); }
/// <summary> /// Sets the horizontal justification of the values of all columns. /// </summary> /// <param name="partsList">The <see cref="PartsList"/> instance that this extension method affects.</param> /// <param name="valueHorizontalJustification">The horizontal justification value.</param> /// <exception cref="ArgumentNullException"><paramref name="partsList"/> is <c>null</c>.</exception> public static void SetColumnValuesHorizontalJustification( this PartsList partsList, HorizontalTextAlignmentEnum valueHorizontalJustification ) { if (partsList == null) throw new ArgumentNullException(nameof(partsList)); foreach (PartsListColumn column in partsList.PartsListColumns) column.ValueHorizontalJustification = valueHorizontalJustification; }