Пример #1
0
        /// <summary>
        /// Agent that runs a scheduled task
        /// </summary>
        /// <param name="task">
        /// The invoked task
        /// </param>
        /// <remarks>
        /// This method is called when a periodic or resource intensive task is invoked
        /// </remarks>

        protected override void OnInvoke(ScheduledTask task)
        {
            //TODO: Add code to perform your task in background

            ScheduledActionService.LaunchForTest(task.Name, TimeSpan.FromSeconds(61));

            System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() => {
                TileOptions to = new TileOptions();
                to.UpdateTile();
            });

            NotifyComplete();
        }
Пример #2
0
        // Code to execute when the application is closing (eg, user hit Back)
        // This code will not execute when the application is deactivated
        private void Application_Closing(object sender, ClosingEventArgs e)
        {
            TileOptions to = new TileOptions();

            to.UpdateTile();
        }
Пример #3
0
        // Code to execute when the application is deactivated (sent to background)
        // This code will not execute when the application is closing
        private void Application_Deactivated(object sender, DeactivatedEventArgs e)
        {
            TileOptions to = new TileOptions();

            to.UpdateTile();
        }
Пример #4
0
 private void TextBlock_Tap_3(object sender, System.Windows.Input.GestureEventArgs e)
 {
     to.UpdateTile();
 }