Esempio n. 1
0
        public static void UpdateTile()
        {
            TileUpdateManager.CreateTileUpdaterForApplication().EnableNotificationQueue(true);

            if (AutoDelete.AutoDeleteStatus)
            {
                AutoDelete.DeleteOutDatedCoverEvents();
            }

            CoverEventsManager.AddCoverEventsDays();
            CoverEventsManager.WriteCoverEventsCollectionData();


            ClearTile();

            foreach (var eachEvent in CoverEventsManager.CoverEventsCollection)
            {
                string url = eachEvent.imageUrl;
                if (url != null)
                {
                    createTileUpdate(eachEvent, url);
                }
                else
                {
                    createTileUpdate(eachEvent);
                }
            }
        }
Esempio n. 2
0
        public static void UpdateTileBG()
        {
            TileUpdateManager.CreateTileUpdaterForApplication().EnableNotificationQueue(true);

            Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
            Object AutoDeleteData        = localSettings.Values["AutoDeleteData"];
            Object coverEventsCollection = localSettings.Values["coverEventsCollection"];

            if (coverEventsCollection != null)
            {
                String dataString = (string)coverEventsCollection;
                CoverEventsManager.CoverEventsCollection = ObjectSerializer.CoverEventsFromXml(dataString);
            }

            if (AutoDeleteData != null)
            {
                if ((bool)AutoDeleteData)
                {
                    AutoDelete.DeleteOutDatedCoverEvents();
                }
            }


            CoverEventsManager.AddCoverEventsDaysTileBG();
            CoverEventsManager.WriteCoverEventsCollectionData();


            ClearTile();

            foreach (var eachEvent in CoverEventsManager.CoverEventsCollection)
            {
                string url = eachEvent.imageUrl;
                if (url != null)
                {
                    createTileUpdate(eachEvent, url);
                }
                else
                {
                    createTileUpdate(eachEvent);
                }
            }
        }