ACAT.Extensions.Default.FunctionalAgents.PhraseSpeakAgent.PhraseSpeakScanner.handleWidgetSelection C# (CSharp) Метод

handleWidgetSelection() приватный метод

Handles actuation of a widget
private handleWidgetSelection ( Widget widget, bool &handled ) : void
widget Widget widget actuated
handled bool true if handled
Результат void
        private void handleWidgetSelection(Widget widget, ref bool handled)
        {
            // the user actuated an abbreviation in the list
            if (widget.UserData is Abbreviation)
            {
                Abbreviation a = (Abbreviation)widget.UserData;
                TTSManager.Instance.ActiveEngine.Speak(a.Expansion);
                handled = true;
            }
            else
            {
                handled = true;
                switch (widget.Value)
                {
                    case "@Quit":
                        if (EvtDone != null)
                        {
                            EvtDone.BeginInvoke(false, null, null);
                        }
                        break;

                    case "@AbbrListSort":
                        switchSortOrder();
                        break;

                    case "@AbbrListNextPage":
                        gotoNextPage();
                        break;

                    case "@AbbrListPrevPage":
                        gotoPreviousPage();
                        break;

                    case "@AbbrListClearFilter":
                        ClearFilter();
                        break;

                    case "@AbbrListSearch":
                        if (EvtShowScanner != null)
                        {
                            EvtShowScanner.BeginInvoke(null, null, null, null);
                        }
                        break;

                    default:
                        handled = false;
                        break;
                }
            }
        }