的Windows Phone SDK 7.1警报 [英] Windows Phone 7.1 SDK Alarm

查看:185
本文介绍了的Windows Phone SDK 7.1警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建一个使用新的报警类别在Windows Phone 7.1 SDK



我能够得到它的工作,但没有按报警器报警'吨似乎是在我设置的时间去了。

 报警器报警=新警报(MyAlarm)
{
含量=报警!,
=的BeginTime DateTime.Now.AddSeconds(秒),
};
ScheduledActionService.Add(报警); // MSDN:


解决方案

言论在MSDN




该行动将不会被调用的的开始时间已经
到达。




(重点煤矿)



有在报警不保证被称为在指定的确切第二。我希望那里是被触发报警的可能性达指定时间后几秒钟,而不是之前。


I'm trying to create an alarm using the new Alarm class in the Windows Phone 7.1 SDK

I'm able to get it to work but the alarm doesn't seem to be going off at the time i've set.

Alarm alarm = new Alarm("MyAlarm")
        {
            Content = "Alarm!",
            BeginTime = DateTime.Now.AddSeconds(seconds),
        };
ScheduledActionService.Add(alarm);

解决方案

The remarks in MSDN say

The action will not be invoked before the begin time has been reached.

(emphasis mine)

There is no guarantee on the alarm being called at the exact second specified. I would expect there to be the possibility of the alarm being triggered up to a few seconds after the specified time, but not before.

这篇关于的Windows Phone SDK 7.1警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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