Example #1
0
 /// <summary>
 /// Closes the Phrases scanner
 /// </summary>
 private void closeScanner()
 {
     if (_phraseSpeakScanner != null)
     {
         Windows.CloseForm(_phraseSpeakScanner);
         _phraseSpeakScanner = null;
     }
 }
Example #2
0
        /// <summary>
        /// Invoked when the Functional agent is activated.  This is
        /// the entry point for the functional agent.
        /// Creates the Phrases scanner, subscribes to events
        /// </summary>
        /// <returns>true on success</returns>
        public override bool Activate()
        {
            bool retVal = true;

            ExitCode  = CompletionCode.None;
            IsClosing = false;

            if (PhraseListEdit)
            {
                var dlg = Context.AppPanelManager.CreatePanel("PhraseListEditForm");
                IsActive = true;

                Context.AppPanelManager.ShowDialog(Context.AppPanelManager.GetCurrentPanel(), dlg as IPanel);

                IsClosing = true;
                IsActive  = false;

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

                    subscribeToEvents();

                    IsActive = true;

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

            return(retVal);
        }
        /// <summary>
        /// Invoked when the Functional agent is activated.  This is
        /// the entry point for the functional agent.
        /// Creates the Phrases scanner, subscribes to events
        /// </summary>
        /// <returns>true on success</returns>
        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);
        }
Example #4
0
 /// <summary>
 /// Closes the Phrases scanner
 /// </summary>
 private void closeScanner()
 {
     if (_phraseSpeakScanner != null)
     {
         Windows.CloseForm(_phraseSpeakScanner);
         _phraseSpeakScanner = null;
     }
 }
Example #5
0
        /// <summary>
        /// Invoked when the Functional agent is activated.  This is
        /// the entry point for the functional agent.
        /// Creates the Phrases scanner, subscribes to events
        /// </summary>
        /// <returns>true on success</returns>
        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;
        }