ACAT.Extensions.Default.UI.Scanners.TalkApplicationScannerAlphabetical.OnWidgetActuated C# (CSharp) Method

OnWidgetActuated() public method

Triggered when the user actuates a widget
public OnWidgetActuated ( Widget widget, bool &handled ) : void
widget Widget widget actuated
handled bool was this handled?
return void
        public void OnWidgetActuated(Widget widget, ref bool handled)
        {
            switch (widget.Value)
            {
                case "@Phrase1":
                case "@Phrase2":
                case "@Phrase3":
                case "@Phrase4":
                case "@Phrase5":
                case "@Phrase6":
                case "@Phrase7":
                case "@Phrase8":
                case "@Phrase9":
                    handled = true;
                    String text = widget.GetText().Trim();
                    if (!String.IsNullOrEmpty(text))
                    {
                        Context.AppTTSManager.ActiveEngine.Speak(text);
                    }
                    break;
            }
            _alphabetScannerCommon.OnWidgetActuated(widget, ref handled);
        }