Esempio n. 1
0
        /// <summary>
        /// Sets focus on the AboutBox and ensures the container is visible. Information is not copied to clipboard if module is not in focus.
        /// </summary>
        private void FocusOnAboutBox()
        {
            Element element = new ModuleContainerElements().ModuleContainer;

            if (element != null)
            {
                element.EnsureVisible();
                element.Focus();
            }
        }
        /// <summary>
        /// Validates that a module is already open or not (brings module to foreground if it is already open)
        /// </summary>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public bool IsModuleAlreadyOpened()
        {
            bool    result          = false;
            Element moduleContainer = new ModuleContainerElements().ModuleContainer;

            if (moduleContainer != null)
            {
                moduleContainer.EnsureVisible();
                result = true;
            }

            return(result);
        }
Esempio n. 3
0
        /// <summary>
        /// Runs this instance.
        /// </summary>
        public void Run()
        {
            Element moduleContainer = new ModuleContainerElements().ModuleContainer;

            if (moduleContainer == null)
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Module Container is null. Taking screenshot from the entire Desktop");
                Log.Screenshot();
            }
            else
            {
                Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Taking screenshot of the module SaveRestore");
                moduleContainer.EnsureVisible();
                Log.Screenshot(moduleContainer);
            }
        }