internal WindowRelativeMouse(IntPtr parenthWnd, IntPtr hWnd, IMouse mouse, INativeMethodWrapper nativeMethodWrapper, IRetrier retry, Settings settings = null)
 {
     this.parenthWnd = parenthWnd;
     this.hWnd = hWnd;
     this.absoluteMouse = mouse;
     this.nativeMethodWrapper = nativeMethodWrapper;
     this.retry = retry;
     this.settings = settings ?? new Settings();
 }
        public void Before()
        {
            this.hWnd = new IntPtr(1337);
            this.innerMouse = A.Fake<IMouse>();
            this.nativeMethodWrapper = A.Fake<INativeMethodWrapper>();
            this.retrierFactory = new NRetryTimerFactory(0);
            this.retrier = new Retrier(this.retrierFactory);

            this.windowRelativeMouse = new WindowRelativeMouse(this.hWnd, this.hWnd, this.innerMouse, this.nativeMethodWrapper, this.retrier);
        }
Пример #3
0
 public void Before()
 {
     this.nativeMethodWrapper = A.Fake<INativeMethodWrapper>();
     A.CallTo(() => this.nativeMethodWrapper.GetSystemMetrics(A<SystemMetric>._)).Returns(65535).NumberOfTimes(2);
     this.mouse = new Mouse(this.nativeMethodWrapper);
 }
 internal ApplicationWindowFinder(INativeMethodWrapper nativeMethodWrapper)
 {
     this.nativeMethodWrapper = nativeMethodWrapper;
 }
Пример #5
0
 internal WindowBoundMouse(IntPtr hWnd, INativeMethodWrapper nativeMethodWrapper, IMouse mouse)
 {
     this.hWnd = hWnd;
     this.nativeMethodWrapper = nativeMethodWrapper;
     this.absoluteMouse = mouse;
 }
 public void Before()
 {
     this.nativeMethodWrapper = A.Fake<INativeMethodWrapper>();
     this.windowFinder = new ApplicationWindowFinder(this.nativeMethodWrapper);
 }
Пример #7
0
 public WindowHooker(INativeMethodWrapper nativeMethods, IActionQueue queue)
 {
     _nativeMethods = nativeMethods;
     _queue         = queue;
 }
Пример #8
0
 internal Mouse(INativeMethodWrapper nativeMethodWrapper)
 {
     this.nativeMethodWrapper = nativeMethodWrapper;
 }