2011-08-26 63 views
0

我想使用WP7.1提醒類,並且提醒的警報應該從現在開始在指定的時間量(以秒或分鐘爲單位)。這是我的編碼的一部分:BeginTime後的提醒報警

Reminder reminder = new Reminder(name); 
reminder.Title = "foo"; 
reminder.BeginTime = now.AddSeconds(5.0); 
reminder.ExpirationTime = now.AddSeconds(7.0); 
reminder.Content = "sdfsd"; 
ScheduledActionService.Add(reminder); 

提醒出現,但沒有在指定的時間點(通常幾秒鐘後)。我只能在模擬器上測試它,但是設備上的行爲不同?或者不是應該在這樣精細的基礎上使用的提醒類(秒),但僅限於分鐘/小時/天?

回答

1

MSDN文檔說(重點煤礦):ScheduledAction.BeginTime property

的行動將不會被調用前的開始時間已經達到。時間值應該在設備的當地時間。

此問題也在線程another中涵蓋。