在.NET CF上设置设备时间 [英] Set Device Time on .NET CF
本文介绍了在.NET CF上设置设备时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
寻找一个代码样本,该样本采用.NET CF DateTime对象,并将设备的日期和时间设置为该日期(和/或时区).这样做的目的是通过Web服务获取服务器的当前真实"时间,并正确设置设备的时间.
有人做过吗?
解决方案
您可以使用 Opennetcf 的DateTimeHelper类.
或者,您可以p/调用 SetLocalTime ./p>
Looking for a code sample that takes a .NET CF DateTime object, and sets the device's date and time to that date (and/or time zone). The purpose of this is to get the current "real" time off of a server via web service and set the device's time correctly.
Anyone done this before?
解决方案
You can use Opennetcf's DateTimeHelper class.
Alternatively you can p/invoke SetLocalTime.
这篇关于在.NET CF上设置设备时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文