Beispiel #1
0
        public SpyForm(SpyModes spyMode)
        {
            this.spyMode = spyMode;

            //  // The InitializeComponent() call is required for Windows Forms designer support.
            //

            InitializeComponent();

            try {
            this.tabooPID =
                System.Diagnostics.Process.GetCurrentProcess().Id;
            }
            catch (Exception eee) {
                this.txtFullCode.Text = eee.Message;
            }
            //  // TODO: Add constructor code after the InitializeComponent() call.
            //

            switch (spyMode) {
                case SpyModes.uIAutomationSpy:
                    this.switchToUIAutomationSpyMode();
                    break;
                case SpyModes.seleniumSpy:
                    this.switchToSeleniumSpyMode();
                    break;
                default:
                    this.switchToUIAutomationSpyMode();
                    break;
            }
        }
Beispiel #2
0
        private static void Main(string[] args)
        {
            // 20131114
            AutomationFactory.Init();

            // 20121003
            SpyModes currentMode = SpyModes.uIAutomationSpy;

            if (null != args && 0 < args.Length)
            {
                switch (Convert.ToInt32(args[0].Trim()))
                {
                case (int)SpyModes.uIAutomationSpy:
                    currentMode = SpyModes.uIAutomationSpy;
                    break;

                case (int)SpyModes.seleniumSpy:
                    currentMode = SpyModes.seleniumSpy;
                    break;
//                    default:
//
//                        break;
                }
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Application.Run(new SpyForm(currentMode));
        }
Beispiel #3
0
        public SpyForm(SpyModes spyMode)
        {
            this.spyMode = spyMode;

            //  // The InitializeComponent() call is required for Windows Forms designer support.
            //

            InitializeComponent();

            try {
                tabooPID =
                    System.Diagnostics.Process.GetCurrentProcess().Id;
            }
            catch (Exception eee) {
                txtFullCode.Text = eee.Message;
            }
            //  // TODO: Add constructor code after the InitializeComponent() call.
            //

            switch (spyMode)
            {
            case SpyModes.uIAutomationSpy:
                switchToUIAutomationSpyMode();
                break;

            case SpyModes.seleniumSpy:
                switchToSeleniumSpyMode();
                break;

            default:
                switchToUIAutomationSpyMode();
                break;
            }
        }