C# Class ACAT.Lib.Extension.AlphabetScannerCommon

This is a helper class exclusively for Alphabet scanners. It does a lot of the heavy lifting required for word predictions for instance. This eases coding for Alphabet scanners. Create an object of this type in the Alphabet scanner class
Inheritance: IDisposable
Afficher le fichier Open project: brlima94/acat-localization Class Usage Examples

Méthodes publiques

Méthode Description
AlphabetScannerCommon ( IScannerPanel scannerPanel ) : System

Constructor. Initialize the various controls and display the UI

CheckWidgetEnabled ( ACAT.Lib.Core.AgentManagement.CheckEnabledArgs arg ) : bool

Checks if the widget in arg needs to be enabled or not depending on the context. Call this in the CheckWidgetEnabled function in the Alphabet scanner.

Dispose ( ) : void

Call this in the Dispose() function of the Alphabet scanner

Initialize ( ACAT.Lib.Core.PanelManagement.StartupArg startupArg ) : bool

Call this in the Initialize function of the Alphabet scanner

OnClosing ( object sender, FormClosingEventArgs e ) : void

Release resources and stop threads/timers. Call this in the OnClosing() function in the Alphabet scanner.

OnFocusChanged ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo info ) : void

Invoked when the focus changes either in the active window or when the active window itself changes. Call this from the OnFocusChanged function in the Alphabet scanner

OnFormClosing ( FormClosingEventArgs e ) : void

Scanner is closing. Call this in the OnFormClosing function in the Alphabet scanner.

OnLoad ( object sender, EventArgs e ) : void

The form has loaded. Start the animation sequence. Call this from the OnLoad function in the Alphabet scanner

OnPause ( ) : void

Pause the application. Call this in the OnPause function in the Alphabet scanner.

OnResume ( ) : void

Resumes the application. Call this in the OnResume function in the Alphabet scanner.

OnWidgetActuated ( ACAT.Lib.Core.WidgetManagement.Widget widget, bool &handled ) : void

Triggered when a widget is actuated. Call this in the OnWidgetActuated function in the Alphabet scanner.

RestoreDefaults ( ) : void

Restores default size and position. Call this in the RestoreDefaults function in the Alphabet scanner.

SaveScaleSetting ( ) : void

Saves the current scale setting

SaveSettings ( ) : void

Saves current size/position settings. Call this in the SaveSettings function in the Alphabet scanner.

ScaleDefault ( ) : void

Sets the default scale factor

ScaleDown ( ) : void

Zooms out the scanner. Call this in the ScaleDown function in the Alphabet scanner.

ScaleUp ( ) : void

Zooms in the scanner. Call this in the ScaleUp function in the Alphabet scanner.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Disposer. Releases resources and cleanup.

Private Methods

Méthode Description
AppAgent_EvtTextChanged ( object sender, EventArgs e ) : void

Something changed in the output text window. Sest the word in the "CurrentWordWidget" box and do a fresh word prediction

KeyStateTracker_EvtKeyStateChanged ( ) : void

Some modifier key was pressed. Handled it.

WndProc ( Message &m ) : bool
contains ( IEnumerable list, int count, String word ) : bool

Checks if the word is in the list

formatWord ( int index, String word ) : String

Formats the prediction word with the index

refreshWordPredictionsAndSetCurrentWord ( ) : void

Fetch new set of words into the prediction list box

subscribeToEvents ( ) : void

Subscribes to all the events triggered by the widgets and the interpreter

subscribeToTalkManagerEvents ( ) : void

Subscribes to events triggered by the Output manager

tryRefreshWordPredictionsAndSetCurrentWord ( ) : bool

Refreshes the word prediction list and also updates the current word box with the word that is currently being typed.

Method Details

AlphabetScannerCommon() public méthode

Constructor. Initialize the various controls and display the UI
public AlphabetScannerCommon ( IScannerPanel scannerPanel ) : System
scannerPanel IScannerPanel
Résultat System

CheckWidgetEnabled() public méthode

Checks if the widget in arg needs to be enabled or not depending on the context. Call this in the CheckWidgetEnabled function in the Alphabet scanner.
public CheckWidgetEnabled ( ACAT.Lib.Core.AgentManagement.CheckEnabledArgs arg ) : bool
arg ACAT.Lib.Core.AgentManagement.CheckEnabledArgs widget info
Résultat bool

Dispose() public méthode

Call this in the Dispose() function of the Alphabet scanner
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Disposer. Releases resources and cleanup.
protected Dispose ( bool disposing ) : void
disposing bool true to dispose managed resources
Résultat void

Initialize() public méthode

Call this in the Initialize function of the Alphabet scanner
public Initialize ( ACAT.Lib.Core.PanelManagement.StartupArg startupArg ) : bool
startupArg ACAT.Lib.Core.PanelManagement.StartupArg startup arguments
Résultat bool

OnClosing() public méthode

Release resources and stop threads/timers. Call this in the OnClosing() function in the Alphabet scanner.
public OnClosing ( object sender, FormClosingEventArgs e ) : void
sender object
e System.Windows.Forms.FormClosingEventArgs
Résultat void

OnFocusChanged() public méthode

Invoked when the focus changes either in the active window or when the active window itself changes. Call this from the OnFocusChanged function in the Alphabet scanner
public OnFocusChanged ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo info ) : void
info ACAT.Lib.Core.Utility.WindowActivityMonitorInfo
Résultat void

OnFormClosing() public méthode

Scanner is closing. Call this in the OnFormClosing function in the Alphabet scanner.
public OnFormClosing ( FormClosingEventArgs e ) : void
e System.Windows.Forms.FormClosingEventArgs event args
Résultat void

OnLoad() public méthode

The form has loaded. Start the animation sequence. Call this from the OnLoad function in the Alphabet scanner
public OnLoad ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void

OnPause() public méthode

Pause the application. Call this in the OnPause function in the Alphabet scanner.
public OnPause ( ) : void
Résultat void

OnResume() public méthode

Resumes the application. Call this in the OnResume function in the Alphabet scanner.
public OnResume ( ) : void
Résultat void

OnWidgetActuated() public méthode

Triggered when a widget is actuated. Call this in the OnWidgetActuated function in the Alphabet scanner.
public OnWidgetActuated ( ACAT.Lib.Core.WidgetManagement.Widget widget, bool &handled ) : void
widget ACAT.Lib.Core.WidgetManagement.Widget widget that was actuated
handled bool set to true if handled
Résultat void

RestoreDefaults() public méthode

Restores default size and position. Call this in the RestoreDefaults function in the Alphabet scanner.
public RestoreDefaults ( ) : void
Résultat void

SaveScaleSetting() public méthode

Saves the current scale setting
public SaveScaleSetting ( ) : void
Résultat void

SaveSettings() public méthode

Saves current size/position settings. Call this in the SaveSettings function in the Alphabet scanner.
public SaveSettings ( ) : void
Résultat void

ScaleDefault() public méthode

Sets the default scale factor
public ScaleDefault ( ) : void
Résultat void

ScaleDown() public méthode

Zooms out the scanner. Call this in the ScaleDown function in the Alphabet scanner.
public ScaleDown ( ) : void
Résultat void

ScaleUp() public méthode

Zooms in the scanner. Call this in the ScaleUp function in the Alphabet scanner.
public ScaleUp ( ) : void
Résultat void