表面不活动行为 [英] Surface inactivity behaviour

查看:120
本文介绍了表面不活动行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,

我有一个客户请求如下:

我需要为该客户构建一个应用程序以呈现不同的服务。到目前为止一直很好。

I have a customer request which is as follow:
I need to build for that customer an application to present different services. So far so good.

当应用程序表面上没有活动时输入 通过在非活动窗口中进行defaut,您可以选择继续或停止您的应用。

When no activity on the application surface enter  by defaut in an inactivity window which let you the choice to continue or stop your apps.

在我的场景中,我想要的是在应用程序上一段时间后没有活动发生了,我的客户想要启动一个Windows,它将以某种方式作为不活动窗口服务。

In my scenarios, what I would like to have is when no activity after a certain time on the application occurs, my customer wnat to start a Windows which will server as an inactivity windows somehow.

然后当用户触摸某处时,vido停止和正常应用程序发生

Then when the user touch somewhere, the vido stop and normal app occurs

知道如何在表面上做到这一点吗?

Any idea how to do that on surface ?

问候b
serge

regards
serge

推荐答案

不幸的是,Shell没有插件模型可以让你提供将在SurfaceShell.exe中显示的自定义UI 。过程 因此,您要显示的任何UI都必须由您的某个应用显示。

Unfortunately Shell has no plug-in model that would allow you to supply custom UI that would be displayed within the SurfaceShell.exe process.  So whatever UI you're going to display will have to be displayed by one of your apps.

如果只有一个应用,我建议使用单应用模式。  Shell的不活动屏幕永远不会在单应用程序模式下显示。 请参阅
http://msdn.microsoft.com/en-us/ library / ee804972(Surface.10).aspx  了解详情。

If there's only one app, I'd suggest using single-app mode.  Shell's inactivity screen will never be shown in single-app mode.  See http://msdn.microsoft.com/en-us/library/ee804972(Surface.10).aspx for details.

如果您不是*使用单一应用模式并希望阻止Shell的正常不活动UI从显示中,将注册表中的AppWasLaunched和Exploration超时值设置为零。 请参阅
http://technet.microsoft.com/en-us/ library / ee692118(Surface.10).aspx  了解详情。

If you're *not* using single app mode and want to prevent Shell's normal inactivity UI from showing, set the AppWasLaunched and Exploration timeout values in the registry to zero.  See http://technet.microsoft.com/en-us/library/ee692118(Surface.10).aspx for details.

如果你只需要使用ContactDown / ContactChanged / etc来检测单个应用程序中的活动就够了在应用程序的背景上。 但是,如果您需要检测活动,无论触摸哪个应用程序(例如访问点),您都可以
创建一个ContactTarget对象并传入null作为hwnd,它将为您提供所有窗口的联系事件。 请参阅
http://msdn.microsoft.com/en- us / library / ee773752(v = Surface.10).aspx

If you only need to detect activity within a single app that's simple enough using ContactDown/ContactChanged/etc on the background of the app.  However, if you need to detect activity regardless of which app is touched (ex. access points), you can create a ContactTarget object and pass in null as the hwnd which will give you contact events for all windows.  See http://msdn.microsoft.com/en-us/library/ee773752(v=Surface.10).aspx.

或者您可以订阅ApplicationLauncher.InactivityTimeoutOccurring,在事件发生时取消该事件以防止Shell显示它的用户界面,然后显示您的用户界面。 这样可以省去实现自己的非活动检测
系统的麻烦,但是如果你没有及时取消(例如由于高系统负载),用户会看到Shell的不活动UI,这可能会令人困惑。

Alternatively you could subscribe to ApplicationLauncher.InactivityTimeoutOccurring, cancel the event when it occurs to prevent Shell from displaying its UI, and then display your UI.  That saves you the trouble of implementing your own inactivity detection system, however if you fail to cancel in time (ex. due to high system load), the user would see Shell's inactivity UI which might be confusing.

考虑不同的方法,看看哪种方法最适合您的特定情况。

Think about the different approaches and see which works best for your particular scenario.


这篇关于表面不活动行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