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

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

Invoked when the foreground window focus changes. Display the scanner depending on the context.
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();

            outlookWindowType = identifyWindow(monitorInfo, ref outlookControlSubType);

            controlType = monitorInfo.FocusedElement.Current.ControlType;

            Log.Debug("OutlookWindowType: " + outlookWindowType + ", subType: " + outlookControlSubType);

            String title = PanelTitle;

            base.OnFocusChanged(monitorInfo, ref handled);

            if (autoSwitchScanners)
            {
                var panel = getContextualMenuForWindow(outlookWindowType, ref title);
                showPanel(this, new PanelRequestEventArgs(panel, title, monitorInfo));
            }
            else
            {
                if (!_scannerShown)
                {
                    showPanel(this, new PanelRequestEventArgs(PanelClasses.Alphabet, monitorInfo));
                    _scannerShown = true;
                }
            }

            handled = true;
        }