示例#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!");
 }
 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;
		}