Windows phone 7 仅在添加新提醒时执行提醒

Windows phone 7 仅在添加新提醒时执行提醒,windows-phone-7,Windows Phone 7,我试图使用提醒api,但没有运气。我用来创建提醒的代码位于下面。发生的事情是,在我添加另一个提醒之前,提醒不会被触发,此时旧的提醒会立即消失。我猜这段代码并没有说太多,因为它几乎是从微软的提醒教程复制粘贴而来的。但是,我不知道问题出在哪里(如果您对问题所在有任何建议,我将发布其他代码片段) 好的,代码没有问题。模拟器系统时间设置为自动,但不知何故出错了20分钟,导致了奇怪的行为。手动设置时间后,其工作正常 Reminder notification = new Reminder(""+uniqu

我试图使用提醒api,但没有运气。我用来创建提醒的代码位于下面。发生的事情是,在我添加另一个提醒之前,提醒不会被触发,此时旧的提醒会立即消失。我猜这段代码并没有说太多,因为它几乎是从微软的提醒教程复制粘贴而来的。但是,我不知道问题出在哪里(如果您对问题所在有任何建议,我将发布其他代码片段)


好的,代码没有问题。模拟器系统时间设置为自动,但不知何故出错了20分钟,导致了奇怪的行为。手动设置时间后,其工作正常

Reminder notification = new Reminder(""+uniqueId);
            notification.Title = "Title";
            notification.Content = "Content";
            notification.BeginTime = DateTime.Now.AddSeconds(10);
            notification.RecurrenceType = RecurrenceInterval.None;
            notification.NavigationUri = new Uri("/MyPage.xaml?id=" + uniqueId, UriKind.Relative);

            // Register the reminder with the system.
            ScheduledActionService.Add(notification);