Exemple #1
0
        private void HandleMouseMovements()
        {
            if (!_capturing)
            {
                return;
            }

            try
            {
                Point p = MouseOp.GetMousePos();

                if (_html == null)
                {
                    _html = new HTMLTestPlugin();
                    _ts   = _html.CreateTestSession() as HTMLTestSession;
                }

                IntPtr curHandle = Win32API.WindowFromPoint(p.X, p.Y);
                if (curHandle != _lastHandle)
                {
                    _lastHandle  = curHandle;
                    _isSupported = _html.IsSupportedApp(curHandle);
                    if (_isSupported)
                    {
                        _ts.Browser.Find(curHandle);
                        //_ts.Event.OnMouseOver += new TestObjectEventHandler(Event_OnMouseOver);
                    }
                }

                if (_isSupported)
                {
                    TestObject obj = _ts.Objects.ObjectPool.GetObjectByPoint(p.X, p.Y, true);

                    if (!obj.Equals(_lastObj))
                    {
                        Thread t = new Thread(new ParameterizedThreadStart(SetText));
                        t.Start(obj);
                        _lastObj = obj;
                    }
                    else
                    {
                        IVisible v = obj as IVisible;
                        v.HighLight();
                    }
                }
            }
            catch
            {
            }
        }
Exemple #2
0
 public TestEventArgs(String eventName, String eventValue, int[] keyCodes)
     : this(eventName, eventValue, MouseOp.GetMousePos(), keyCodes)
 {
 }
Exemple #3
0
 public TestEventArgs(String eventName, String eventValue)
     : this(eventName, eventValue, MouseOp.GetMousePos())
 {
 }
Exemple #4
0
 public TestEventArgs(String eventName, object eventValue)
     : this(eventName, eventValue, MouseOp.GetMousePos(), MouseButton.None, null)
 {
 }