상속: IDisposable
예제 #1
0
 public static Document FromBytes(byte[] bytes)
 {
     Document doc = new Document();
     doc.AnsiBytes = bytes;
     doc.Stream = new MemoryStream(doc.AnsiBytes);
     return doc;
 }
예제 #2
0
 public static Document FromAsciiString(string ansiContent)
 {
     Document doc = new Document();
     doc.AnsiBytes = Encoding.ASCII.GetBytes(ansiContent);
     doc.Stream = new MemoryStream(doc.AnsiBytes);
     return doc;
 }
예제 #3
0
        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 };
        }
예제 #4
0
        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 };
        }