简体   繁体   English

wince在设备c#的简历上获取通知

[英]wince get notification on resume of device c#

I have a mobile application on a windows ce 6.0 device. 我在Windows CE 6.0设备上有一个移动应用程序。 The device sometimes is sent to suspend by a hardwarebutton. 有时会通过硬件按钮将设备发送到挂起状态。 I want to do some tasks, as soon, the device is resumed. 我想做一些任务,尽快恢复设备。

Is it possible to check in a .net cf-program, if the device was resumed? 如果设备已恢复,是否可以签入.net cf-program?

Thanks! 谢谢!

根据这一先前的问题,这是不可能的,而不诉诸的P / Invoke或第三方库。

Yep. 是的 you have to subscribe to the PowerNotification queue and then watch for the resume event that is fired after the suspend/resume cycle. 您必须订阅PowerNotification队列,然后监视在挂起/恢复周期之后触发的恢复事件。 Here is a CF class that implements this without the OpenNetCF monster: http://win-mobile-code.googlecode.com/svn/trunk/NotificationList/NotificationsList/PowerNotifications.cs 这是一个无需OpenNetCF怪物即可实现此功能的CF类: http ://win-mobile-code.googlecode.com/svn/trunk/NotificationList/NotificationsList/PowerNotifications.cs

The above is part of my 'What wakes up your device' article at http://www.hjgode.de/wp/2013/05/13/mobile-development-manage-the-event-db-what-wakes-up-your-device/ 以上是我的“唤醒您的设备的内容”文章的一部分,该文章位于http://www.hjgode.de/wp/2013/05/13/mobile-development-manage-the-event-db-what-wakes-up -你的设备/

But use OpenNetCF if you need more of the functionality implemented by OpenNetCF. 但是,如果您需要更多由OpenNetCF实现的功能,请使用OpenNetCF。

Thanks for your answers... 感谢您的回答...

On further reasearching I found a event in OpenNETCF, fitting just my needs. 在进一步的研究中,我在OpenNETCF中发现了一个符合我需要的事件。

The event OpenNETCF.WindowsCE.PowerManagement.PowerUp is fired, when resuming a device - everything works fine here... 恢复设备时会触发事件OpenNETCF.WindowsCE.PowerManagement.PowerUp此处一切正常...

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM