如何将Windows Mobile Professional设备保持在无人参与电源状态 [英] How do I keep a Windows Mobile Professional Device in the Unattended Power State

查看:42
本文介绍了如何将Windows Mobile Professional设备保持在无人参与电源状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Windows Mobile Professional上运行的.net 3.5应用程序,该应用程序使用sql server ce 3.5并将合并复制与sql server 2005 sp2(尚不是1.0产品)合并.每隔两分钟左右,它将使用计时器控件启动合并复制.我想我必须使用某种HTTP长期请求或Window Mobile Email WCF来进行某种推送.但是与此同时,我的问题是,在等待轮询计时器的同时,设备正在进入睡眠"状态,要么是设备达到其空闲的关机超时时间,要么是用户按下待机按钮.我以为只是屏幕和键盘掉电了,但事实证明,这是大多数设备功能的一部分,包括我的应用程序.

I have a .net 3.5 application running on windows mobile professional that uses sql server ce 3.5 and merge replication with sql server 2005 sp2, it not yet a 1.0 product. Every couple of minutes or so it starts a merge replication using a timer control. I suppose down the line I'll have to have some kind of push senario, either using long lived HTTP requests or Window Mobile Email WCF. However in the meantime my problem is that the devices are being "put to sleep" whilst waiting for the polling timer, either by the device reaching it's idle power down timeout or by the user hitting the standby button. I thought it was just the screen and keyboard that got powered down but it turns out that it's most of the devices functions, including my app.

有什么办法可以捕捉待机事件并关闭屏幕和键盘电源,但保持我的应用运行?

Is there any way I can catch the standby event and just power down the screen and keyboard but keep my app running?

推荐答案

我建议您不要禁用睡眠模式,而应注册事件以唤醒设备并运行任务.在 OpenNetCf 中查看智能设备框架.在其他地方,您会发现:

I recommend that you don't disable the sleep mode, but instead register events to wake up your device and run your task. Have a look at the Smart Device Framework at OpenNetCf. Among others there you will find:

  • 注册唤醒事件的方法
  • 掉电事件的事件处理程序

其中大多数位于OpenNETCF.WindowsCE命名空间中.

Most of them are in the OpenNETCF.WindowsCE namespace.

这篇关于如何将Windows Mobile Professional设备保持在无人参与电源状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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