Class TConsoleWatcher
Unit
Declaration
type TConsoleWatcher = class(TThread)
Description
This class aims to run an application that can run indefinitely. This execution takes place through a specific thread, allowing the main application to perform other tasks in the meantime. It is possible to interrupt its execution at any time through the Stop method. It is also possible to obtain the output generated by the application using the GetMessage command.
Hierarchy
- TObject
- TThread
- TConsoleWatcher
Overview
Methods
constructor Create(const AProgram: string; AParams: TArray<string>); |
|
destructor Destroy; override; |
|
procedure Execute; override; |
|
procedure Stop; |
|
function GetMessage: string; |
Properties
property IsRunning: Boolean read FIsRunning; |
|
property Executed: Boolean read FExecuted; |
Description
Methods
destructor Destroy; override; |
|
Class destructor that release resources allocate by the class. |
function GetMessage: string; |
|
Returns the output of the program being executed and clears the current content of this message, so if it is called again its content will not be the same. |
Properties
property IsRunning: Boolean read FIsRunning; |
|
Indicates that the thread is still running waiting for the program to finish. |
property Executed: Boolean read FExecuted; |
|
Indicates that the command was executed. |
Generated by PasDoc 0.16.0.