示例#1
0
 public void Write(TextWriter writer, CharacterWidth[] widths)
 {
     foreach (var width in widths)
     {
         writer.Write(string.Empty.PadRight(width.Width, _character));
     }
 }
示例#2
0
 public void Write(TextWriter writer, CharacterWidth[] widths)
 {
     for (var i = 0; i < widths.Length; i++)
     {
         var width = widths[i];
         writer.Write(_contents[i].PadRight(width.Width));
     }
 }
示例#3
0
 public void OverwriteCounts(CharacterWidth[] widths)
 {
     for (var i = 0; i < widths.Length; i++)
     {
         var width = widths[i];
         width.SetWidth(_contents[i].Length);
     }
 }
示例#4
0
 public void Write(TextWriter writer, CharacterWidth[] widths)
 {
     for (int i = 0; i < widths.Length; i++)
     {
         CharacterWidth width = widths[i];
         writer.Write(_contents[i].PadRight(width.Width));
     }
 }
示例#5
0
 public void OverwriteCounts(CharacterWidth[] widths)
 {
     for (int i = 0; i < widths.Length; i++)
     {
         CharacterWidth width = widths[i];
         width.SetWidth(_contents[i].Length);
     }
 }
示例#6
0
        public void Write(StringWriter writer)
        {
            var widths = CharacterWidth.For(_columnCount);

            foreach (var line in _lines)
            {
                line.OverwriteCounts(widths);
            }

            for (var i = 0; i < widths.Length - 1; i++)
            {
                var width = widths[i];
                width.Add(5);
            }

            foreach (var line in _lines)
            {
                writer.WriteLine();
                line.Write(writer, widths);
            }
        }
示例#7
0
 public void OverwriteCounts(CharacterWidth[] widths)
 {
     // no-op
 }
 public void Write(TextWriter writer, CharacterWidth[] widths)
 {
     writer.WriteLine(Contents);
 }