void HandleContact(object sender, Framework.Input.ContactEventArgs e)
		{
			ContactContext context = new ContactContext(e.Contact, source.RootVisual as UIElement);
			RawMultitouchReport rawReport = new RawMultitouchReport(context);
			lock (lockContactsQueue)
			{
				contactsQueue.Enqueue(rawReport);
			}
			Dispatcher.BeginInvoke(DispatcherPriority.Input, inputManagerProcessInput, null);
		}
示例#2
0
        void PromoteRawToPreview(ProcessInputEventArgs e, RawMultitouchReport report)
        {
            ContactContext context     = report.Context;
            RoutedEvent    routedEvent = GetPreviewEventFromRawMultitouchState(context.Contact.State);

            if (report.Context.OverElement != null && routedEvent != null)
            {
                Contact          contact = ContactsManager.ExistingContacts[report.Context.Contact.Id];
                ContactEventArgs args;
                if (routedEvent == MultitouchScreen.PreviewNewContactEvent)
                {
                    args = new NewContactEventArgs(contact, report.Timestamp);
                }
                else
                {
                    args = new ContactEventArgs(contact, report.Timestamp);
                }
                args.RoutedEvent = routedEvent;
                args.Source      = report.Context.OverElement;
                e.PushInput(args, e.StagingItem);
            }
        }
示例#3
0
		public RawMultitouchReport(ContactContext contactContext)
			: base(null, (int)contactContext.Contact.Timestamp)
		{
			RoutedEvent = MultitouchLogic.PreviewRawInputEvent;
			Context = contactContext;
		}
 public RawMultitouchReport(ContactContext contactContext)
     : base(null, (int)contactContext.Contact.Timestamp)
 {
     RoutedEvent = MultitouchLogic.PreviewRawInputEvent;
     Context     = contactContext;
 }