• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language Pascal
  • License
    MIT License
  • Created about 7 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Console class from C# ported to Delphi

DelphiConsole

The Console class from C# ported to Delphi

/*=============================================================================
**
** Class: Console
**
**
** Purpose: This class provides access to the standard input, standard output
**          and standard error streams.
**
**
=============================================================================*/

Properties

Name

Description

BackgroundColor Gets or sets the background color of the console.
BufferHeight Gets or sets the height of the buffer area.
BufferWidth Gets or sets the width of the buffer area.
CapsLock Gets a value indicating whether the CAPS LOCK keyboard toggle is turned on or turned off.
CursorLeft Gets or sets the column position of the cursor within the buffer area.
CursorSize Gets or sets the height of the cursor within a character cell.
CursorTop Gets or sets the row position of the cursor within the buffer area.
CursorVisible Gets or sets a value indicating whether the cursor is visible.
Error Gets the standard error output stream.
ForegroundColor Gets or sets the foreground color of the console.
In Gets the standard input stream.
InputEncoding Gets or sets the encoding the console uses to read input.
IsErrorRedirected Gets a value that indicates whether the error output stream has been redirected from the standard error stream.
IsInputRedirected Gets a value that indicates whether input has been redirected from the standard input stream.
IsOutputRedirected Gets a value that indicates whether output has been redirected from the standard output stream.
KeyAvailable Gets a value indicating whether a key press is available in the input stream.
LargestWindowHeight Gets the largest possible number of console window rows, based on the current font and screen resolution.
LargestWindowWidth Gets the largest possible number of console window columns, based on the current font and screen resolution.
NumberLock Gets a value indicating whether the NUM LOCK keyboard toggle is turned on or turned off.
Out Gets the standard output stream.
OutputEncoding Gets or sets the encoding the console uses to write output.
Title Gets or sets the title to display in the console title bar.
TreatControlCAsInput Gets or sets a value indicating whether the combination of the Control modifier key and C console key (Ctrl+C) is treated as ordinary input or as an interruption that is handled by the operating system.
WindowHeight Gets or sets the height of the console window area.
WindowLeft Gets or sets the leftmost position of the console window area relative to the screen buffer.
WindowTop Gets or sets the top position of the console window area relative to the screen buffer.
WindowWidth Gets or sets the width of the console window.

Methods

Name

Description

Beep() Plays the sound of a beep through the console speaker.
Beep(Int32, Int32) Plays the sound of a beep of a specified frequency and duration through the console speaker.
Clear() Clears the console buffer and corresponding console window of display information.
MoveBufferArea(Int32, Int32, Int32, Int32, Int32, Int32) Copies a specified source area of the screen buffer to a specified destination area.
MoveBufferArea(Int32, Int32, Int32, Int32, Int32, Int32, Char, ConsoleColor, ConsoleColor) Copies a specified source area of the screen buffer to a specified destination area.
OpenStandardError() Acquires the standard error stream.
OpenStandardError(Int32) Acquires the standard error stream, which is set to a specified buffer size.
OpenStandardInput() Acquires the standard input stream.
OpenStandardInput(Int32) Acquires the standard input stream, which is set to a specified buffer size.
OpenStandardOutput() Acquires the standard output stream.
OpenStandardOutput(Int32) Acquires the standard output stream, which is set to a specified buffer size.
Read() Reads the next character from the standard input stream.
ReadKey() Obtains the next character or function key pressed by the user. The pressed key is displayed in the console window.
ReadKey(Boolean) Obtains the next character or function key pressed by the user. The pressed key is optionally displayed in the console window.
ReadLine() Reads the next line of characters from the standard input stream.
ResetColor() Sets the foreground and background console colors to their defaults.
SetBufferSize(Int32, Int32) Sets the height and width of the screen buffer area to the specified values.
SetCursorPosition(Int32, Int32) Sets the position of the cursor.
SetError(TextWriter) Sets the Error property to the specified TextWriter object.
SetIn(TextReader) Sets the In property to the specified TextReader object.
SetOut(TextWriter) Sets the Out property to the specified TextWriter object.
SetWindowPosition(Int32, Int32) Sets the position of the console window relative to the screen buffer.
SetWindowSize(Int32, Int32) Sets the height and width of the console window to the specified values.
Write(Boolean) Writes the text representation of the specified Boolean value to the standard output stream.
Write(Char) Writes the specified Unicode character value to the standard output stream.
Write(Char[]) Writes the specified array of Unicode characters to the standard output stream.
Write(Char[], Int32, Int32) Writes the specified subarray of Unicode characters to the standard output stream.
Write(Decimal) Writes the text representation of the specified Decimal value to the standard output stream.
Write(Double) Writes the text representation of the specified double-precision floating-point value to the standard output stream.
Write(Int32) Writes the text representation of the specified 32-bit signed integer value to the standard output stream.
Write(Int64) Writes the text representation of the specified 64-bit signed integer value to the standard output stream.
Write(Object) Writes the text representation of the specified object to the standard output stream.
Write(Single) Writes the text representation of the specified single-precision floating-point value to the standard output stream.
Write(String) Writes the specified string value to the standard output stream.
Write(String, Object) Writes the text representation of the specified object to the standard output stream using the specified format information.
Write(String, Object, Object) Writes the text representation of the specified objects to the standard output stream using the specified format information.
Write(String, Object, Object, Object) Writes the text representation of the specified objects to the standard output stream using the specified format information.
Write(String, Object, Object, Object, Object) Writes the text representation of the specified objects and variable-length parameter list to the standard output stream using the specified format information.
Write(String, Object[]) Writes the text representation of the specified array of objects to the standard output stream using the specified format information.
Write(UInt32) Writes the text representation of the specified 32-bit unsigned integer value to the standard output stream.
Write(UInt64) Writes the text representation of the specified 64-bit unsigned integer value to the standard output stream.
WriteLine() Writes the current line terminator to the standard output stream.
WriteLine(Boolean) Writes the text representation of the specified Boolean value, followed by the current line terminator, to the standard output stream.
WriteLine(Char) Writes the specified Unicode character, followed by the current line terminator, value to the standard output stream.
WriteLine(Char[]) Writes the specified array of Unicode characters, followed by the current line terminator, to the standard output stream.
WriteLine(Char[], Int32, Int32) Writes the specified subarray of Unicode characters, followed by the current line terminator, to the standard output stream.
WriteLine(Decimal) Writes the text representation of the specified Decimal value, followed by the current line terminator, to the standard output stream.
WriteLine(Double) Writes the text representation of the specified double-precision floating-point value, followed by the current line terminator, to the standard output stream.
WriteLine(Int32) Writes the text representation of the specified 32-bit signed integer value, followed by the current line terminator, to the standard output stream.
WriteLine(Int64) Writes the text representation of the specified 64-bit signed integer value, followed by the current line terminator, to the standard output stream.
WriteLine(Object) Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream.
WriteLine(Single) Writes the text representation of the specified single-precision floating-point value, followed by the current line terminator, to the standard output stream.
WriteLine(String) Writes the specified string value, followed by the current line terminator, to the standard output stream.
WriteLine(String, Object) Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream using the specified format information.
WriteLine(String, Object, Object) Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information.
WriteLine(String, Object, Object, Object) Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information.
WriteLine(String, Object, Object, Object, Object) Writes the text representation of the specified objects and variable-length parameter list, followed by the current line terminator, to the standard output stream using the specified format information.
WriteLine(String, Object[]) Writes the text representation of the specified array of objects, followed by the current line terminator, to the standard output stream using the specified format information.
WriteLine(UInt32) Writes the text representation of the specified 32-bit unsigned integer value, followed by the current line terminator, to the standard output stream.
WriteLine(UInt64) Writes the text representation of the specified 64-bit unsigned integer value, followed by the current line terminator, to the standard output stream.

