私のアプリケーションApplication_Exitイベントでは、ScheduledActionServiceを使用してアラームを設定しようとしています。これは、他のコードでは正常に動作しますが、ここでそれはここでは、コードWindows Phone 7でアラームを設定する
string alarmName = Guid.NewGuid().ToString();
const string cookingClockAlarm = "Cooking clock alarm";
DateTime dueTime = DateTime.Now.AddSeconds(10);
var alarm = new Alarm(alarmName)
{
Content = cookingClockAlarm,
BeginTime = dueTime,
ExpirationTime = dueTime.AddSeconds(3),
RecurrenceType = RecurrenceInterval.None
};
// Register the alarm with the system.
ScheduledActionService.Add(alarm);//here I get an exception
は、私がここで間違ってやっているものを任意のアイデアですか?メッセージE_INVALIDARG
とArgumentExceptionがを投げ続けますか
興味深いことに、私は、アプリケーションのシャットダウン時に発生したScheduledActionService.Findの呼び出しで同じ問題が発生しました。 http://stackoverflow.com/questions/10510152/scheduledactionservice-find-throws-argumentexception –