Exemple #1
0
		//ncrunch: no coverage start
		public WindowsMouse(Window window)
		{
			if (!StackTraceExtensions.StartedFromNCrunchOrNunitConsole)
				hook = new MouseHook();
			positionTranslater = new CursorPositionTranslater(window);
			positionTranslater.window.ViewportSizeChanged += size => wasViewportResizedThisFrame = true;
			mouseCounter = new MouseDeviceCounter();
		}
 public SharpDXMouse(CursorPositionTranslater positionTranslater)
 {
     this.positionTranslater = positionTranslater;
     mouseCounter = new MouseDeviceCounter();
     directInput = new DInput.DirectInput();
     mouse = new DInput.Mouse(directInput);
     mouse.Properties.AxisMode = DInput.DeviceAxisMode.Absolute;
     mouse.Acquire();
     currentState = new DInput.MouseState();
 }
 //ncrunch: no coverage start
 public WindowsMouse(Window window)
 {
     if (!StackTraceExtensions.StartedFromNCrunchOrNunitConsole)
     {
         hook = new MouseHook();
     }
     positionTranslater = new CursorPositionTranslater(window);
     positionTranslater.window.ViewportSizeChanged += size => wasViewportResizedThisFrame = true;
     mouseCounter = new MouseDeviceCounter();
 }
 public WindowsMouse(CursorPositionTranslater  positionTranslater)
 {
     hook = new MouseHook();
     this.positionTranslater = positionTranslater;
     mouseCounter = new MouseDeviceCounter();
 }