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

getMenu() защищенный Метод

Gets the menu for the Explorer window in focus. Checks if the file explorer is active and returns the contextual menu name for it
protected getMenu ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, String &panelClass ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo fg window info
panelClass String returns the panel class of the menu
Результат bool
        protected bool getMenu(WindowActivityMonitorInfo monitorInfo, ref String panelClass)
        {
            AutomationElement windowElement = getWindowElement(monitorInfo.FgHwnd);

            bool retVal = true;
            if (windowElement != null)
            {
                if (isFileExplorer(windowElement))
                {
                    Log.Debug("KILLROY isFileExploer is TRUE ");
                    if (Windows.IsMinimized(monitorInfo.FgHwnd))
                    {
                        retVal = false;
                    }
                    else
                    {
                        panelClass = ContextualMenuName;
                    }
                }
                else
                {
                    Log.Debug("KILLROY isFileExploer is FALSE");
                    retVal = false;
                }
            }
            else
            {
                Log.Debug("KILLROY windowElement is NULL");

            }

            Log.Debug("KILLROY return from getmenu : " + retVal);
            return retVal;
        }