IGLib
1.5
The IGLib base library for development of numerical, technical and business applications.
|
Base class for reporter classes that contain either reporting via system console, via message box, via speech, or any combination thereof. More...
Public Member Functions | |
override void | Report (ReportType messagetype, string location, string message, Exception ex) |
Basic reporting method (overloaded). Launches an error report, a warning report or other kind of report/message. Supplemental data (such as objects necessary to launch visualize the report or operation flags) are obtained from the class' instance. More... | |
Static Public Member Functions | |
static void | Articulate (string text, bool only_one) |
Speaks out a specified text. The caller can specify that articulation of only one text can be requested simultaneously. More... | |
static void | Articulate (string text) |
Speeks a specified text. If functino is called from multiple threads simultaneously then calls are serialized. More... | |
Public Attributes | |
ReportDelegate | ReportDlgSpeech = new ReportDelegate(DefaultReport_Speech) |
Delegate that performs error reporting via speech. It calls delegates ReportDlg to assemble error location information and ReportMessageDlg to assemble error message. Then it uses both to assemble the final decorated error message and launches it in its own way. More... | |
ReportLocationDelegate | ReportLocationDlgSpeech = new ReportLocationDelegate(DefaultReportLocation_Speech) |
Delegate that assembles the error location string for reporting via speech. More... | |
ReportMessageDelegate | ReportMessageDlgSpeech = new ReportMessageDelegate(DefaultReportMessage_Speech) |
Delegate that assembles the eror message string for reporting via speech. More... | |
Protected Member Functions | |
override void | ReadAppSettingsBasic (string groupname) |
Reads settings for a specified named group of reporters from the application configuration file. More... | |
virtual void | Report_Speech (ReportType messagetype, string location, string message, Exception ex) |
Launches a report via speech. Report is launched by using special delegates for this kind of reporting. If the corresponding delegates for error location and message are not specified then general delegates are used for this purporse, or location and message string are simple assembled by this function. More... | |
Static Protected Member Functions | |
static void | DefaultReport_Speech (Reporter reporter, ReportType messagetype, string location, string message) |
Delegat for launching a report via speech. More... | |
static string | DefaultReportLocation_Speech (Reporter reporter, ReportType messagetype, string location, Exception ex) |
Delegate for assembling a location string for this kind of report. More... | |
static string | DefaultReportMessage_Speech (Reporter reporter, ReportType messagetype, string basicmessage, Exception ex) |
Delegate for assembling a report message for this kind of report. More... | |
Protected Attributes | |
const string | KeyUseSpeech = "UseSpeech" |
Properties | |
virtual bool | UseSpeech [get, set] |
Gets or sets the flag specifying whether reporting using a message box is performed or not. More... | |
virtual ReportLevel | SpeechLevelSignal [get, set] |
Gets or sets the reporting level for speaking out signals (such as "Warning", "Error", "Information", etc.) More... | |
virtual ReportLevel | SpeechLevelMessage [get, set] |
Gets or sets the reporting level for speaking out message text. More... | |
static object | VoiceLock [get] |
static SpVoice | Voice [get, set] |
Static Private Member Functions | |
static void | ThreadArticulate (object txt) |
Private Attributes | |
bool | _UseSpeech = false |
ReportLevel | _SpeechLevelSignal = ReportLevel.Warning |
ReportLevel | _SpeechLevelMessage = ReportLevel.Off |
Static Private Attributes | |
static SpVoice | _voice = null |
static object | _voiceLock = new object() |
static int | _numSpeaking = 0 |
static string | ArticulateText = "" |
Base class for reporter classes that contain either reporting via system console, via message box, via speech, or any combination thereof.
Code common to all classes is put here. This is to reduce duplication of code as much as possible, while at the same time achieving pure behavior, similar as with ReporterConsoleMsgbox_Base. Interfaces are intended to clearly distinguish between various functionality supported.
|
inlineprotected |
Reads settings for a specified named group of reporters from the application configuration file.
groupname | Name of the group of reporters for which the settings apply. |
|
inline |
Basic reporting method (overloaded). Launches an error report, a warning report or other kind of report/message. Supplemental data (such as objects necessary to launch visualize the report or operation flags) are obtained from the class' instance.
messagetype | The type of the report (e.g. Error, Warning, etc.). |
location | User-provided description of error location. |
message | User-provided description of error. |
ex | Exception thrown when error occurred. |
|
inlinestatic |
Speaks out a specified text. The caller can specify that articulation of only one text can be requested simultaneously.
text | Text to be articulated. |
only_one | If true then only one text can be articulated at a given time. If the function is called during articulation of another text then it exits without triggering articulation. |
|
inlinestatic |
Speeks a specified text. If functino is called from multiple threads simultaneously then calls are serialized.
text | Text to be spoken. |
|
inlinestaticprotected |
Delegat for launching a report via speech.
reporter | Reporter object where additional information can be found. |
messagetype | Type of the report(Error, Warning, Info...). |
location | Short string desctribing location where report was triggered. |
message | Message of the report. |
References IG.ReporterMsgForms.ReporterConsoleMsgboxSpeech_Base.SpeechLevelMessage, and IG.ReporterMsgForms.ReporterConsoleMsgboxSpeech_Base.SpeechLevelSignal.
|
inlinestaticprivate |
|
inlinestaticprotected |
Delegate for assembling a location string for this kind of report.
reporter | Reporter object where additional information can be found. |
messagetype | Type of the report(Error, Warning, Info...). |
location | User provided location string. |
ex | Exception that triggered reporting. |
|
inlinestaticprotected |
Delegate for assembling a report message for this kind of report.
reporter | Reporter object where additional information can be found. |
messagetype | Type of the report(Error, Warning, Info...). |
basicmessage | User provided message string. |
ex | Exception that triggered reporting. |
|
inlineprotectedvirtual |
Launches a report via speech. Report is launched by using special delegates for this kind of reporting. If the corresponding delegates for error location and message are not specified then general delegates are used for this purporse, or location and message string are simple assembled by this function.
messagetype | Type of the report(Error, Warning, Info...). |
location | User provided location string. |
message | User provided message string. |
ex | Exception that triggered reporting. |
|
protected |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
ReportDelegate IG.ReporterMsgForms.ReporterConsoleMsgboxSpeech_Base.ReportDlgSpeech = new ReportDelegate(DefaultReport_Speech) |
Delegate that performs error reporting via speech. It calls delegates ReportDlg to assemble error location information and ReportMessageDlg to assemble error message. Then it uses both to assemble the final decorated error message and launches it in its own way.
ReportLocationDelegate IG.ReporterMsgForms.ReporterConsoleMsgboxSpeech_Base.ReportLocationDlgSpeech = new ReportLocationDelegate(DefaultReportLocation_Speech) |
Delegate that assembles the error location string for reporting via speech.
ReportMessageDelegate IG.ReporterMsgForms.ReporterConsoleMsgboxSpeech_Base.ReportMessageDlgSpeech = new ReportMessageDelegate(DefaultReportMessage_Speech) |
Delegate that assembles the eror message string for reporting via speech.
|
staticprivate |
|
getset |
Gets or sets the flag specifying whether reporting using a message box is performed or not.
|
getset |
Gets or sets the reporting level for speaking out signals (such as "Warning", "Error", "Information", etc.)
Referenced by IG.ReporterMsgForms.ReporterConsoleMsgboxSpeech_Base.DefaultReport_Speech().
|
getset |
Gets or sets the reporting level for speaking out message text.
Referenced by IG.ReporterMsgForms.ReporterConsoleMsgboxSpeech_Base.DefaultReport_Speech().
|
staticget |
|
staticgetset |