C# Класс LitDev.LDTextWindow

Показать файл Открыть проект

Открытые методы

Метод Описание
Capture ( Primitive fileName, Primitive border ) : Primitive

Save the TextWindow as an image file (png, jpg, bmp, gif, tiff or ico). The window must be visible and a short delay may be required after updating the window before calling.

Hide ( ) : void

Hide the TextWindow. Replacement for standard method that may fail (do not mix these methods).

Print ( Primitive border ) : void

Print the TextWindow contents. The window must be visible and a short delay may be required after updating the window before calling.

Read ( Primitive delay ) : Primitive

Read from a TextWindow with a maximum delay. This sends a Return (ENTER) to the TextWindow after the delay. If the user presses Return before the delay is completed, then no further action is taken.

ReadNumber ( Primitive delay ) : Primitive

Read a number from a TextWindow with a maximum delay. This sends a Return (ENTER) to the TextWindow after the delay. If the user presses Return before the delay is completed, then no further action is taken.

SendKey ( Primitive window, Primitive key ) : void

Send a key to a window. This is the same a typing the key into a window.

SetColour ( Primitive index, Primitive colour ) : void

Replace one of the standard TextWindow colours. There are 16 available colours, by default they are indexed 0 to 15: Black (0), DarkBlue (1), DarkGreen (2), DarkCyan (3), DarkRed (4), DarkMagenta (5), DarkYellow (6), Gray (7), DarkGray (8), Blue (9), Green (10), Cyan (11), Red (12), Magenta (13), Yellow (14), White (15). Note that you can still use TextWindow.BackgroundColor and TextWindow.ForegroundColor to use the new colours (with the original colour names), alternatively the colours can be selected using LDTextWindow.SetColours from the indices. The colours must be set using either method before they are applied.

SetColours ( Primitive fgIndex, Primitive bgIndex ) : void

Set the current foreground and background colour indices.

Show ( ) : void

Show the TextWindow and give it focus. Replacement for standard method that may fail (do not mix these methods).

Приватные методы

Метод Описание
Delay ( Object delay ) : void
HookCallback ( int nCode, IntPtr wParam, IntPtr lParam ) : IntPtr
HookThread ( ) : void
SetHook ( ) : void

Описание методов

Capture() публичный статический Метод

Save the TextWindow as an image file (png, jpg, bmp, gif, tiff or ico). The window must be visible and a short delay may be required after updating the window before calling.
public static Capture ( Primitive fileName, Primitive border ) : Primitive
fileName Primitive /// The file to save the image to (*.png, *.jpg, *.bmp, *.gif, *.tiff or *.ico). /// If this is set to "", then the image is created internally as an ImageList. ///
border Primitive /// Include the window border ("True" or "False"). ///
Результат Primitive

Hide() публичный статический Метод

Hide the TextWindow. Replacement for standard method that may fail (do not mix these methods).
public static Hide ( ) : void
Результат void

Print() публичный статический Метод

Print the TextWindow contents. The window must be visible and a short delay may be required after updating the window before calling.
public static Print ( Primitive border ) : void
border Primitive /// Include the window border ("True" or "False"). ///
Результат void

Read() публичный статический Метод

Read from a TextWindow with a maximum delay. This sends a Return (ENTER) to the TextWindow after the delay. If the user presses Return before the delay is completed, then no further action is taken.
public static Read ( Primitive delay ) : Primitive
delay Primitive A maximum delay in ms before the Read is terminated.
Результат Primitive

ReadNumber() публичный статический Метод

Read a number from a TextWindow with a maximum delay. This sends a Return (ENTER) to the TextWindow after the delay. If the user presses Return before the delay is completed, then no further action is taken.
public static ReadNumber ( Primitive delay ) : Primitive
delay Primitive A maximum delay in ms before the Read is terminated.
Результат Primitive

SendKey() публичный статический Метод

Send a key to a window. This is the same a typing the key into a window.
public static SendKey ( Primitive window, Primitive key ) : void
window Primitive The window title e.g. TextWindow.Title or GraphicsWindow.Title.
key Primitive The key to send e.g. "Return"
Результат void

SetColour() публичный статический Метод

Replace one of the standard TextWindow colours. There are 16 available colours, by default they are indexed 0 to 15: Black (0), DarkBlue (1), DarkGreen (2), DarkCyan (3), DarkRed (4), DarkMagenta (5), DarkYellow (6), Gray (7), DarkGray (8), Blue (9), Green (10), Cyan (11), Red (12), Magenta (13), Yellow (14), White (15). Note that you can still use TextWindow.BackgroundColor and TextWindow.ForegroundColor to use the new colours (with the original colour names), alternatively the colours can be selected using LDTextWindow.SetColours from the indices. The colours must be set using either method before they are applied.
public static SetColour ( Primitive index, Primitive colour ) : void
index Primitive The stanadard colour index colour to replace.
colour Primitive Any colour to replace a standard colour with.
Результат void

SetColours() публичный статический Метод

Set the current foreground and background colour indices.
public static SetColours ( Primitive fgIndex, Primitive bgIndex ) : void
fgIndex Primitive The foreground colour index (0 to 15).
bgIndex Primitive The background colour index (0 to 15).
Результат void

Show() публичный статический Метод

Show the TextWindow and give it focus. Replacement for standard method that may fail (do not mix these methods).
public static Show ( ) : void
Результат void