ACAT.Lib.Extension.AppAgents.WindowsExplorer.WindowsExplorerAgentBase.OnFocusChanged C# (CSharp) Метод

OnFocusChanged() публичный Метод

Invoked when the foreground window focus changes. Depending on which element has focus in the acrobat reader window, display the appropriate scanner
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
Результат void
        public override void OnFocusChanged(WindowActivityMonitorInfo monitorInfo, ref bool handled)
        {
            Log.Debug();

            if (monitorInfo.IsNewWindow)
            {
                _scannerShown = false;
            }

            if (autoSwitchScanners)
            {
                if (!_scannerShown)
                {
                    displayScanner(monitorInfo, ref handled);
                }
                else
                {
                    handled = true;
                }
            }
            else
            {
                base.OnFocusChanged(monitorInfo, ref handled);
                if (!_scannerShown)
                {
                    showPanel(this, new PanelRequestEventArgs(PanelClasses.Alphabet, monitorInfo));
                    _scannerShown = true;
                }

                handled = true;
            }
        }