AnsiWriter Class
Definition
Section titled “Definition”Writes a Document to a ICellSurface.
public class AnsiWriterInheritance object
Constructors
Section titled “Constructors”AnsiWriter(Document, ICellSurface)
Section titled “AnsiWriter(Document, ICellSurface)”Creates a new instance with the source document and target surface.
public AnsiWriter(Document ansiDocument, ICellSurface editor)Parameters
Section titled “Parameters”ansiDocument Document
The source document containing ANSI commands.
editor ICellSurface
The surface to parse the ANSI to.
Properties
Section titled “Properties”AnsiDocument
Section titled “AnsiDocument”The document used to create this writer.
public Document AnsiDocument { get; }BlinkEffect
Section titled “BlinkEffect”The blink effect to apply when the ansi document provides the ANSI blink command.
public ICellEffect BlinkEffect { get; set; }Cursor
Section titled “Cursor”The cursor used to write to the target ICellSurface.
public Cursor Cursor { get; }CharactersPerSecond
Section titled “CharactersPerSecond”How many characters to process a second. When set to 0 reads the entire document at once.
public int CharactersPerSecond { get; set; }Methods
Section titled “Methods”Process(double)
Section titled “Process(double)”Processes the document by the amount of time that has elapsed. If CharactersPerSecond is 0, time elapsed has no affect.
public void Process(double timeElapsed)Parameters
Section titled “Parameters”timeElapsed double
The time in seconds.
AnsiInterpret(string)
Section titled “AnsiInterpret(string)”Interprets an individual ansi code.
public void AnsiInterpret(string code)Parameters
Section titled “Parameters”code string
The ANSI.SYS code to read.
AnsiReadLine(string, bool)
Section titled “AnsiReadLine(string, bool)”Reads a line of ANSI.SYS code.
public bool AnsiReadLine(string line, bool moreLines = false)Parameters
Section titled “Parameters”line string
The line to read.
moreLines bool
When true, calls LineFeed(); otherwise does nothing.
Returns
Section titled “Returns”bool
Returns false when character 26 is encountered; otherwise true.
ReadEntireDocument()
Section titled “ReadEntireDocument()”Loads an ansi file and parses it.
public void ReadEntireDocument()Restart()
Section titled “Restart()”Moves the reader back to the start of the file so that the source can .
public void Restart()