Search Results for

    Show / Hide Table of Contents

    Class ConsoleWrapper

    Wrapper for the System.Console class to ensure safety against dumb consoles. This connects to the console wrapper that Terminaux manages.

    Inheritance
    object
    ConsoleWrapper
    Namespace: Terminaux.Base
    Assembly: Terminaux.dll
    Syntax
    public static class ConsoleWrapper

    Properties

    | Edit this page View Source

    BufferHeight

    The console buffer height (rows)

    Declaration
    public static int BufferHeight { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    BufferWidth

    The console buffer width (columns)

    Declaration
    public static int BufferWidth { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    CursorLeft

    The cursor left position

    Declaration
    public static int CursorLeft { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    CursorTop

    The cursor top position

    Declaration
    public static int CursorTop { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    CursorVisible

    The cursor visibility mode

    Declaration
    public static bool CursorVisible { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsDumb

    Checks to see if the console is dumb

    Declaration
    public static bool IsDumb { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    KeyAvailable

    Whether a key is pressed

    Declaration
    public static bool KeyAvailable { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    TreatCtrlCAsInput

    Whether to treat Ctrl + C as input or not

    Declaration
    public static bool TreatCtrlCAsInput { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    WindowHeight

    The console window height (rows)

    Declaration
    public static int WindowHeight { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    WindowWidth

    The console window width (columns)

    Declaration
    public static int WindowWidth { get; set; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Beep()

    Beeps the console

    Declaration
    public static void Beep()
    | Edit this page View Source

    Beep(int, int)

    Beeps the console

    Declaration
    public static void Beep(int freq, int ms)
    Parameters
    Type Name Description
    int freq

    Frequency in hertz

    int ms

    Duration in milliseconds

    | Edit this page View Source

    BeepSeq()

    Beeps the console (VT Sequence method)

    Declaration
    public static void BeepSeq()
    | Edit this page View Source

    Clear()

    Clears the console screen.

    Declaration
    public static void Clear()
    | Edit this page View Source

    ClearLoadBack()

    Clears the console screen while loading the background.

    Declaration
    public static void ClearLoadBack()
    | Edit this page View Source

    GetCursorPosition()

    The cursor top position

    Declaration
    public static Coordinate GetCursorPosition()
    Returns
    Type Description
    Coordinate
    | Edit this page View Source

    ReadKey(bool)

    Reads a key

    Declaration
    public static ConsoleKeyInfo ReadKey(bool intercept = false)
    Parameters
    Type Name Description
    bool intercept

    Whether to intercept

    Returns
    Type Description
    ConsoleKeyInfo
    | Edit this page View Source

    SetBufferDimensions(int, int)

    Sets the buffer dimensions

    Declaration
    public static void SetBufferDimensions(int width, int height)
    Parameters
    Type Name Description
    int width

    The buffer width to be set (from 0)

    int height

    The buffer height to be set (from 0)

    | Edit this page View Source

    SetCursorPosition(int, int)

    Sets the cursor position

    Declaration
    public static void SetCursorPosition(int left, int top)
    Parameters
    Type Name Description
    int left

    The left to be set (from 0)

    int top

    The top to be set (from 0)

    | Edit this page View Source

    SetWindowDimensions(int, int)

    Sets the window dimensions

    Declaration
    public static void SetWindowDimensions(int width, int height)
    Parameters
    Type Name Description
    int width

    The window width to be set (from 0)

    int height

    The window height to be set (from 0)

    | Edit this page View Source

    Write(char)

    Writes a character to console (stdout)

    Declaration
    public static void Write(char value)
    Parameters
    Type Name Description
    char value

    A character

    | Edit this page View Source

    Write(string)

    Writes text to console (stdout)

    Declaration
    public static void Write(string text)
    Parameters
    Type Name Description
    string text

    The text to write

    | Edit this page View Source

    Write(string, params object[])

    Writes text to console (stdout)

    Declaration
    public static void Write(string text, params object[] args)
    Parameters
    Type Name Description
    string text

    The text to write

    object[] args

    The arguments to evaluate

    | Edit this page View Source

    WriteError(char)

    Writes a character to console (stderr)

    Declaration
    public static void WriteError(char value)
    Parameters
    Type Name Description
    char value

    A character

    | Edit this page View Source

    WriteError(string)

    Writes text to console (stderr)

    Declaration
    public static void WriteError(string text)
    Parameters
    Type Name Description
    string text

    The text to write

    | Edit this page View Source

    WriteError(string, params object[])

    Writes text to console (stderr)

    Declaration
    public static void WriteError(string text, params object[] args)
    Parameters
    Type Name Description
    string text

    The text to write

    object[] args

    The arguments to evaluate

    | Edit this page View Source

    WriteLine()

    Writes new line to console (stdout)

    Declaration
    public static void WriteLine()
    | Edit this page View Source

    WriteLine(string)

    Writes text to console (stdout) with line terminator

    Declaration
    public static void WriteLine(string text)
    Parameters
    Type Name Description
    string text

    The text to write

    | Edit this page View Source

    WriteLine(string, params object[])

    Writes text to console (stdout) with line terminator

    Declaration
    public static void WriteLine(string text, params object[] args)
    Parameters
    Type Name Description
    string text

    The text to write

    object[] args

    The arguments to evaluate

    | Edit this page View Source

    WriteLineError()

    Writes new line to console (stderr)

    Declaration
    public static void WriteLineError()
    | Edit this page View Source

    WriteLineError(string)

    Writes text to console (stderr) with line terminator

    Declaration
    public static void WriteLineError(string text)
    Parameters
    Type Name Description
    string text

    The text to write

    | Edit this page View Source

    WriteLineError(string, params object[])

    Writes text to console (stderr) with line terminator

    Declaration
    public static void WriteLineError(string text, params object[] args)
    Parameters
    Type Name Description
    string text

    The text to write

    object[] args

    The arguments to evaluate

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX