Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create an exact copy of this region
        /// </summary>
        /// <returns></returns>
        public RcFixedRegion CreateCopy()
        {
            var newRegion = new RcFixedRegion();

            newRegion._fixedLinesList.AddRange(_fixedLinesList);

            return(newRegion);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }