예제 #1
0
 public WindowsTouch(Window window, ScreenSpace screen)
 {
     var positionTranslator = new CursorPositionTranslater(window, screen);
     touches = new TouchCollection(positionTranslator);
     hook = new TouchHook(window);
     IsAvailable = CheckIfWindows7OrHigher();
 }
예제 #2
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();
		}
예제 #3
0
 public TouchCollection(CursorPositionTranslater positionTranslater)
 {
     this.positionTranslater = positionTranslater;
     states = new State[MaxNumberOfTouches];
     locations = new Vector2D[MaxNumberOfTouches];
     ids = new int[MaxNumberOfTouches];
     for (int index = 0; index < MaxNumberOfTouches; index++)
         ids[index] = -1;
 }
예제 #4
0
 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();
 }
예제 #5
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();
 }
예제 #6
0
 public WindowsTouch(Window window)
 {
     var positionTranslator = new CursorPositionTranslater(window);
     touches = new TouchCollection(positionTranslator);
     IsAvailable = CheckIfWindows7OrHigher();
     if (IsAvailable)
         hook = new TouchHook(window);
     else //ncrunch: no coverage start (can only be reached from Windows Vista or earlier)
         Logger.Warning("Touch is not supported by the OS. Touch triggers won't work!");
 }
예제 #7
0
 public TouchCollection(CursorPositionTranslater positionTranslater)
 {
     this.positionTranslater = positionTranslater;
 }
예제 #8
0
 public WindowsMouse(CursorPositionTranslater  positionTranslater)
 {
     hook = new MouseHook();
     this.positionTranslater = positionTranslater;
     mouseCounter = new MouseDeviceCounter();
 }
예제 #9
0
		public TouchCollection(CursorPositionTranslater positionTranslater)
		{
			this.positionTranslater = positionTranslater;
		}