More Repositories

1

Hooks

Keyboard and Mouse hooks as classes
Pascal
35
star
2

GoogleSpeak

This repository demonstrates how to Use Google for implementing Text to Speech. You'll find both a Delphi version and a C# version
Pascal
28
star
3

Captcha-Verification

Delphi version of Captcha Verification
Pascal
24
star
4

EasyConsole

EasyConsole is a library to make it easier for developers to build a simple menu interface for a Delphi console application.
Pascal
22
star
5

Delphi-REST-Orm

Delphi Rest Orm - At simple yet powerful ORM to query a WebService
Pascal
19
star
6

OnlineOffline

Delphi unit to check Online state
Pascal
17
star
7

FindNearestString

How to find the nearest string in a list
Pascal
15
star
8

2048

A Delphi clone of the classic game: 2048
Pascal
12
star
9

TWinEventHook

TWinEventHook allows you to hook into certain Windows events.
Pascal
11
star
10

MainThreadFreezeDetection

A Delphi project to detect Freeze in the Main Thread.
Pascal
9
star
11

Print-and-Merge-Suite

Print and Merge reports
Pascal
9
star
12

Json-Interceptors

Json Interceptors
Pascal
8
star
13

Log4Delphi

The Log4Delphi library is a tool to help the programmer output log statements to a variety of output targets. Log4Delphi is a port of the excellent Apache log4jâ„¢ framework to Delphi. I have kept the framework similar in spirit to the original log4j while keeping Delphi in mind
Pascal
8
star
14

Simple-Expression-Evaluator

Simple Expression Evaluator
Pascal
7
star
15

Deep-Stack

How to use the Deep Stack server from Delphi
Pascal
5
star
16

ViewOnly

Extending TWinControls with a ViewOnly property
Pascal
5
star
17

IsDelphi

Compiled with Delphi?
Pascal
4
star
18

AnalogClock

An Analog Clock impelmented using the UWP framework
C#
3
star
19

TwoFactor

An implementation of Google's two factor authentication
C#
2
star
20

WifiKey

List all known Wifi profiles and its password
C#
2
star
21

Jens-Borrisholt

Captcha Verification
1
star
22

DelphiSpeedTest

Compares the speed of Delphi vs. c#
C#
1
star
23

Holidays

Canculation of National Holidays
C#
1
star
24

DR-DOWNLOADER

Download programs from DR (Danmarks Radio)
C#
1
star