Esempio n. 1
0
		MultitouchLogic(InputManager inputManager)
		{
			if (!MouseHelper.SingleMouseFallback && !MultitouchScreen.AllowNonContactEvents)    //modified by Wander
				Mouse.OverrideCursor = Cursors.None;

			ContactsManager = new ContactsManager(inputManager.Dispatcher);

			this.inputManager = inputManager;
			this.inputManager.PreProcessInput += inputManager_PreProcessInput;
			this.inputManager.PreNotifyInput += inputManager_PreNotifyInput;
			this.inputManager.PostProcessInput += inputManager_PostProcessInput;
			contactType = typeof(Contact);

			Dispatcher.ShutdownFinished += Dispatcher_ShutdownFinished;

			Type routedEventType = typeof(RoutedEvent);
			contactEvents = typeof(MultitouchScreen).GetFields().Where(m => m.FieldType == routedEventType).Select(f => (RoutedEvent)f.GetValue(null));
		}