示例#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
 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!");
 }
示例#3
0
		public WindowsTouch(Window window)
		{
			touches = new TouchCollection(new CursorPositionTranslater(window));
			if (StackTraceExtensions.StartedFromNCrunchOrNunitConsole)
				return;
			//ncrunch: no coverage start
			IsAvailable = CheckIfWindows7OrHigher();
			if (IsAvailable)
				hook = new TouchHook(window);
			else
				Logger.Warning("Touch is not supported by the OS. Touch triggers won't work!"); 
		} 
示例#4
0
 public WindowsTouch(Window window)
 {
     touches = new TouchCollection(new CursorPositionTranslater(window));
     if (StackTraceExtensions.StartedFromNCrunchOrNunitConsole)
     {
         return;
     }
     //ncrunch: no coverage start
     IsAvailable = CheckIfWindows7OrHigher();
     if (IsAvailable)
     {
         hook = new TouchHook(window);
     }
     else
     {
         Logger.Warning("Touch is not supported by the OS. Touch triggers won't work!");
     }
 }