ACAT.Extensions.Default.FunctionalAgents.FileBrowserAgent.FileBrowserScanner.handleWidgetSelection C# (CSharp) Method

handleWidgetSelection() private method

Handle actuation of a widget - navigate, select file etc depending on what the widget represents
private handleWidgetSelection ( Widget widget, bool &handled ) : void
widget Widget widget to actuate
handled bool true if handled
return void
        private void handleWidgetSelection(Widget widget, ref bool handled)
        {
            if (widget.UserData is FileInfo)
            {
                onFileSelected((FileInfo)widget.UserData);
                handled = true;
            }
            else
            {
                handled = true;
                switch (widget.Value)
                {
                    case "@Quit":
                        if (EvtDone != null)
                        {
                            EvtDone.BeginInvoke(false, null, null);
                        }
                        break;

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

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

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

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

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

                    default:
                        handled = false;
                        break;
                }
            }
        }