Exemplo n.º 1
0
        private TextMeasureInfo CreateTextMeasureInfo(Statistics stat)
        {
            TextMeasureInfo info = new TextMeasureInfo();

            if (this.measureCharacters)
            {
                info.Characters = new int?(stat.characters);
            }
            if (this.measureWords)
            {
                info.Words = new int?(stat.words);
            }
            if (this.measureLines)
            {
                info.Lines = new int?(stat.lines);
            }
            return(info);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create a MeasureInfo object for text stats.
        /// <param name="stat">The statistics to use.</param>
        /// <returns>A new TextMeasureInfo object.</returns>
        /// </summary>
        private TextMeasureInfo CreateTextMeasureInfo(Statistics stat)
        {
            TextMeasureInfo tmi = new TextMeasureInfo();

            if (_measureCharacters)
            {
                tmi.Characters = stat.characters;
            }
            if (_measureWords)
            {
                tmi.Words = stat.words;
            }
            if (_measureLines)
            {
                tmi.Lines = stat.lines;
            }

            return(tmi);
        }