ACAT.Lib.Extension.AppAgents.Notepad.NotepadAgentBase.OnFocusChanged C# (CSharp) Method

OnFocusChanged() public method

Invoked when the foreground window focus changes. Displays the alphabet scanner. Also, if this is a new window that has come into focus, adds its contents to the word prediction temporary batch model for more contextual prediction of words
public OnFocusChanged ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, bool &handled ) : void
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Foreground window info
handled bool set to true if handled
return void
        public override void OnFocusChanged(WindowActivityMonitorInfo monitorInfo, ref bool handled)
        {
            Log.Debug();

            base.OnFocusChanged(monitorInfo, ref handled);
            if (monitorInfo.IsNewWindow)
            {
                _wordPredictionContext = Context.AppWordPredictionManager.ActiveWordPredictor.LoadContext(getNotepadText());
            }

            showPanel(this, new PanelRequestEventArgs(PanelClasses.Alphabet, monitorInfo));
            handled = true;
        }