简体   繁体   English

在没有模拟器的情况下如何在曲面表应用程序中创建模拟的联系人?

[英]How can I create simulated contacts in a surface table application without the simulator?

In a Microsoft Surface 1.0 SDK project based on WPF, I'd like to transform contacts captured in a small part of the screen to match the whole screen (like a virtual touchpad). 在基于WPF的Microsoft Surface 1.0 SDK项目中,我想转换在屏幕的一小部分中捕获的联系人以匹配整个屏幕(例如虚拟触摸板)。

After capturing a contact and transforming it's position and orientation I would like to send it back to the event queue. 捕获联系人并转换其位置和方向后,我想将其发送回事件队列。 I already figured out that there seems to be no way to create a "new Contact()" or to change anything in the "ReadOnlyContactCollection" (like it's name already says). 我已经发现,似乎没有办法创建“新的Contact()”或更改“ ReadOnlyContactCollection”中的任何内容(就像已经说过的那样)。

Here's what I was trying to do: 这是我正在尝试做的事情:

private void OnContactDown(object sender, ContactEventArgs e)
{
    base.OnContactDown(e);
    e.Contact.Capture(this);

    // transform the contact's center and orientation
    // and write them back into e.Contact via own private method
    // e.Contact = transformContact(e.Contact);

    // keep transformed contact in the event queue
    // so it can be processed at it's new position
    e.Handled = false;
}

My next idea was to make use of the simulator and automation to create SimulatedContacts, but sadly this doesn't work on the surface table itself, only in the simulator. 我的下一个想法是利用模拟器和自动化功能来创建SimulatedContacts,但可惜的是,这仅在模拟器中,不适用于表面工作台本身。

Is there any way to send out "virtual" contacts (that don't exist in the raw image) so that they will be recognized by the surface (without the use of the simulator)? 有什么方法可以发送“虚拟”联系人(原始图像中不存在),以便表面可以识别它们(无需使用模拟器)? How does the SurfaceInput.exe send out the recognized contacts? SurfaceInput.exe如何发送已识别的联系人?

Surface v1 doesn't officially support WPF 4.0, but others have figured out how to take Surface v1 input and route it into the standardized & extensible touch APIs that come with WPF 4.0. Surface v1并不正式支持WPF 4.0,但是其他人已经找到了如何获取Surface v1输入并将其路由到WPF 4.0随附的标准化和可扩展触摸API中。 Take a look at http://nui.joshland.org/2010/07/how-to-write-surface-applications-with.html for creating a custom "touch device" that transforms Surface input into WPF 4.0 input events. 查看http://nui.joshland.org/2010/07/how-to-write-surface-applications-with.html,以创建将Surface输入转换为WPF 4.0输入事件的自定义“触摸设备”。 Following that same approach, you can create another "touch device" on your own in order to pass in your fake touches. 按照相同的方法,您可以自己创建另一个“触摸设备”,以传递假触摸。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在不使用“saveContactTask”的情况下保存多个联系人? - How I can save multiple contacts without using “saveContactTask”? 如何使用“ Xamarin.Forms.Contacts 1.0.3”插件创建联系人的列表视图? - How can I use the “Xamarin.Forms.Contacts 1.0.3” Plugin to create a list view of the contacts? 如何为模拟时间创建一个类? - How to create a class for simulated time? 如何制作绘图表面,以便人们可以在Windows Form应用程序上绘图? - How can I make a drawing surface so people can draw on my Windows Form application? 用c#编写应用程序时,如何在Windows Surface Pro上获得触摸输入(屏幕上的位置)? - How can I get the touch input(positions on the screen) on the Windows Surface Pro when writing the application in c#? 如何在.NET Web API连接的应用程序中从Salesforce中提取联系人记录 - How Can I Pull The Contacts Records from Salesforce in .NET Web API Connected Application 如何检查计算机是否为Surface Studio? - How can I check if the computer is a Surface Studio? 如何在Surface应用程序中移动图片(Smart Table,C Sharp .Net 4) - How to move a picture in Surface Application (Smart Table, C Sharp .Net 4) 我可以在MS Surface上使用我的语音应用程序(Win 7)吗? - Can I use my voice application (Win 7) on MS Surface? 如何将非托管应用程序 window 放在前面,并使其成为(模拟)用户输入的活动 window - How do I bring an unmanaged application window to front, and make it the active window for (simulated) user input
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM