/// <summary> /// Add fixed text at the end of this template /// </summary> /// <param name="text"></param> /// <param name="linePrefix"></param> /// <returns></returns> public RcFixedRegion AddFixedRegion(string text, string linePrefix = null) { if (string.IsNullOrEmpty(text)) { return(null); } var textLines = text.SplitLines(); var region = LastRegion as RcFixedRegion; if (region == null) { region = new RcFixedRegion(); _regionsList.Add(region); } region.AddTextLines( string.IsNullOrEmpty(linePrefix) ? textLines : textLines.Select(t => linePrefix + t) ); return(region); }
/// <summary> /// Create an exact copy of this region /// </summary> /// <returns></returns> public RcFixedRegion CreateCopy() { var newRegion = new RcFixedRegion(); newRegion._fixedLinesList.AddRange(_fixedLinesList); return(newRegion); }
public RcFixedRegion AddFixedRegionLines(params string[] textLines) { var region = LastRegion as RcFixedRegion; if (region == null) { region = new RcFixedRegion(); _regionsList.Add(region); } region.AddTextLines(textLines); return(region); }
public RcFixedRegion AddFixedRegionLines(IEnumerable <string> textLines) { var region = LastRegion as RcFixedRegion; if (region == null) { region = new RcFixedRegion(); _regionsList.Add(region); } region.AddTextLines(textLines); return(region); }