Esempio n. 1
0
        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            var oldTask = ScheduledActionService.Find("task") as PeriodicTask;

            if (oldTask != null)
            {
                ScheduledActionService.Remove("task");
            }

            Microsoft.Phone.Scheduler.PeriodicTask task = new Microsoft.Phone.Scheduler.PeriodicTask("task");
            task.Description = "Changes the lock screen background";

            ScheduledActionService.Add(task);
        }
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            //ScheduledAgent

            var oldTask = ScheduledActionService.Find("ScheduledAgent") as PeriodicTask;

            if (oldTask != null)
            {
                ScheduledActionService.Remove("ScheduledAgent");
            }

            Microsoft.Phone.Scheduler.PeriodicTask task = new Microsoft.Phone.Scheduler.PeriodicTask("ScheduledAgent");
            task.Description = "Updates theme live tiles";

            ScheduledActionService.Add(task);
            ScheduledActionService.LaunchForTest("ScheduledAgent", TimeSpan.FromMilliseconds(1200));
        }
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            //ScheduledAgent

            var oldTask = ScheduledActionService.Find("ScheduledAgent") as PeriodicTask;
            if (oldTask != null)
            {
                ScheduledActionService.Remove("ScheduledAgent");
            }

            Microsoft.Phone.Scheduler.PeriodicTask task = new Microsoft.Phone.Scheduler.PeriodicTask("ScheduledAgent");
            task.Description = "Updates theme live tiles";

            ScheduledActionService.Add(task);
            ScheduledActionService.LaunchForTest("ScheduledAgent", TimeSpan.FromMilliseconds(1200));
        }
        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            var oldTask = ScheduledActionService.Find("task") as PeriodicTask;
            if (oldTask != null)
            {
                ScheduledActionService.Remove("task");
            }

            Microsoft.Phone.Scheduler.PeriodicTask task = new Microsoft.Phone.Scheduler.PeriodicTask("task");
            task.Description = "Changes the lock screen background";

            ScheduledActionService.Add(task);
        }