ACAT.Extensions.Default.FunctionalAgents.PhraseSpeakAgent.PhraseSpeakAgent.Activate C# (CSharp) Method

Activate() public method

Invoked when the Functional agent is activated. This is the entry point for the functional agent. Creates the Phrases scanner, subscribes to events
public Activate ( ) : bool
return bool
        public override bool Activate()
        {
            bool retVal = true;

            ExitCode = CompletionCode.None;

            _phraseSpeakScanner = Context.AppPanelManager.CreatePanel("PhraseSpeakScanner") as PhraseSpeakScanner;
            if (_phraseSpeakScanner != null)
            {
                _phraseSpeakScanner.EnableSearch = EnableSearch;

                subscribeToEvents();

                Context.AppPanelManager.ShowDialog(_phraseSpeakScanner);
            }
            else
            {
                retVal = false;
            }

            return retVal;
        }