/// <summary>
        /// Waits until the canceling progress is finished.
        /// </summary>
        /// <param name="timeoutInMilliseconds">
        /// The timeout in milliseconds.
        /// </param>
        /// <returns>
        /// <c>true</c> If canceling is finished and the parameter tree is visible again, <c>false</c> otherwise.
        /// </returns>
        public bool WaitUntilCancelingIsFinished(int timeoutInMilliseconds)
        {
            bool   result   = true;
            var    watch    = new Stopwatch();
            Button previous = new WizardNavigationElements().Previous;

            if (previous == null)
            {
                result = false;
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Previous button is null.");
            }
            else
            {
                watch.Start();

                while (previous.Visible)
                {
                    if (watch.ElapsedMilliseconds >= timeoutInMilliseconds)
                    {
                        result = false;
                        Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Canceling did not finish within " + timeoutInMilliseconds + " milliseconds.");
                        break;
                    }
                }
            }

            watch.Stop();
            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Canceling finished within " + timeoutInMilliseconds + " milliseconds.");
            return(result);
        }
        /// <summary>
        /// Determines whether the SIL sequence start page is shown.
        /// </summary>
        /// <returns><c>true</c> if SIL sequence start page is shown; otherwise, <c>false</c>.</returns>
        public bool IsSilSequenceStartPageShown()
        {
            bool    result = true;
            Element logo   = new WizardNavigationElements().SilSequencePageLogo;

            if (logo == null)
            {
                result = false;
            }

            return(result);
        }
Exemple #3
0
        /// <summary>
        /// Opens the Open Save Restore.
        /// </summary>
        /// <returns><c>true</c> if module is open and ready, <c>false</c> otherwise.</returns>
        public bool OpenSaveRestore()
        {
            bool   result          = false;
            Button openSaveRestore = new WizardNavigationElements().OpenSaveRestore;

            if (openSaveRestore == null || openSaveRestore.Enabled == false)
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "The button Open Save Restore is null or not enabled.");
            }
            else
            {
                openSaveRestore.Click();

                // Is module opening in time
                if (DeviceFunctionLoader.CoDIA.SaveRestore.Functions.ApplicationArea.MainView.Validation.ModuleOpeningAndClosing.WaitUntilModuleIsOpen(DefaultValues.GeneralTimeout) == false)
                {
                    Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Module not opened in time.");
                }
                else
                {
                    // Is module online in time
                    if (DeviceFunctionLoader.CoDIA.SaveRestore.Functions.StatusArea.Statusbar.Validation.WaitUntilDtmIsConnected.Run(DefaultValues.iTimeoutModules) == false)
                    {
                        Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Module not online in time.");
                    }
                    else
                    {
                        // Is module ready in time
                        if (DeviceFunctionLoader.CoDIA.SaveRestore.Functions.ApplicationArea.MainView.Validation.WaitUntilModuleOnlineIsReady.Run(DefaultValues.iTimeoutModules) == false)
                        {
                            Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Module not ready in time.");
                        }
                        else
                        {
                            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Module is opened and ready to use.");
                            result = true;
                        }
                    }
                }
            }

            return(result);
        }
Exemple #4
0
        // ReSharper restore InconsistentNaming
        #region Public Methods and Operators

        /// <summary>
        ///     Click Cancel in Navigation Menu
        /// </summary>
        /// <returns>
        ///     <br>Button: If call worked fine</br>
        ///     <br>NULL: If an error occurred</br>
        /// </returns>
        public bool Cancel()
        {
            try
            {
                Button button = new WizardNavigationElements().Cancel;
                if (button != null && button.Enabled)
                {
                    Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Clicking cancel button.");
                    button.Click(DefaultValues.locDefaultLocation);
                    return(true);
                }

                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Cancel button is not accessible");
                return(false);
            }
            catch (Exception exception)
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), exception.Message);
                return(false);
            }
        }
        /// <summary>
        /// Determines whether the confirm button is active.
        /// </summary>
        /// <returns><c>true</c> if confirm button is active; otherwise, <c>false</c>.</returns>
        public bool IsConfirmButtonActive()
        {
            try
            {
                bool   result;
                Button button = new WizardNavigationElements().Confirm;
                if (button == null)
                {
                    Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Confirm button is not accessible");
                    result = false;
                }
                else
                {
                    result = button.Enabled;
                }

                return(result);
            }
            catch (Exception exception)
            {
                Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), exception.Message);
                return(false);
            }
        }
Exemple #6
0
        /// <summary>
        /// The is save restrore button enabled.
        /// </summary>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public bool IsSaveRestroreButtonEnabled()
        {
            Button openSaveRestore = new WizardNavigationElements().OpenCreateDocumentation;

            return(this.IsButtonEnabled(openSaveRestore));
        }
Exemple #7
0
        /// <summary>
        /// The is create documentation button enabled.
        /// </summary>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public bool IsCreateDocumentationButtonEnabled()
        {
            Button openCreateDocumentation = new WizardNavigationElements().OpenCreateDocumentation;

            return(this.IsButtonEnabled(openCreateDocumentation));
        }
Exemple #8
0
        /// <summary>
        /// The is envelope curve button enabled.
        /// </summary>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public bool IsEnvelopeCurveButtonEnabled()
        {
            Button openEnvelopeCurve = new WizardNavigationElements().OpenCreateDocumentation;

            return(this.IsButtonEnabled(openEnvelopeCurve));
        }