///////////////////////////////////////////////////////////////////////////////
//
// This file was automatically generated by RANOREX.
// DO NOT MODIFY THIS FILE! It is regenerated by the designer.
// All your modifications will be lost!
// http://www.ranorex.com
//
///////////////////////////////////////////////////////////////////////////////

using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Drawing;
using System.Threading;
using WinForms = System.Windows.Forms;

using Ranorex;
using Ranorex.Core;
using Ranorex.Core.Testing;
using Ranorex.Core.Repository;

namespace ImageBasedValidation
{
#pragma warning disable 0436 //(CS0436) The type 'type' in 'assembly' conflicts with the imported type 'type2' in 'assembly'. Using the type defined in 'assembly'.
    /// <summary>
    ///The Recording1 recording.
    /// </summary>
    [TestModule("f5ba096c-5d0c-4577-8dad-4518e36f30c4", ModuleType.Recording, 1)]
    public partial class Recording1 : ITestModule
    {
        /// <summary>
        /// Holds an instance of the ImageBasedValidationRepository repository.
        /// </summary>
        public static ImageBasedValidationRepository repo = ImageBasedValidationRepository.Instance;

        static Recording1 instance = new Recording1();

        /// <summary>
        /// Constructs a new instance.
        /// </summary>
        public Recording1()
        {
        }

        /// <summary>
        /// Gets a static instance of this recording.
        /// </summary>
        public static Recording1 Instance
        {
            get { return instance; }
        }

#region Variables

#endregion

        /// <summary>
        /// Starts the replay of the static recording <see cref="Instance"/>.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("Ranorex", "8.0")]
        public static void Start()
        {
            TestModuleRunner.Run(Instance);
        }

        /// <summary>
        /// Performs the playback of actions in this recording.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        [System.CodeDom.Compiler.GeneratedCode("Ranorex", "8.0")]
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor = 1.00;

            Init();

            Report.Log(ReportLevel.Info, "Application", "Run application '../RxDemoApp.exe' with arguments '' in normal mode.", new RecordItemIndex(0));
            Host.Local.RunApplication("../RxDemoApp.exe", "", "../", false);
            Delay.Milliseconds(0);
            
            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'RxMainFrame.ImageBasedAutomation' at 82;11.", repo.RxMainFrame.ImageBasedAutomationInfo, new RecordItemIndex(1));
            repo.RxMainFrame.ImageBasedAutomation.Click("82;11");
            Delay.Milliseconds(200);
            
            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'RxMainFrame.ChkShowImage' at 6;9.", repo.RxMainFrame.ChkShowImageInfo, new RecordItemIndex(2));
            repo.RxMainFrame.ChkShowImage.Click("6;9");
            Delay.Milliseconds(200);
            
            Report.Log(ReportLevel.Info, "Validation", "Validating ContainsImage (Screenshot: 'Screenshot1' with region {X=0,Y=0,Width=402,Height=263}) on item 'RxMainFrame.TheCat'.", repo.RxMainFrame.TheCatInfo, new RecordItemIndex(3));
            Validate.ContainsImage(repo.RxMainFrame.TheCatInfo, TheCat_Screenshot1, TheCat_Screenshot1_Options);
            Delay.Milliseconds(100);
            
            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'RxMainFrame.RxButtonExit' at 22;10.", repo.RxMainFrame.RxButtonExitInfo, new RecordItemIndex(4));
            repo.RxMainFrame.RxButtonExit.Click("22;10");
            Delay.Milliseconds(200);
            
        }

#region Image Feature Data
        CompressedImage TheCat_Screenshot1
        { get { return repo.RxMainFrame.TheCatInfo.GetScreenshot1(new Rectangle(0, 0, 402, 263)); } }

        Imaging.FindOptions TheCat_Screenshot1_Options
        { get { return Imaging.FindOptions.Default; } }

#endregion
    }
#pragma warning restore 0436
}
