public static Document FromBytes(byte[] bytes) { Document doc = new Document(); doc.AnsiBytes = bytes; doc.Stream = new MemoryStream(doc.AnsiBytes); return doc; }
public static Document FromAsciiString(string ansiContent) { Document doc = new Document(); doc.AnsiBytes = Encoding.ASCII.GetBytes(ansiContent); doc.Stream = new MemoryStream(doc.AnsiBytes); return doc; }
public AnsiWriter(Document ansiDocument, Console console) { _ansiDoc = ansiDocument; _console = console; _cursor = new Console.Cursor(console); CharactersPerSecond = 800; _bytes = ansiDocument.AnsiBytes; _ansiState = new State(); _ansiCodeBuilder = new StringBuilder(5); _ansiStringBuilder = new StringBuilder(40); BlinkEffect = new Blink() { BlinkSpeed = 0.35f }; }
public AnsiWriter(Document ansiDocument, SurfaceEditor editor) { _ansiDoc = ansiDocument; _editor = editor; _cursor = new Cursor(editor); _cursor.UseStringParser = false; _cursor.DisableWordBreak = true; CharactersPerSecond = 800; _bytes = ansiDocument.AnsiBytes; _ansiState = new State(); _ansiCodeBuilder = new StringBuilder(5); _ansiStringBuilder = new StringBuilder(40); BlinkEffect = new Blink() { BlinkSpeed = 0.35f }; }