ACAT.Extensions.Default.FunctionalAgents.FileBrowserAgent.FileBrowserAgent.Activate C# (CSharp) Méthode

Activate() public méthode

Invoked when the Functional agent is activated. This is the entry point for this agent. Show the scanner that will display the list of files from the preferred folders(s)
public Activate ( ) : bool
Résultat bool
        public override bool Activate()
        {
            _autoLaunchFile = false;
            ExitCode = CompletionCode.ContextSwitch;

            _fileBrowserScanner = Context.AppPanelManager.CreatePanel("FileBrowserScanner") as FileBrowserScanner;
            if (_fileBrowserScanner != null)
            {
                subscribeToEvents();

                _fileBrowserScanner.SelectActionOpen = SelectActionOpen;
                _fileBrowserScanner.IncludeFileExtensions = IncludeFileExtensions;
                _fileBrowserScanner.ExcludeFileExtensions = ExcludeFileExtensions;
                _fileBrowserScanner.Folders = Folders;
                _fileBrowserScanner.ActionVerb = ActionVerb;
                _fileBrowserScanner.DateFormat = Settings.FileBrowserDateFormat;
                SelectedFile = String.Empty;
                Context.AppPanelManager.ShowDialog(_fileBrowserScanner);

                return true;
            }

            return false;
        }