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

ClearFilter() public method

Clears the search filter
public ClearFilter ( ) : void
return void
        public void ClearFilter()
        {
            Invoke(new MethodInvoker(delegate
            {
                if (SearchFilter.Text.Length > 0 && DialogUtils.ConfirmScanner(Resources.ClearFilter))
                {
                    SearchFilter.Text = String.Empty;
                }
            }));
        }

Usage Example

        /// <summary>
        /// Invoked when there is a request to run a command. This
        /// could as a result of the user activating a button on the
        /// scanner and there is a command associated with the button
        /// </summary>
        /// <param name="command">command to run</param>
        /// <param name="commandArg">any optional arguments</param>
        /// <param name="handled">was this handled?</param>
        public override void OnRunCommand(String command, object commandArg, ref bool handled)
        {
            handled = true;

            switch (command)
            {
            case "clearText":
                _fileBrowserScanner.ClearFilter();
                break;

            case "CmdFileBrowserToggle":
                quitFileBrowser();
                break;

            default:
                Log.Debug(command);
                if (_fileBrowserScanner != null)
                {
                    _fileBrowserScanner.OnRunCommand(command, ref handled);
                }

                break;
            }
        }