public DocumentViewer()
        {
            textBox = new TextBox();
            textBox.Location = new Point(0, 0);
            Controls.Add(textBox);
            textBox.Dock = DockStyle.Fill;
            textBox.ReadOnly = true;
            textBox.WordWrap = false;
            textBox.Multiline = true;
            textBox.ScrollBars = ScrollBars.Vertical; // RichTextBoxScrollBars.ForcedVertical;

            Font = new Font("Courier New", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 0);
            writer = new DocumentWriter();
        }
 public Document Print()
 {
     var writer = new DocumentWriter();
     writer.WriteLine("Corpus size is: " + DocumentUtil.Print(length) + " characters.");
     foreach (var key in keyboard.AllChars)
     {
         writer.WriteLine(DocumentUtil.Empty + "From" - key - "to:");
         writer.StartBlock(1);
         foreach (var toKey in keyboard.AllChars)
         {
             writer.WriteLine(DocumentUtil.Empty + toKey - "=" - (this[key, toKey] * 100).ToString("F10") + "%");
         }
         writer.EndBlock();
     }
     return writer.ToDocument();
 }
 public Document Print(KeyboardLayout layout)
 {
     var builder = new DocumentWriter();
     foreach (var from in keyboard.Positions)
     {
         builder.Write("From".Print() - layout[from].RegularChar.Print());
         builder.StartBlock(1);
         foreach (var to in keyboard.Positions)
         {
             var info = this[from, to];
             builder.WriteLine("To" - layout[to].RegularChar.Print() + DocumentUtil.Semi - info.Print());
         }
         builder.EndBlock();
     }
     return builder.ToDocument();
 }