Пример #1
0
        /**
         * <summary>Creates a new instance of the 'Menu: Check state' Action, set to check if a menu is turned on</summary>
         * <param name = "menuName">The name of the menu to query</param>
         * <returns>The generated Action</returns>
         */
        public static ActionMenuCheck CreateNew_MenuIsOn(string menuName)
        {
            ActionMenuCheck newAction = (ActionMenuCheck)CreateInstance <ActionMenuCheck>();

            newAction.checkType   = MenuCheckType.MenuIsVisible;
            newAction.menuToCheck = menuName;
            return(newAction);
        }
Пример #2
0
        /**
         * <summary>Creates a new instance of the 'Menu: Check state' Action, set to check if a menu element is visible</summary>
         * <param name = "menuName">The name of the menu with the element</param>
         * <param name = "elementName">The name of the element to query</param>
         * <returns>The generated Action</returns>
         */
        public static ActionMenuCheck CreateNew_ElementIsVisible(string menuName, string elementName)
        {
            ActionMenuCheck newAction = (ActionMenuCheck)CreateInstance <ActionMenuCheck>();

            newAction.checkType      = MenuCheckType.ElementIsVisible;
            newAction.menuToCheck    = menuName;
            newAction.elementToCheck = elementName;
            return(newAction);
        }